diff --git a/scripts/common.sh b/scripts/common.sh index fbb730241..797510d33 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -37,21 +37,21 @@ safe_kill() local n=1 # only proceed if $PID does exist - kill -0 $PID 2>/dev/null || return + kill -0 "$PID" 2>/dev/null || return echo "Sending SIGTERM to ${NAME} (${PID}) ..." - kill $PID + kill "$PID" # wait until process terminated gracefully - while kill -0 $PID 2>/dev/null && [[ $n -le 4 ]]; do + while kill -0 "$PID" 2>/dev/null && [[ $n -le 4 ]]; do echo "Waiting ($n) ..." sleep 1 n=$[n + 1] done # process still alive? then hard-kill - if kill -0 $PID 2>/dev/null; then + if kill -0 "$PID" 2>/dev/null; then echo "Sending SIGKILL to ${NAME} (${PID}) ..." - kill -9 $PID + kill -9 "$PID" fi } diff --git a/test/externalTests.sh b/test/externalTests.sh index 7bf3eb76b..e53f9925a 100755 --- a/test/externalTests.sh +++ b/test/externalTests.sh @@ -42,10 +42,10 @@ source test/externalTests/common.sh printTask "Running external tests..." -$REPO_ROOT/externalTests/zeppelin.sh "$SOLJSON" -$REPO_ROOT/externalTests/gnosis.sh "$SOLJSON" -$REPO_ROOT/externalTests/colony.sh "$SOLJSON" -$REPO_ROOT/externalTests/ens.sh "$SOLJSON" +"$REPO_ROOT/externalTests/zeppelin.sh" "$SOLJSON" +"$REPO_ROOT/externalTests/gnosis.sh" "$SOLJSON" +"$REPO_ROOT/externalTests/colony.sh" "$SOLJSON" +"$REPO_ROOT/externalTests/ens.sh" "$SOLJSON" # Disabled temporarily as it needs to be updated to latest Truffle first. #test_truffle Gnosis https://github.com/axic/pm-contracts.git solidity-050 diff --git a/test/externalTests/solc-js/solc-js.sh b/test/externalTests/solc-js/solc-js.sh index db01a2ae7..fd59c4398 100755 --- a/test/externalTests/solc-js/solc-js.sh +++ b/test/externalTests/solc-js/solc-js.sh @@ -41,10 +41,10 @@ function solcjs_test echo "require('./determinism.js');" >> test/index.js printLog "Copying determinism.js..." - cp -f $SOLCJS_INPUT_DIR/determinism.js test/ + cp -f "$SOLCJS_INPUT_DIR/determinism.js" test/ printLog "Copying contracts..." - cp -Rf $SOLCJS_INPUT_DIR/DAO test/ + cp -Rf "$SOLCJS_INPUT_DIR/DAO" test/ printLog "Copying SMTChecker tests..." cp -Rf "$TEST_DIR"/test/libsolidity/smtCheckerTests test/ @@ -52,7 +52,7 @@ function solcjs_test # Update version (needed for some tests) echo "Updating package.json to version $VERSION" - npm version --allow-same-version --no-git-tag-version $VERSION + npm version --allow-same-version --no-git-tag-version "$VERSION" run_test compile_fn test_fn }