Skip to content

Commit fca05ea

Browse files
committed
Makefile: rename TAGS to GOTAGS and ensure it is passed correctly
1 parent efdd0c4 commit fca05ea

File tree

7 files changed

+16
-17
lines changed

7 files changed

+16
-17
lines changed

Makefile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ COVERAGE?=0
2929
COVERAGE_MODE?=atomic
3030
COVERAGE_WD?="."
3131
BOOTSTRAP_ARGS?=
32+
GOTAGS?=
3233

3334
ifeq ($(WITH_DPDK), true)
34-
GOTAGS= -tags dpdk
35+
GOTAGS+=dpdk
3536
endif
3637

3738
.PHONY: all
@@ -53,17 +54,17 @@ all: install
5354
gofmt -w -s statics/bindata.go
5455

5556
.compile:
56-
${GOPATH}/bin/govendor install -ldflags="-X github.com/skydive-project/skydive/version.Version=${VERSION}" ${GOFLAGS} ${GOTAGS} ${VERBOSE_FLAGS} +local
57+
${GOPATH}/bin/govendor install -ldflags="-X github.com/skydive-project/skydive/version.Version=${VERSION}" ${GOFLAGS} -tags=" ${GOTAGS}" ${VERBOSE_FLAGS} +local
5758

5859
install: govendor genlocalfiles dpdk.build contribs .compile
5960

6061
build: govendor genlocalfiles dpdk.build contribs
61-
${GOPATH}/bin/govendor build -ldflags="-X github.com/skydive-project/skydive/version.Version=${VERSION}" ${GOFLAGS} ${GOTAGS} ${VERBOSE_FLAGS} +local
62+
${GOPATH}/bin/govendor build -ldflags="-X github.com/skydive-project/skydive/version.Version=${VERSION}" ${GOFLAGS} -tags=" ${GOTAGS}" ${VERBOSE_FLAGS} +local
6263

63-
static: govendor genlocalfiles
64+
static: #govendor genlocalfiles
6465
rm -f $$GOPATH/bin/skydive
65-
test -f /etc/redhat-release && govendor install -tags netgo --ldflags '-extldflags "-static /usr/lib64/libz.a /usr/lib64/liblzma.a /usr/lib64/libm.a"' ${VERBOSE_FLAGS} +local || true
66-
test -f /etc/debian_version && govendor install -tags netgo --ldflags '-extldflags "-static /usr/lib/x86_64-linux-gnu/libz.a /usr/lib/x86_64-linux-gnu/liblzma.a /usr/lib/x86_64-linux-gnu/libicuuc.a /usr/lib/x86_64-linux-gnu/libicudata.a /usr/lib/x86_64-linux-gnu/libxml2.a /usr/lib/x86_64-linux-gnu/libc.a /usr/lib/x86_64-linux-gnu/libdl.a /usr/lib/x86_64-linux-gnu/libpthread.a /usr/lib/x86_64-linux-gnu/libc++.a /usr/lib/x86_64-linux-gnu/libm.a"' ${VERBOSE_FLAGS} +local || true
66+
test -f /etc/redhat-release && govendor install -tags netgo --ldflags '-extldflags "-static /usr/lib64/libz.a /usr/lib64/liblzma.a /usr/lib64/libm.a"' ${VERBOSE_FLAGS} -tags " ${GOTAGS}" +local || true
67+
test -f /etc/debian_version && govendor install -tags netgo --ldflags '-extldflags "-static /usr/lib/x86_64-linux-gnu/libz.a /usr/lib/x86_64-linux-gnu/liblzma.a /usr/lib/x86_64-linux-gnu/libicuuc.a /usr/lib/x86_64-linux-gnu/libicudata.a /usr/lib/x86_64-linux-gnu/libxml2.a /usr/lib/x86_64-linux-gnu/libc.a /usr/lib/x86_64-linux-gnu/libdl.a /usr/lib/x86_64-linux-gnu/libpthread.a /usr/lib/x86_64-linux-gnu/libc++.a /usr/lib/x86_64-linux-gnu/libm.a"' ${VERBOSE_FLAGS} -tags " ${GOTAGS}" +local || true
6768

6869
contribs:
6970
$(MAKE) -C contrib/snort
@@ -86,7 +87,7 @@ test.functionals.cleanup:
8687
rm -f tests/functionals
8788

8889
test.functionals.compile: govendor genlocalfiles
89-
${GOPATH}/bin/govendor test -tags "${TAGS} test" ${GOFLAGS} ${VERBOSE_FLAGS} -timeout ${TIMEOUT} -c -o tests/functionals ./tests/
90+
${GOPATH}/bin/govendor test -tags "${GOTAGS} test" ${GOFLAGS} ${VERBOSE_FLAGS} -timeout ${TIMEOUT} -c -o tests/functionals ./tests/
9091

9192
test.functionals.run:
9293
cd tests && sudo -E ./functionals ${VERBOSE_TESTS_FLAGS} -test.timeout ${TIMEOUT} ${ARGS}
@@ -116,12 +117,12 @@ ifeq ($(COVERAGE), true)
116117
for pkg in ${UT_PACKAGES}; do \
117118
if [ -n "$$pkg" ]; then \
118119
coverfile="${COVERAGE_WD}/$$(echo $$pkg | tr / -).cover"; \
119-
${GOPATH}/bin/govendor test -tags "${TAGS} test" -covermode=${COVERAGE_MODE} -coverprofile="$$coverfile" ${VERBOSE_FLAGS} -timeout ${TIMEOUT} $$pkg; \
120+
${GOPATH}/bin/govendor test -tags "${GOTAGS} test" -covermode=${COVERAGE_MODE} -coverprofile="$$coverfile" ${VERBOSE_FLAGS} -timeout ${TIMEOUT} $$pkg; \
120121
fi; \
121122
done
122123
else
123124
set -v ; \
124-
${GOPATH}/bin/govendor test -tags "${TAGS} test" ${GOFLAGS} ${VERBOSE_FLAGS} -timeout ${TIMEOUT} ${UT_PACKAGES}
125+
${GOPATH}/bin/govendor test -tags "${GOTAGS} test" ${GOFLAGS} ${VERBOSE_FLAGS} -timeout ${TIMEOUT} ${UT_PACKAGES}
125126
endif
126127

127128
govendor:

coverage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ generate_cover_data() {
5353
curl -XDELETE 'localhost:9200/skydive*'
5454
$SKYDIVE compile
5555

56-
make test.functionals TAGS="scale" VERBOSE=true TIMEOUT=10m TEST_PATTERN=Scale
56+
make test.functionals GOTAGS="scale" VERBOSE=true TIMEOUT=10m TEST_PATTERN=Scale
5757
cp /tmp/skydive-scale/*.cover "$workdir"/
5858
fi
5959

scripts/ci/run-cdd-overview-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export ELASTICSEARCH=localhost:9200
1919
export SKYDIVE=${GOPATH}/bin/skydive
2020
export SKYDIVE_LOGGING_LEVEL=DEBUG
2121

22-
make test.functionals TAGS="cdd" VERBOSE=true TIMEOUT=10m TEST_PATTERN=Overview
22+
make test.functionals GOTAGS="cdd" VERBOSE=true TIMEOUT=10m TEST_PATTERN=Overview
2323

2424
"${dir}/convert-to-gif.sh" tests/overview.mp4 tests/overview-tmp.gif
2525
gifsicle -O3 tests/overview-tmp.gif -o tests/overview.gif

scripts/ci/run-functional-tests.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,14 @@ case "$BACKEND" in
1818
"orientdb")
1919
export ORIENTDB_ROOT_PASSWORD=root
2020
ARGS="-graph.backend orientdb -storage.backend orientdb"
21-
TAGS="storage"
2221
;;
2322
"elasticsearch")
2423
ARGS="-graph.backend elasticsearch -storage.backend elasticsearch"
25-
TAGS="storage"
2624
;;
2725
esac
2826

2927
set -e
30-
make test.functionals.batch TAGS="$TAGS" GOFLAGS="$GOFLAGS" GORACE="history_size=5" VERBOSE=true TIMEOUT=20m COVERAGE=$COVERAGE ARGS="$ARGS -graph.output ascii -standalone -etcd.server http://localhost:2379" TEST_PATTERN=$TEST_PATTERN 2>&1 | tee $WORKSPACE/output.log
28+
make test.functionals.batch GOTAGS="$GOTAGS" GOFLAGS="$GOFLAGS" GORACE="history_size=5" VERBOSE=true TIMEOUT=20m COVERAGE=$COVERAGE ARGS="$ARGS -graph.output ascii -standalone -etcd.server http://localhost:2379" TEST_PATTERN=$TEST_PATTERN 2>&1 | tee $WORKSPACE/output.log
3129
go2xunit -fail -fail-on-race -input $WORKSPACE/output.log -output $WORKSPACE/tests.xml
3230
set +e
3331

scripts/ci/run-openstack-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ export GOROOT=/opt/go
1010
export GOPATH=/opt/stack/go
1111
export GO_VERSION=1.7
1212
cd /opt/stack/go/src/github.com/skydive-project/skydive/
13-
SKYDIVE_ANALYZERS=localhost:8082 make test.functionals TAGS="neutron" VERBOSE=true TIMEOUT=5m TEST_PATTERN=Neutron
13+
SKYDIVE_ANALYZERS=localhost:8082 make test.functionals GOTAGS="neutron" VERBOSE=true TIMEOUT=5m TEST_PATTERN=Neutron

scripts/ci/run-scale.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export SKYDIVE=${GOPATH}/bin/skydive
2424
export FLOW_PROTOCOL=${FLOW_PROTOCOL}
2525
export SKYDIVE_LOGGING_LEVEL=DEBUG
2626

27-
make test.functionals TAGS="scale" VERBOSE=true TIMEOUT=10m TEST_PATTERN=Scale
27+
make test.functionals GOTAGS="scale" VERBOSE=true TIMEOUT=10m TEST_PATTERN=Scale
2828
status=$?
2929

3030
cat /tmp/skydive-scale/{analyzer,agent}-?.log | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" | perl -ne '$d=$1 if /^(\d+-\d+-\d+),/; $k{$d}.=$_; END{print $k{$_} for sort keys(%k);}'

scripts/ci/run-selenium-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ make install
1818
export SKYDIVE_ANALYZERS=localhost:8082
1919
export SKYDIVE=${GOPATH}/bin/skydive
2020

21-
make test.functionals TAGS="selenium" VERBOSE=true TIMEOUT=10m TEST_PATTERN=PacketInjectionCapture ARGS="$ARGS -standalone"
21+
make test.functionals GOTAGS="selenium" VERBOSE=true TIMEOUT=10m TEST_PATTERN=PacketInjectionCapture ARGS="$ARGS -standalone"

0 commit comments

Comments
 (0)