Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for new, IPC4 tarball_multi_release.sh 2023.9 #146

Merged
merged 2 commits into from
Oct 3, 2023
Merged
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
35 changes: 31 additions & 4 deletions tests/tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ test_install_one_version()
# that's what we're testing here!
cp "$TOP_DIR"/install.sh ./sof-bin-"$ver"/

# Work from a copy to preserve the extracted tarball pristine, see below.
# Work from a $fromdir copy to preserve the extracted tarball pristine, see below.
# Use some white space in dir names to catch quoting issues.
local fromdir="./from sof-bin $ver"/
rsync -a ./sof-bin-"$ver"/ "$fromdir"
Expand All @@ -110,18 +110,24 @@ test_install_one_version()
}

mkdir "$todir" "$todir"/tools
pwd
printf "'%s/install.sh' '%s' (todir='%s')\n" \
"$fromdir" "$fromdir/$ver" "$todir"
FW_DEST="$todir" TOOLS_DEST="$todir"/tools "$fromdir"/install.sh "$fromdir/$ver"

# Nothing must have changed in the extracted tarball $fromdir
diff -qr ./sof-bin-"$ver"/ "$fromdir"
# Before even looking at what we just installed, make sure no
# unexpected accident polluted our $fromdir copy
diff -qr "$fromdir" ./sof-bin-"$ver"/

local refdir="$fromdir"
# to compare with the (potentially dirty) git checkout:
# local refdir="$TOP_DIR/$vdir"

# At last check that install.sh copied firmware, topologies,...
for suffix in '' -tplg; do
diff -qr "$refdir/sof${suffix}-$ver"/ "$todir"/sof"$suffix"/
done
# ... and tools.
diff -qr "$refdir/tools-$ver"/ "$todir"/tools/

popd || exit 1
Expand Down Expand Up @@ -158,7 +164,28 @@ test_install_one_version()
popd || exit 1
}

# TODO: add a test_multi for v2.7 or above and a corresponding install.sh test
# First release with v2.7
@test "tarball_multi 2023.09" {
local ver=2023.09
test_init

get_release v"$ver"/sof-bin-"$ver".tar.gz

"$TOP_DIR"/tarball_multi_releases.bash -r $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-tplg-v2.2.3 v2.2.x/sof-tplg-v2.2.4 \
v2.2.x/sof-tplg-v2.2.5 v2.2.x/sof-tplg-v2.2.6 v2.2.x/sof-tplg-v2.2.7 \
v2.7.x/sof-ace-tplg-v2.7 \
v2.7.x/sof-ipc4-v2.7 \
v2.7.x/tools-v2.7

tar xf sof-bin-"$ver".tar.gz

diff -qr "$EXTR_REFS"/sof-bin-"$ver" "$(pwd)/sof-bin-$ver"/

popd || exit 1
}


# You MUST call popd at the end
test_init()
Expand Down
Loading