Skip to content

Commit

Permalink
[tests] Fix installation of Musl tests
Browse files Browse the repository at this point in the history
The previous script moved the test binaries out of the build directory,
instead of copying them. As a result, every "rebuild and install" cycle
ended up rebuilding all the Musl binaries, even if their dependencies
didn't change.

Signed-off-by: Paweł Marczewski <[email protected]>
  • Loading branch information
pwmarcz committed Dec 29, 2021
1 parent 4b5c799 commit 03c8168
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
20 changes: 20 additions & 0 deletions LibOS/shim/test/regression/install_musl_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

# Usage:
#
# install_musl_tests destdir musl_a musl_b musl_c...
#
# Installs `musl_*` binaries to a target directory, removing the `musl_` prefix.

set -e

DEST_DIR="$1"
shift 1

mkdir -p ${DEST_DIR}

for file in "$@"
do
bn=`basename "${file}"`
cp "${file}" "${DEST_DIR}/${bn#musl_}"
done
2 changes: 1 addition & 1 deletion LibOS/shim/test/regression/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ endforeach

if enable_musl
meson.add_install_script(
find_program('rename_musl_tests.sh'),
find_program('install_musl_tests.sh'),
prefix / join_paths(install_dir, 'musl'),
musl_execs,
)
Expand Down
14 changes: 0 additions & 14 deletions LibOS/shim/test/regression/rename_musl_tests.sh

This file was deleted.

0 comments on commit 03c8168

Please sign in to comment.