Open
Conversation
Here are a list of the improvements done to the Makefile. 1. allow tests to be built and run individually from the command-line: Examples of building individual tests: ``` make bin/test1 make bin/test2 ... ``` Running individual tests: ```sh make test1 make test2 make test_compile make test_rand make test_rand_neg # note: you can still run all the tests with make test ``` 2. Because building and running the tests are now in their own rules, the user can run them in parallel now: Build everything in parallel with 5 threads: ``` make -j5 ``` Build and run everything with 5 threads: ``` make -j5 test ``` 3. Moved all outputs to the "bin" directory This simplifies the code in the "clean" target to 1 command. It also simplifies the .gitignore file and make it easy for developers to distinguish between output files and source files. 4. Added re.c as a dependency to all the tests Now if the user modifies re.c, all the tests will be see that they need to be rebuilt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here are a list of the improvements done to the Makefile.
Examples of building individual tests:
Running individual tests:
Build everything in parallel with 5 threads:
Build and run everything with 5 threads:
This simplifies the code in the "clean" target to 1 command. It also simplifies the .gitignore file and makes it easy for developers to distinguish between output files and source files.
This also means we don't need an odd rule in .gitignore that means new files in
testwill be ignored by default, which means if a new file is added to test then the programmer must rungit add -f test/fileand git status also doesn't notify them if they forgot to do this.Now if the user modifies re.c, all the tests will see that they need to be rebuilt.