diff options
Diffstat (limited to 'test-docker.sh')
-rwxr-xr-x | test-docker.sh | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/test-docker.sh b/test-docker.sh index f10456d..4bd446b 100755 --- a/test-docker.sh +++ b/test-docker.sh @@ -2,7 +2,36 @@ # Test Stow across multiple Perl versions, by executing the # Docker image built via build-docker.sh. +# +# Usage: ./test-docker.sh [list | PERL_VERSION] +# +# If the first argument is 'list', list available Perl versions. +# If the first argument is a Perl version, test just that version interactively. +# If no arguments are given test all available Perl versions non-interactively. version=$( tools/get-version ) -docker run --rm -it -v $(pwd):$(pwd) -w $(pwd) stowtest:$version +if [ -z "$1" ]; then + # Normal non-interactive run + docker run --rm -it \ + -v $(pwd):$(pwd) \ + -w $(pwd) \ + stowtest:$version +elif [ "$1" == list ]; then + # List available Perl versions + docker run --rm -it \ + -v $(pwd):$(pwd) \ + -v $(pwd)/docker/run-stow-tests.sh:/run-stow-tests.sh \ + -w $(pwd) \ + -e LIST_PERL_VERSIONS=1 \ + stowtest:$version +else + # Interactive run for testing / debugging a particular version + perl_version="$1" + docker run --rm -it \ + -v $(pwd):$(pwd) \ + -v $(pwd)/docker/run-stow-tests.sh:/run-stow-tests.sh \ + -w $(pwd) \ + -e PERL_VERSION=$perl_version \ + stowtest:$version +fi |