diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2024-11-14 00:36:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-14 00:36:06 -0500 |
commit | 613bfff7ffae94b76c9d3bd46b50b42ea4ceb164 (patch) | |
tree | 7adbd4a95963d61b02c652a27de855a0d538a9bd /tests/setup.sh | |
parent | 52e6d0f495023c0aa939bf6b2170ca5ea853202b (diff) | |
parent | 836cc753ea22fd8a3d152f2b00dae971ee3dc943 (diff) | |
download | stasis-613bfff7ffae94b76c9d3bd46b50b42ea4ceb164.tar.gz |
Merge pull request #69 from jhunkeler/workaround-shebang-nightmare
Workaround for shebang nightmare
Diffstat (limited to 'tests/setup.sh')
-rw-r--r-- | tests/setup.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/setup.sh b/tests/setup.sh index 50209ae..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 @@ -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 @@ -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 "#" @@ -282,4 +282,4 @@ clean_up() { else exit 0 fi -}
\ No newline at end of file +} |