diff --git a/test/cmdlineTests/~assembler_modes/test.sh b/test/cmdlineTests/~assembler_modes/test.sh index 21947304a..34e899328 100755 --- a/test/cmdlineTests/~assembler_modes/test.sh +++ b/test/cmdlineTests/~assembler_modes/test.sh @@ -24,7 +24,6 @@ function test_solc_assembly_output fi } -printTask "Testing assemble, yul, strict-assembly and optimize..." echo '{}' | msg_on_error --silent "$SOLC" - --assemble echo '{}' | msg_on_error --silent "$SOLC" - --yul echo '{}' | msg_on_error --silent "$SOLC" - --strict-assembly diff --git a/test/cmdlineTests/~ast_export_with_stop_after_parsing/test.sh b/test/cmdlineTests/~ast_export_with_stop_after_parsing/test.sh index d023d13e0..e6a69d28b 100755 --- a/test/cmdlineTests/~ast_export_with_stop_after_parsing/test.sh +++ b/test/cmdlineTests/~ast_export_with_stop_after_parsing/test.sh @@ -4,5 +4,4 @@ set -euo pipefail # shellcheck source=scripts/common.sh source "${REPO_ROOT}/scripts/common.sh" -printTask "Testing AST export with stop-after=parsing..." "$REPO_ROOT/test/stopAfterParseTests.sh" diff --git a/test/cmdlineTests/~ast_import_export/test.sh b/test/cmdlineTests/~ast_import_export/test.sh index 11ef33de8..d85d55b96 100755 --- a/test/cmdlineTests/~ast_import_export/test.sh +++ b/test/cmdlineTests/~ast_import_export/test.sh @@ -4,7 +4,6 @@ set -euo pipefail # shellcheck source=scripts/common.sh source "${REPO_ROOT}/scripts/common.sh" -printTask "Testing AST import/export..." SOLTMPDIR=$(mktemp -d) cd "$SOLTMPDIR" if ! "$REPO_ROOT/scripts/ASTImportTest.sh" ast diff --git a/test/cmdlineTests/~compilation_tests/test.sh b/test/cmdlineTests/~compilation_tests/test.sh index 9dc7f9ca8..d411c5ce8 100755 --- a/test/cmdlineTests/~compilation_tests/test.sh +++ b/test/cmdlineTests/~compilation_tests/test.sh @@ -6,11 +6,10 @@ source "${REPO_ROOT}/scripts/common.sh" # shellcheck source=scripts/common_cmdline.sh source "${REPO_ROOT}/scripts/common_cmdline.sh" -printTask "Compiling various other contracts and libraries..." cd "$REPO_ROOT"/test/compilationTests/ for dir in */ do - echo " - $dir" + echo " - $dir" cd "$dir" # shellcheck disable=SC2046 # These file names are not supposed to contain spaces. compileFull --expect-warnings $(find . -name '*.sol') diff --git a/test/cmdlineTests/~documentation_examples/test.sh b/test/cmdlineTests/~documentation_examples/test.sh index 8e5984d19..4d90acaf4 100755 --- a/test/cmdlineTests/~documentation_examples/test.sh +++ b/test/cmdlineTests/~documentation_examples/test.sh @@ -6,7 +6,6 @@ source "${REPO_ROOT}/scripts/common.sh" # shellcheck source=scripts/common_cmdline.sh source "${REPO_ROOT}/scripts/common_cmdline.sh" -printTask "Compiling all examples from the documentation..." SOLTMPDIR=$(mktemp -d) set -e @@ -24,7 +23,7 @@ do then continue fi - echo "$f" + echo " - Compiling example $f" opts=() # We expect errors if explicitly stated, or if imports @@ -49,4 +48,3 @@ do compileFull "${opts[@]}" "$SOLTMPDIR/$f" done rm -r "$SOLTMPDIR" -echo "Done." diff --git a/test/cmdlineTests/~library_checksum/test.sh b/test/cmdlineTests/~library_checksum/test.sh index c6d52fa45..bb5fbf51d 100755 --- a/test/cmdlineTests/~library_checksum/test.sh +++ b/test/cmdlineTests/~library_checksum/test.sh @@ -4,7 +4,6 @@ set -euo pipefail # shellcheck source=scripts/common.sh source "${REPO_ROOT}/scripts/common.sh" -printTask "Testing library checksum..." echo '' | msg_on_error --no-stdout "$SOLC" - --link --libraries a=0x90f20564390eAe531E810af625A22f51385Cd222 echo '' | "$SOLC" - --link --libraries a=0x80f20564390eAe531E810af625A22f51385Cd222 &>/dev/null && \ fail "solc --link did not reject a library address with an invalid checksum." diff --git a/test/cmdlineTests/~library_long_names/test.sh b/test/cmdlineTests/~library_long_names/test.sh index 59f179232..ad3008cdd 100755 --- a/test/cmdlineTests/~library_long_names/test.sh +++ b/test/cmdlineTests/~library_long_names/test.sh @@ -4,5 +4,4 @@ set -euo pipefail # shellcheck source=scripts/common.sh source "${REPO_ROOT}/scripts/common.sh" -printTask "Testing long library names..." echo '' | msg_on_error --no-stdout "$SOLC" - --link --libraries aveeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerylonglibraryname=0x90f20564390eAe531E810af625A22f51385Cd222 diff --git a/test/cmdlineTests/~linking/test.sh b/test/cmdlineTests/~linking/test.sh index aaa0169ef..a87dccdcc 100755 --- a/test/cmdlineTests/~linking/test.sh +++ b/test/cmdlineTests/~linking/test.sh @@ -4,7 +4,6 @@ set -euo pipefail # shellcheck source=scripts/common.sh source "${REPO_ROOT}/scripts/common.sh" -printTask "Testing linking itself..." SOLTMPDIR=$(mktemp -d) cd "$SOLTMPDIR" @@ -18,6 +17,7 @@ grep -q '//' C.bin && grep -q '__' C.bin grep -q -v '[/_]' L.bin # Now link +printf " " msg_on_error "$SOLC" --link --libraries x.sol:L=0x90f20564390eAe531E810af625A22f51385Cd222 C.bin # Now the placeholder and explanation should be gone. diff --git a/test/cmdlineTests/~overwriting_files/test.sh b/test/cmdlineTests/~overwriting_files/test.sh index afede543c..0fba60e06 100755 --- a/test/cmdlineTests/~overwriting_files/test.sh +++ b/test/cmdlineTests/~overwriting_files/test.sh @@ -4,7 +4,6 @@ set -euo pipefail # shellcheck source=scripts/common.sh source "${REPO_ROOT}/scripts/common.sh" -printTask "Testing overwriting files..." SOLTMPDIR=$(mktemp -d) # First time it works diff --git a/test/cmdlineTests/~soljson_via_fuzzer/test.sh b/test/cmdlineTests/~soljson_via_fuzzer/test.sh index 585a540c5..ae52a8bc3 100755 --- a/test/cmdlineTests/~soljson_via_fuzzer/test.sh +++ b/test/cmdlineTests/~soljson_via_fuzzer/test.sh @@ -4,7 +4,6 @@ set -euo pipefail # shellcheck source=scripts/common.sh source "${REPO_ROOT}/scripts/common.sh" -printTask "Testing soljson via the fuzzer..." SOLTMPDIR=$(mktemp -d) set -e diff --git a/test/cmdlineTests/~standard_input/test.sh b/test/cmdlineTests/~standard_input/test.sh index dde9dfedb..243e74a71 100755 --- a/test/cmdlineTests/~standard_input/test.sh +++ b/test/cmdlineTests/~standard_input/test.sh @@ -4,7 +4,6 @@ set -euo pipefail # shellcheck source=scripts/common.sh source "${REPO_ROOT}/scripts/common.sh" -printTask "Testing standard input..." SOLTMPDIR=$(mktemp -d) set +e output=$("$SOLC" --bin 2>&1) diff --git a/test/cmdlineTests/~unknown_options/test.sh b/test/cmdlineTests/~unknown_options/test.sh index b0f25b2cf..923a36be6 100755 --- a/test/cmdlineTests/~unknown_options/test.sh +++ b/test/cmdlineTests/~unknown_options/test.sh @@ -4,15 +4,12 @@ set -euo pipefail # shellcheck source=scripts/common.sh source "${REPO_ROOT}/scripts/common.sh" -printTask "Testing unknown options..." set +e output=$("$SOLC" --allow=test 2>&1) failed=$? set -e -if [ "$output" == "unrecognised option '--allow=test'" ] && [ $failed -ne 0 ] +if [[ $output != "unrecognised option '--allow=test'" ]] || (( failed == 0 )) then - echo "Passed" -else fail "Incorrect response to unknown options: $output" fi diff --git a/test/cmdlineTests/~update_bugs_by_version/test.sh b/test/cmdlineTests/~update_bugs_by_version/test.sh index 78fa8a80f..9d07f4c17 100755 --- a/test/cmdlineTests/~update_bugs_by_version/test.sh +++ b/test/cmdlineTests/~update_bugs_by_version/test.sh @@ -5,7 +5,6 @@ set -euo pipefail source "${REPO_ROOT}/scripts/common.sh" SOLTMPDIR=$(mktemp -d) -printTask "Checking that the bug list is up to date..." cp "${REPO_ROOT}/docs/bugs_by_version.json" "${SOLTMPDIR}/original_bugs_by_version.json" "${REPO_ROOT}/scripts/update_bugs_by_version.py" diff --git a/test/cmdlineTests/~via_ir_equivalence/test.sh b/test/cmdlineTests/~via_ir_equivalence/test.sh index 65cdf7fe2..24c784bb8 100755 --- a/test/cmdlineTests/~via_ir_equivalence/test.sh +++ b/test/cmdlineTests/~via_ir_equivalence/test.sh @@ -15,7 +15,7 @@ function test_via_ir_equivalence() [[ $optimize_flag == --optimize || $optimize_flag == "" ]] || assertFail "The second argument must be --optimize if present." local output_file_prefix - output_file_prefix=$(basename "$1" .sol) + output_file_prefix=$(basename "$solidity_file" .sol) local optimizer_flags=() [[ $optimize_flag == "" ]] || optimizer_flags+=("$optimize_flag") @@ -65,7 +65,6 @@ function test_via_ir_equivalence() rm -r "$SOLTMPDIR" } -printTask "Testing the eqivalence of --via-ir and a two-stage compilation..." externalContracts=( externalTests/solc-js/DAO/TokenCreation.sol libsolidity/semanticTests/externalContracts/_prbmath/PRBMathSD59x18.sol @@ -87,10 +86,10 @@ for contractFile in "${externalContracts[@]}" do if ! [[ "${requiresOptimizer[*]}" =~ $contractFile ]] then - printTask " - ${contractFile}" + printTask " - ${contractFile}" test_via_ir_equivalence "${REPO_ROOT}/test/${contractFile}" fi - printTask " - ${contractFile} (optimized)" + printTask " - ${contractFile} (optimized)" test_via_ir_equivalence "${REPO_ROOT}/test/${contractFile}" --optimize done