Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tarball_multi_releases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ main()
)

# Delete everything else
rm -r "${archive_name:?}"/* "${archive_name:?}"/.github
rm -rf "${archive_name:?}"/* "${archive_name:?}"/.github

# Move the selected things back in place
(set -x; mv _selected_versions/* "$archive_name"/ )
Expand Down Expand Up @@ -121,6 +121,8 @@ main()
radix=${d%-WIP}
( set -x; mv "$d" "${radix}-$last_ver")
done
# for install.sh convenience
touch "$last_ver"
)

local manifest_file="$archive_name"/manifest.txt
Expand Down
33 changes: 31 additions & 2 deletions tests/tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ teardown()
test_tarball_one_version v1.8.x v1.8 v1.8
}

@test "tarball_multi_releases single 2.1.1" {
test_tarball_multi_single v2.1.x v2.1.1
}

@test "tarball_multi_releases single 1.8" {
test_tarball_multi_single v1.8.x v1.8
}

@test "tarball_topologies_only 2.2.1" {
local ver=v2.2.1
test_init
Expand All @@ -61,8 +69,7 @@ teardown()
}

@test "tarball_multi_2_1_1a" {
pushd "$RUN_DIR"/ || exit 1
load 'common_helpers.bash'; set_constants
test_init

"$TOP_DIR"/tarball_multi_releases.bash \
v2.2.x/sof-v2.2 v1.8.x/sof-v1.8-rc2 v1.9.x/tools-v1.9-rc1/ \
Expand All @@ -74,6 +81,7 @@ teardown()
popd || exit 1
}

# You MUST call popd at the end
test_init()
{
pushd "$RUN_DIR"/ || exit 1
Expand All @@ -95,6 +103,27 @@ test_tarball_one_version()
popd || exit 1
}

# 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()
{
local vdir="$1"
local ver="$2"
test_init
get_release "$ver"/sof-bin-"$ver".tar.gz

"$TOP_DIR"/tarball_multi_releases.bash -g "$ver" \
"$vdir"/sof-"$ver" "$vdir"/sof-tplg-"$ver" "$vdir"/tools-"$ver"
tar xf sof-bin-"$ver".tar.gz

# Cheat a little bit; these files are brand new.
rm sof-bin-"$ver"/manifest.txt sof-bin-"$ver"/sha256sum.txt

diff -qr "$EXTR_REFS"/sof-bin-"$ver" sof-bin-"$ver"
popd || exit 1
}

test_tarball_topologies_only()
{
local dir="$1" ver="$2"
Expand Down