summaryrefslogtreecommitdiff
path: root/run-tests.sh
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-06-21 12:07:13 +0200
committerjaseg <git@jaseg.de>2022-06-21 12:07:13 +0200
commitee233317f1c5541a302c4f062b9957ae7ea335c2 (patch)
tree9c8f5ea85ba86479c9b5dbf00c3849a0a039e527 /run-tests.sh
parent6752dab1254e2995e4d8545e2ae95be7be085a40 (diff)
downloadgerbonara-ee233317f1c5541a302c4f062b9957ae7ea335c2.tar.gz
gerbonara-ee233317f1c5541a302c4f062b9957ae7ea335c2.tar.bz2
gerbonara-ee233317f1c5541a302c4f062b9957ae7ea335c2.zip
Fix local testsv0.10.9
Diffstat (limited to 'run-tests.sh')
-rwxr-xr-xrun-tests.sh28
1 files changed, 23 insertions, 5 deletions
diff --git a/run-tests.sh b/run-tests.sh
index 76be006..1ed2b66 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -1,14 +1,32 @@
#!/bin/sh
set -e
-CONTAINER_ARGS="$@"
-rm -rf podman/testdata/git
-git clone --depth 1 . podman/testdata/git
+while [ $# -gt 0 ]; do
+ case $1 in
+ --parallel)
+ CONTAINER_ARGS="--workers auto $CONTAINER_ARGS"
+ shift;;
+ -x)
+ CONTAINER_ARGS="-x $CONTAINER_ARGS"
+ shift;;
+ --no-cache)
+ NO_CACHE=--no-cache
+ shift;;
+ *)
+ echo "Unknown argument \"$1\""
+ exit 1
+ shift;;
+ esac
+done
+
+mkdir -p podman/testdata/git
+git ls-tree --full-tree -r HEAD --name-only | rsync -lptgoDv --delete . --files-from - podman/testdata/git/
+#git clone --depth 1 . podman/testdata/git
-for distro in arch ubuntu
+for distro in ubuntu arch
do
- podman build -t gerbonara-$distro-testenv -f podman/$distro-testenv
+ podman build $NO_CACHE -t gerbonara-$distro-testenv -f podman/$distro-testenv
mkdir -p /tmp/gerbonara-test-out
podman run --mount type=bind,src=podman/testdata,dst=/data,ro --mount type=bind,src=/tmp/gerbonara-test-out,dst=/out gerbonara-$distro-testenv /data/testscript.sh $CONTAINER_ARGS
done