fix workdir path in case it has code

This commit is contained in:
Anton Iakimov 2023-08-21 12:34:43 +02:00
parent a12e87dac6
commit 6033918892
No known key found for this signature in database
GPG Key ID: DEA1FE58DD8BF7FA
1 changed files with 4 additions and 4 deletions

View File

@ -316,11 +316,11 @@ test-unit: UNIT_TEST_PACKAGES = $(shell go list ./... | \
grep -v /t/benchmarks | \
grep -v /transactions/fake )
test-unit: ##@tests Run unit and integration tests
for file in $(UNIT_TEST_PACKAGES); do \
for package in $(UNIT_TEST_PACKAGES); do \
set -e; \
path=$$(echo $$file | cut -d\/ -f 4-); \
go test -tags '$(BUILD_TAGS)' -timeout 30m -v -failfast $$file $(gotest_extraflags) | \
go-junit-report -iocopy -out $${path}/report.xml; \
package_dir=$$(go list -f {{.Dir}} $${package}); \
go test -tags '$(BUILD_TAGS)' -timeout 30m -v -failfast $${package} $(gotest_extraflags) | \
go-junit-report -iocopy -out $${package_dir}/report.xml; \
done
test-unit-race: gotest_extraflags=-race