diff --git a/tarball_multi_releases.bash b/tarball_multi_releases.bash index 0f9f784..0c00293 100755 --- a/tarball_multi_releases.bash +++ b/tarball_multi_releases.bash @@ -21,7 +21,7 @@ Example: $0 -g v2.3 v2.0.x/tools-v2.0 v2.1.x/sof-tplg-v2.1.1 v2.2.x/sof-v2.2.1 v2.3.x/sof-v2.3 This example will create a sof-bin-v2.3.tar.gz archive; its files will -extract in directories sof-v2.3/, tools-v2.3/ and sof-tplg-v2.3/ +extract in directories sof/, tools/, sof-tplg/, ... Synopsis: $0 [ -g optional_git_ref ] dir1 dir2 dir3 ... @@ -54,7 +54,10 @@ main() last_ver=$(parse_version_suffix "$last_dir") local archive_name=sof-bin-"$last_ver" - local ver_suffix_inside_tarball="-$last_ver" + local ver_suffix_inside_tarball + if $double_dirversion_inside; then + ver_suffix_inside_tarball="-$last_ver" + fi if test -e "$archive_name"; then die "%s already exists\n" "$archive_name" @@ -180,9 +183,12 @@ parse_version_suffix() parse_args() { GIT_REF=HEAD + double_dirversion_inside=false local opt - while getopts "g:h" opt; do + while getopts "dg:h" opt; do case "$opt" in + # undocumented option to test releases < 2.7 + d) double_dirversion_inside=true;; g) GIT_REF=$OPTARG ;; h) usage ;; *) exit 1;; diff --git a/tests/static_refs/multi-v2.1.1a/sha256sum.txt b/tests/static_refs/multi-v2.1.1a/sha256sum.txt index da609f2..da8284f 100644 --- a/tests/static_refs/multi-v2.1.1a/sha256sum.txt +++ b/tests/static_refs/multi-v2.1.1a/sha256sum.txt @@ -1,45 +1,45 @@ -076b5b8a7a85016915951f2cb01b9591e8eaad53d143bf827be3ec2990cc9559 sof-tplg-v2.1.1a/./sof-adl-rt1316-l12-rt714-l0.tplg -a37b0b005930ba7348f7281c7351e78e602c50a1f6b7012a9df8e168b2dd63a5 sof-tplg-v2.1.1a/./sof-adl-rt1316-l2-mono-rt714-l0.tplg -4ca91811d7bc7b157739ce6ad79e9f4197e17c39583d60976fde45ae2dda03be sof-tplg-v2.1.1a/./sof-adl-rt1316-l2-mono-rt714-l3.tplg -1a043202b7d8e24735996ec0de8f9353303c57c13cdbef5770504b1ebc33af5a sof-tplg-v2.1.1a/./sof-adl-rt711-l0-rt1308-l12-rt715-l3.tplg -1a043202b7d8e24735996ec0de8f9353303c57c13cdbef5770504b1ebc33af5a sof-tplg-v2.1.1a/./sof-adl-rt711-l0-rt1316-l12-rt714-l3.tplg -2d7132baa504e9a588f626bb8b865d78b19c98cb1923a03c8d2cab752d228e3c sof-tplg-v2.1.1a/./sof-adl-rt711-l0-rt1316-l13-rt714-l2.tplg -11e07fa6d37e726127559cc6799ef7f73aff04868adf0d28a4d0aaa7a2c8cbc1 sof-tplg-v2.1.1a/./sof-adl-rt711-l2-rt1316-l01-rt714-l3.tplg -85281ce60cd07c0b7d541d43782505f896064f75272e45566847e0f9f5cdb02f sof-tplg-v2.1.1a/./sof-adl-rt711-l2-rt1316-l01.tplg -3af494e1092c876155e05e04262c528f92257aa22e767c4dc409883ffca229ee sof-tplg-v2.1.1a/./sof-cml-rt711-rt1308-mono-rt715.tplg -1a043202b7d8e24735996ec0de8f9353303c57c13cdbef5770504b1ebc33af5a sof-tplg-v2.1.1a/./sof-cml-rt711-rt1308-rt715.tplg -1a043202b7d8e24735996ec0de8f9353303c57c13cdbef5770504b1ebc33af5a sof-tplg-v2.1.1a/./sof-icl-rt711-rt1308-rt715.tplg -3af494e1092c876155e05e04262c528f92257aa22e767c4dc409883ffca229ee sof-tplg-v2.1.1a/./sof-tgl-rt711-l0-rt1316-l1-mono-rt714-l3.tplg -3af494e1092c876155e05e04262c528f92257aa22e767c4dc409883ffca229ee sof-tplg-v2.1.1a/./sof-tgl-rt711-rt1308-mono-rt715.tplg -1a043202b7d8e24735996ec0de8f9353303c57c13cdbef5770504b1ebc33af5a sof-tplg-v2.1.1a/./sof-tgl-rt711-rt1308-rt715.tplg -1a043202b7d8e24735996ec0de8f9353303c57c13cdbef5770504b1ebc33af5a sof-tplg-v2.1.1a/./sof-tgl-rt711-rt1316-rt714.tplg -b413c1fbda747034c3f796e7ff4da10ba985c7fe2062b5087233666a3212dbad sof-tplg-v2.1.1a/./sof-tgl-rt715-rt711-rt1308-mono.tplg -ed32cc8e67d453da7873a0e0ee43a26e0447b83a0b980a5f62a5ab600cac2f34 sof-v2.1.1a/./community/sof-apl.ri -310799f69388a58881f9c0ded25496e4789fad714157ed7261d197e768069914 sof-v2.1.1a/./community/sof-cnl.ri -1d0a5fc5aba09359744c6e596c7eb919728f637665130a8082993f1322cb68df sof-v2.1.1a/./community/sof-icl.ri -e20540a41ac8be7718ea17263f495824ab6ca04ec5062c0048942ef69d10d29b sof-v2.1.1a/./community/sof-jsl.ri -2ab7fc689cc7f560bd209fbdcd6e5c38e536e9b9435963943a34cdd34df990d4 sof-v2.1.1a/./community/sof-tgl-h.ri -700848108549ea32c020fa506d58a75f8c03adf6fd014600edb9de4858d7e8ef sof-v2.1.1a/./community/sof-tgl.ri -8433390e4abfe40b251ff3dec41604e7b817501d1097d51aa2f51c11444d3bf0 sof-v2.1.1a/./intel-signed/sof-adl-n.ri -1bddc1c6e26de3ae37f914305a0d619fa51e1b2fa3ebc5a64550b3464cf13188 sof-v2.1.1a/./intel-signed/sof-adl-s.ri -294e5a51b1d3fc4ceda57780927c2a2ec95bb5d23477f879a9fb648c6c01cb30 sof-v2.1.1a/./intel-signed/sof-adl.ri -4d97921846fe979b1295cfd46a62f159b118e70e9aa8fefe91820a7a2431d018 sof-v2.1.1a/./intel-signed/sof-apl.ri -3e23a6fa70dbeea2a932ac38ae2d93e3041566f68f1b10d7b9b15806c9348306 sof-v2.1.1a/./intel-signed/sof-cnl.ri -acb16f18f2e4f572ad51865bc8e783f085d0e4188f2b012db3f28550099261ce sof-v2.1.1a/./intel-signed/sof-ehl.ri -59aa8acab8ec4e55c69c6a0739330b538e49b5ba14c1743a814dd04f7ba571d8 sof-v2.1.1a/./intel-signed/sof-icl.ri -0b19633207ac7d4c606586b53eb5b0934e08fe40e4eab9b37a777a24e83e86f1 sof-v2.1.1a/./intel-signed/sof-jsl.ri -f74c1c3586a73df0dd469b16d5e283178579c6f1a8f59667524a7b20bfa8ec52 sof-v2.1.1a/./intel-signed/sof-tgl-h.ri -d94a423b3eceaf4d28821159f08e95b4e66b8c457c20fa80c2b57015d561905c sof-v2.1.1a/./intel-signed/sof-tgl.ri -e8b5e4fa027ea880baec228b7454cfe937ff91938038cc6ea6d111da7f1d5049 sof-v2.1.1a/./sof-apl.ldc -2081977784980805f517c265befc3f75532daacbfcf06cabd29084ea0e968b08 sof-v2.1.1a/./sof-bdw.ldc -d78f313b33a63680b4608431029788b52c90d5af8c368a14539e2f025cce5062 sof-v2.1.1a/./sof-bdw.ri -ea34fdc893c1e8a7ab33ac8ee387c88dd55894ba1b5b167590b870b62a95c382 sof-v2.1.1a/./sof-byt.ldc -7ae21ed51bbfd91792f30ae2121c0886e22a3ea00aba2ee92e17d585b38613d2 sof-v2.1.1a/./sof-byt.ri -ea34fdc893c1e8a7ab33ac8ee387c88dd55894ba1b5b167590b870b62a95c382 sof-v2.1.1a/./sof-cht.ldc -870b833f3d02e04d0e5ed30f4a78c73566899fc86e1f65ed0a6fd4f468baead2 sof-v2.1.1a/./sof-cht.ri -0eec9d9aba71bee01caadd2b4801e085c0527beef6ca39da47346d57b94febe2 sof-v2.1.1a/./sof-cnl.ldc -ba82bdbc813714939cebf9428cd9395488d39958b15a5afe56b48a699390f024 sof-v2.1.1a/./sof-icl.ldc -a7edc72857cf0a8f80b80034c9db6d5928630e0884bdffbe51bb060078c59157 sof-v2.1.1a/./sof-jsl.ldc -6bd47e2b8f0eeb0427b38ca7674277a91c0d864cfcf7063c17837c8d0e05f2ea sof-v2.1.1a/./sof-tgl-h.ldc -6bd47e2b8f0eeb0427b38ca7674277a91c0d864cfcf7063c17837c8d0e05f2ea sof-v2.1.1a/./sof-tgl.ldc -96fe201e988d935c458ea1fd6f5712555ddeee1d96bcdfb1cd9f0045c3f8925f tools-v2.1.1a/./sof-logger +076b5b8a7a85016915951f2cb01b9591e8eaad53d143bf827be3ec2990cc9559 sof-tplg/./sof-adl-rt1316-l12-rt714-l0.tplg +a37b0b005930ba7348f7281c7351e78e602c50a1f6b7012a9df8e168b2dd63a5 sof-tplg/./sof-adl-rt1316-l2-mono-rt714-l0.tplg +4ca91811d7bc7b157739ce6ad79e9f4197e17c39583d60976fde45ae2dda03be sof-tplg/./sof-adl-rt1316-l2-mono-rt714-l3.tplg +1a043202b7d8e24735996ec0de8f9353303c57c13cdbef5770504b1ebc33af5a sof-tplg/./sof-adl-rt711-l0-rt1308-l12-rt715-l3.tplg +1a043202b7d8e24735996ec0de8f9353303c57c13cdbef5770504b1ebc33af5a sof-tplg/./sof-adl-rt711-l0-rt1316-l12-rt714-l3.tplg +2d7132baa504e9a588f626bb8b865d78b19c98cb1923a03c8d2cab752d228e3c sof-tplg/./sof-adl-rt711-l0-rt1316-l13-rt714-l2.tplg +11e07fa6d37e726127559cc6799ef7f73aff04868adf0d28a4d0aaa7a2c8cbc1 sof-tplg/./sof-adl-rt711-l2-rt1316-l01-rt714-l3.tplg +85281ce60cd07c0b7d541d43782505f896064f75272e45566847e0f9f5cdb02f sof-tplg/./sof-adl-rt711-l2-rt1316-l01.tplg +3af494e1092c876155e05e04262c528f92257aa22e767c4dc409883ffca229ee sof-tplg/./sof-cml-rt711-rt1308-mono-rt715.tplg +1a043202b7d8e24735996ec0de8f9353303c57c13cdbef5770504b1ebc33af5a sof-tplg/./sof-cml-rt711-rt1308-rt715.tplg +1a043202b7d8e24735996ec0de8f9353303c57c13cdbef5770504b1ebc33af5a sof-tplg/./sof-icl-rt711-rt1308-rt715.tplg +3af494e1092c876155e05e04262c528f92257aa22e767c4dc409883ffca229ee sof-tplg/./sof-tgl-rt711-l0-rt1316-l1-mono-rt714-l3.tplg +3af494e1092c876155e05e04262c528f92257aa22e767c4dc409883ffca229ee sof-tplg/./sof-tgl-rt711-rt1308-mono-rt715.tplg +1a043202b7d8e24735996ec0de8f9353303c57c13cdbef5770504b1ebc33af5a sof-tplg/./sof-tgl-rt711-rt1308-rt715.tplg +1a043202b7d8e24735996ec0de8f9353303c57c13cdbef5770504b1ebc33af5a sof-tplg/./sof-tgl-rt711-rt1316-rt714.tplg +b413c1fbda747034c3f796e7ff4da10ba985c7fe2062b5087233666a3212dbad sof-tplg/./sof-tgl-rt715-rt711-rt1308-mono.tplg +ed32cc8e67d453da7873a0e0ee43a26e0447b83a0b980a5f62a5ab600cac2f34 sof/./community/sof-apl.ri +310799f69388a58881f9c0ded25496e4789fad714157ed7261d197e768069914 sof/./community/sof-cnl.ri +1d0a5fc5aba09359744c6e596c7eb919728f637665130a8082993f1322cb68df sof/./community/sof-icl.ri +e20540a41ac8be7718ea17263f495824ab6ca04ec5062c0048942ef69d10d29b sof/./community/sof-jsl.ri +2ab7fc689cc7f560bd209fbdcd6e5c38e536e9b9435963943a34cdd34df990d4 sof/./community/sof-tgl-h.ri +700848108549ea32c020fa506d58a75f8c03adf6fd014600edb9de4858d7e8ef sof/./community/sof-tgl.ri +8433390e4abfe40b251ff3dec41604e7b817501d1097d51aa2f51c11444d3bf0 sof/./intel-signed/sof-adl-n.ri +1bddc1c6e26de3ae37f914305a0d619fa51e1b2fa3ebc5a64550b3464cf13188 sof/./intel-signed/sof-adl-s.ri +294e5a51b1d3fc4ceda57780927c2a2ec95bb5d23477f879a9fb648c6c01cb30 sof/./intel-signed/sof-adl.ri +4d97921846fe979b1295cfd46a62f159b118e70e9aa8fefe91820a7a2431d018 sof/./intel-signed/sof-apl.ri +3e23a6fa70dbeea2a932ac38ae2d93e3041566f68f1b10d7b9b15806c9348306 sof/./intel-signed/sof-cnl.ri +acb16f18f2e4f572ad51865bc8e783f085d0e4188f2b012db3f28550099261ce sof/./intel-signed/sof-ehl.ri +59aa8acab8ec4e55c69c6a0739330b538e49b5ba14c1743a814dd04f7ba571d8 sof/./intel-signed/sof-icl.ri +0b19633207ac7d4c606586b53eb5b0934e08fe40e4eab9b37a777a24e83e86f1 sof/./intel-signed/sof-jsl.ri +f74c1c3586a73df0dd469b16d5e283178579c6f1a8f59667524a7b20bfa8ec52 sof/./intel-signed/sof-tgl-h.ri +d94a423b3eceaf4d28821159f08e95b4e66b8c457c20fa80c2b57015d561905c sof/./intel-signed/sof-tgl.ri +e8b5e4fa027ea880baec228b7454cfe937ff91938038cc6ea6d111da7f1d5049 sof/./sof-apl.ldc +2081977784980805f517c265befc3f75532daacbfcf06cabd29084ea0e968b08 sof/./sof-bdw.ldc +d78f313b33a63680b4608431029788b52c90d5af8c368a14539e2f025cce5062 sof/./sof-bdw.ri +ea34fdc893c1e8a7ab33ac8ee387c88dd55894ba1b5b167590b870b62a95c382 sof/./sof-byt.ldc +7ae21ed51bbfd91792f30ae2121c0886e22a3ea00aba2ee92e17d585b38613d2 sof/./sof-byt.ri +ea34fdc893c1e8a7ab33ac8ee387c88dd55894ba1b5b167590b870b62a95c382 sof/./sof-cht.ldc +870b833f3d02e04d0e5ed30f4a78c73566899fc86e1f65ed0a6fd4f468baead2 sof/./sof-cht.ri +0eec9d9aba71bee01caadd2b4801e085c0527beef6ca39da47346d57b94febe2 sof/./sof-cnl.ldc +ba82bdbc813714939cebf9428cd9395488d39958b15a5afe56b48a699390f024 sof/./sof-icl.ldc +a7edc72857cf0a8f80b80034c9db6d5928630e0884bdffbe51bb060078c59157 sof/./sof-jsl.ldc +6bd47e2b8f0eeb0427b38ca7674277a91c0d864cfcf7063c17837c8d0e05f2ea sof/./sof-tgl-h.ldc +6bd47e2b8f0eeb0427b38ca7674277a91c0d864cfcf7063c17837c8d0e05f2ea sof/./sof-tgl.ldc +96fe201e988d935c458ea1fd6f5712555ddeee1d96bcdfb1cd9f0045c3f8925f tools/./sof-logger diff --git a/tests/tests.bats b/tests/tests.bats index e0a55f2..3ab1a65 100644 --- a/tests/tests.bats +++ b/tests/tests.bats @@ -38,11 +38,11 @@ teardown() } @test "tarball_multi_releases single 2.1.1" { - test_tarball_multi_single v2.1.x v2.1.1 + test_tarball_multi_single_pre27 v2.1.x v2.1.1 } @test "tarball_multi_releases single 1.8" { - test_tarball_multi_single v1.8.x v1.8 + test_tarball_multi_single_pre27 v1.8.x v1.8 } @test "tarball_topologies_only 2.2.1" { @@ -148,7 +148,7 @@ test_install_one_version() get_release "$ver"/sof-bin-"$ver".tar.gz - "$TOP_DIR"/tarball_multi_releases.bash -g "$ver" \ + "$TOP_DIR"/tarball_multi_releases.bash -d -g "$ver" \ v2.2.x/sof-v2.2 v2.2.x/tools-v2.2 \ v2.2.x/sof-tplg-v2.2.1/ v2.2.x/sof-"$ver" tar xf sof-bin-"$ver".tar.gz @@ -158,6 +158,7 @@ test_install_one_version() popd || exit 1 } +# TODO: add a test_multi for v2.7 or above # You MUST call popd at the end test_init() @@ -184,14 +185,14 @@ test_tarball_one_version() # Test the ability of the newer "multi" script to recreate older, single # version releases that were created with the older # tarball_one_version.sh -test_tarball_multi_single() +test_tarball_multi_single_pre27() { local vdir="$1" local ver="$2" test_init get_release "$ver"/sof-bin-"$ver".tar.gz - "$TOP_DIR"/tarball_multi_releases.bash -g "$ver" \ + "$TOP_DIR"/tarball_multi_releases.bash -d -g "$ver" \ "$vdir"/sof-"$ver" "$vdir"/sof-tplg-"$ver" "$vdir"/tools-"$ver" tar xf sof-bin-"$ver".tar.gz