-
Notifications
You must be signed in to change notification settings - Fork 4
Upgrade to Go 1.7 #11
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
.PHONY: all install install-dependencies install-tools test test-verbose | ||
.PHONY: all install install-dependencies install-tools test test-full test-verbose | ||
|
||
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) | ||
export ROOT_DIR | ||
export ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) | ||
|
||
export CC := clang | ||
export CXX := clang++ | ||
|
||
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) | ||
$(eval $(ARGS):;@:) # turn arguments into do-nothing targets | ||
|
@@ -14,7 +16,10 @@ install: | |
install-dependencies: | ||
go get -u github.com/stretchr/testify/... | ||
install-tools: | ||
|
||
test: | ||
CGO_LDFLAGS="-L`llvm-config --libdir`" go test -timeout 60s -race ./... | ||
CGO_LDFLAGS="-L`llvm-config --libdir`" go test -timeout 60s ./... | ||
test-full: | ||
$(ROOT_DIR)/scripts/test-full.sh | ||
test-verbose: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. test-full does as of now the same as test-verbose, since we discussed that the future command should be full, delete verbose or at least explain me why its still here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "test-verbose" is just "test" but with verbose output. "test-full" adds should add additional tests, like the memory sanitizer, and later maybe integration/system tests. So I think it would be wiser to just call test-verbose in test-full, and then later activate the memory sanitzer check when it is ready. I just wanted to have a single make target for the CI and I do not want to include additional checks into test/test-verbose. Now that you mentioned it, I am also voting to remove the -race argument from test/test-verbose. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well now I see the "-v" flag. Ok, remove the -race argument since I presume this -verbose has another purpose. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "test-verbose" is sometimes helpful because otherwise you do not see the output of a test. So for me it makes sense to keep it. I would however do all tests in test-full with the verbose flag, since we would run that in the CI. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently slightly confused, what do you intend to do with -verbose now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing the "-race" flag from "test" and "test-verbose". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "I would however do all tests in test-full with the verbose flag, since we would run that in the CI." <- if you as well do that then both will do the same and I don't see the merit of keeping them both There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now we are both confused? ;-) I suggest the following:
That makes the normal testing process (test/test-verbose) fast, and the CI would catch everything no matter what. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now. Yes, that sounds good. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
CGO_LDFLAGS="-L`llvm-config --libdir`" go test -timeout 60s -race -v ./... | ||
CGO_LDFLAGS="-L`llvm-config --libdir`" go test -timeout 60s -v ./... |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -exuo pipefail | ||
|
||
LLVM_VERSION=$(clang --version | grep --max-count=1 "clang version" | sed -r 's/^.*clang version ([0-9]+\.[0-9]+).+$/\1/') | ||
|
||
# Test with the race detector | ||
CGO_LDFLAGS="-L`llvm-config --libdir`" go test -timeout 60s -v -race ./... | ||
|
||
# Test with the address sanitizer | ||
# TODO there is maybe a problem within clang https://github.com/go-clang/gen/issues/123 | ||
# if [ $(echo "$LLVM_VERSION>=3.9" | bc -l) -ne 0 ] && [ $(find `llvm-config --libdir` | grep libclang_rt.san-x86_64.a | wc -l) -ne 0 ]; then CGO_LDFLAGS="-L`llvm-config --libdir` -fsanitize=memory" CGO_CPPFLAGS='-fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer' go test -timeout 60s -v -msan ./...; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there still "test-verbose"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is and should be test-verbose. You are thinking about the rename of "test-throughout" to "test-full".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, still atm they do the same. Please correct on what I'm currently obviously not seeing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done