Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

build: test-repeat.sh add -tag to buildflags

Nick Craig-Wood62a1a561cf3c
diff --git a/bin/test-repeat.sh b/bin/test-repeat.sh
index 39f395335..1899a3f27 100755
--- a/bin/test-repeat.sh
+++ b/bin/test-repeat.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# defaults
-race=""
+buildflags=""
binary="test.binary"
flags=""
iterations="100"
@@ -29,6 +29,8 @@ Flags this script understands
the log files generated will start with NAME (default ${logprefix})
-race
build the binary with race testing enabled
+-tags=TAGS
+ build the binary with the tags supplied
Any other flags will be past to go test.
@@ -62,8 +64,8 @@ do
iterations="${i#*=}"
shift # past argument=value
;;
- -race|--race)
- race="-race"
+ -race|--race|-tags=*|--tags=*)
+ buildflags="${buildflags} $i"
shift # past argument with no value
;;
*)
@@ -74,15 +76,15 @@ do
esac
done
-echo -n "Compiling ${race} ${binary} ... "
-go test ${race} -c -o "${binary}" || {
+echo -n "Compiling ${buildflags} ${binary} ... "
+go test ${buildflags} -c -o "${binary}" || {
echo "build failed"
exit 1
}
echo "OK"
for i in $(seq -w ${iterations}); do
- echo -n "Test ${race} ${flags} ${i} "
+ echo -n "Test ${buildflags} ${flags} ${i} "
log="${logprefix}${i}.log"
./${binary} ${flags} > ${log} 2>&1
ok=$?