From 23f96e574b756339911103816c3b1a582a27f69b Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 11 Nov 2024 13:08:19 -0500 Subject: Change PREFIX to INSTALL_DIR * Conda uses PREFIX (or can use it) so it's better to avoid overriding it. --- tests/setup.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/setup.sh') diff --git a/tests/setup.sh b/tests/setup.sh index 50209ae..a56c899 100644 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -46,8 +46,8 @@ setup_workspace() { fi WORKSPACE="$(realpath $WORKSPACE)" - export PREFIX="$WORKSPACE"/local - if ! mkdir -p "$PREFIX"; then + export INSTALL_DIR="$WORKSPACE"/local + if ! mkdir -p "$INSTALL_DIR"; then echo "directory creation failed. cannot continue" >&2 return 1; fi @@ -78,7 +78,7 @@ teardown_workspace() { install_stasis() { pushd "$BUILD_DIR" - if ! cmake -DCMAKE_INSTALL_PREFIX="$PREFIX" -DCMAKE_BUILD_TYPE=Debug "${TOPDIR}"/../..; then + if ! cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DCMAKE_BUILD_TYPE=Debug "${TOPDIR}"/../..; then echo "cmake failed" >&2 return 1 fi @@ -88,7 +88,7 @@ install_stasis() { return 1 fi - export PATH="$PREFIX/bin:$PATH" + export PATH="$INSTALL_DIR/bin:$PATH" hash -r if ! type -P stasis; then echo "stasis program not on PATH" >&2 @@ -282,4 +282,4 @@ clean_up() { else exit 0 fi -} \ No newline at end of file +} -- cgit From 2c0b70aa52a96156f70e895c4113620c7de12e27 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 11 Nov 2024 14:53:13 -0500 Subject: Use built in method for "if file size is greater than zero" check --- tests/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/setup.sh') diff --git a/tests/setup.sh b/tests/setup.sh index a56c899..08e0de5 100644 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -120,7 +120,7 @@ run_command() { (( STASIS_TEST_RESULT_SKIP++ )) else echo "... FAIL" - if (( $(wc -c "$logfile" | cut -d ' ' -f 1) > 1 )); then + if [[ -s "$logfile" ]]; then echo "#" echo "# Last $lines_on_error line(s) follow:" echo "#" -- cgit From 47c74c23d5a04c4a6d22276e99d0e486a9a8f151 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 13 Nov 2024 00:52:52 -0500 Subject: Shorten workspace names and paths --- tests/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/setup.sh') diff --git a/tests/setup.sh b/tests/setup.sh index 08e0de5..7e38cf9 100644 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -32,7 +32,7 @@ popd() { command popd 1>/dev/null } -WS_DEFAULT="workspaces/rt_workspace_" +WS_DEFAULT="ws/_" setup_workspace() { if [ -z "$1" ]; then echo "setup_workspace requires a name argument" >&2 -- cgit