-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run tests with race flag using checkflags script #1024
Conversation
This script can be used in a Makefile to detect flag changes and to save the new flags in a file. License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
This makes it possible to build binaries with different flags. The content of the GOFLAGS variable is stored in a IPFS-BUILD-OPTIONS file, so that if GOFLAGS changes a rebuild of the binaries with the new flags is forced. License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
This builds go binaries using the -race flag and then runs all the tests. License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
...and remove bin/* stuff from the .gitignore as /test/bin is already in the root .gitignore. License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
The GOFLAGS variable makes it possible to run all sharness tests with go binaries built with some special flags. The "race" target makes it easy run the sharness tests with go binaries built with the -race flag. License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
I think this LGTM, but can @whyrusleeping and @cryptix to take a look too. also @chriscool did you see comment about building to another dir? say have parallel bins at both:
? dont have to go this route (may be more annoying) but figured it was worth considering. |
ah missed that thanks
yeah, it wont :) let's go with your approach. |
I think this works great, thanks @chriscool |
Run tests with race flag using checkflags script
This is an alternative implementation of PR #1013 (Run tests with race flag) using a "checkflags" script.
As for PR #1013 the goal is to make it easier to find race conditions like issue #1012.