diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:59:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:59:18 +0000 |
commit | fa60720fe95711a68dd4f1cb57fbc79fc6fc2e5c (patch) | |
tree | a8712923a49e76a6241f151af877900e056ce65d /tests/distros.sh | |
parent | Initial commit. (diff) | |
download | asciinema-e29e9119abe4c07adad6a1675de3495f0521d159.tar.xz asciinema-e29e9119abe4c07adad6a1675de3495f0521d159.zip |
Adding upstream version 2.4.0.upstream/2.4.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/distros.sh')
-rwxr-xr-x | tests/distros.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/distros.sh b/tests/distros.sh new file mode 100755 index 0000000..c34d272 --- /dev/null +++ b/tests/distros.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +set -euo pipefail + +readonly DISTROS=( + 'arch' + 'alpine' + 'centos' + 'debian' + 'fedora' + 'ubuntu' +) + +readonly DOCKER='docker' + +# do not redefine builtin `test` +test_() { + local -r tag="${1}" + + local -ra docker_opts=( + "--tag=asciinema/asciinema:${tag}" + "--file=tests/distros/Dockerfile.${tag}" + ) + + printf "\e[1;32mTesting on %s...\e[0m\n\n" "${tag}" + + # shellcheck disable=SC2068 + "${DOCKER}" build ${docker_opts[@]} . + + "${DOCKER}" run --rm -it "asciinema/asciinema:${tag}" tests/integration.sh +} + + +for distro in "${DISTROS[@]}"; do + test_ "${distro}" +done + +printf "\n\e[1;32mAll tests passed.\e[0m\n" |