diff --git a/tests/tests.bats b/tests/tests.bats index 44e55f2..bee7393 100644 --- a/tests/tests.bats +++ b/tests/tests.bats @@ -38,15 +38,26 @@ teardown() } @test "tarball_topologies_only 2.2.1" { - test_tarball_topologies_only v2.2.x v2.2.1 + local ver=v2.2.1 + test_init + get_release "$ver"/sof-tplg-"$ver".tar.gz + # These should have never been there + # rm "$EXTR_REFS"/sof-tplg-v2.2.1/cavs-*.tplg + test_tarball_topologies_only v2.2.x "$ver" } @test "tarball_topologies_only 2.1.1a" { - test_tarball_topologies_only v2.1.x v2.1.1a + local ver=v2.1.1a + test_init + get_release "$ver"/sof-tplg-"$ver".tar.gz + test_tarball_topologies_only v2.1.x "$ver" } @test "tarball_topologies_only 1.9.3-tplg2" { - test_tarball_topologies_only v1.9.x v1.9.3-tplg2 + local ver=v1.9.3-tplg2 + test_init + get_release "$ver"/sof-tplg-"$ver".tar.gz + test_tarball_topologies_only v1.9.x "$ver" } @test "tarball_multi_2_1_1a" { @@ -63,14 +74,19 @@ teardown() popd || exit 1 } +test_init() +{ + pushd "$RUN_DIR"/ || exit 1 + load 'common_helpers.bash'; set_constants +} + test_tarball_one_version() { + test_init + local dir="$1" ver="$2" local optional_git_tag="$3" - pushd "$RUN_DIR"/ || exit 1 - load 'common_helpers.bash'; set_constants - get_release "$ver"/sof-bin-"$ver".tar.gz "$TOP_DIR"/tarball_one_version.sh "$dir"/"$ver" "$optional_git_tag" @@ -83,11 +99,6 @@ test_tarball_topologies_only() { local dir="$1" ver="$2" - pushd "$RUN_DIR"/ || exit 1 - load 'common_helpers.bash'; set_constants - - get_release "$ver"/sof-tplg-"$ver".tar.gz - "$TOP_DIR"/tarball_topologies_only.sh "$dir"/"$ver" tar xf sof-tplg-"$ver".tar.gz diff -qr "$EXTR_REFS"/sof-tplg-"$ver" "$(pwd)"/sof-tplg-"$ver"/