aboutsummaryrefslogtreecommitdiff
path: root/run-tests.sh
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-06-21 13:54:29 +0200
committerjaseg <git@jaseg.de>2022-06-21 13:54:29 +0200
commitbb8b28f86acd73a5e780765667b7c94f67aaf397 (patch)
tree62f6d7d09b9e4d8ed673e9b2b4ac3190122ecaa0 /run-tests.sh
parenta01e44b142f68bca8d7caa2eb552f722dd8f6204 (diff)
downloadgerbolyze-bb8b28f86acd73a5e780765667b7c94f67aaf397.tar.gz
gerbolyze-bb8b28f86acd73a5e780765667b7c94f67aaf397.tar.bz2
gerbolyze-bb8b28f86acd73a5e780765667b7c94f67aaf397.zip
update local tests
Diffstat (limited to 'run-tests.sh')
-rwxr-xr-xrun-tests.sh31
1 files changed, 25 insertions, 6 deletions
diff --git a/run-tests.sh b/run-tests.sh
index dae718b..996c1e7 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -2,13 +2,32 @@
set -e
-python setup.py sdist build
-cp dist/*.tar.gz podman/testdata
+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 fedora debian ubuntu
+for distro in ubuntu-old ubuntu arch
do
- podman build -t gerbolyze-$distro-testenv -f podman/$distro-testenv
- mkdir -p /tmp/gerbolyze-test-out
- podman run --mount type=bind,src=podman/testdata,dst=/data,ro --mount type=bind,src=/tmp/gerbolyze-test-out,dst=/out gerbolyze-$distro-testenv /data/testscript.sh
+ 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