-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for shellcheck warnings, part 1 #10586
Changes from all commits
8c57c7c
4c18632
1c7cc37
75b87d1
d14c428
2784135
a05f3a6
dbfd3db
4e3ebda
62bf467
7d845c0
04302d4
e8a70e8
87f9eba
c8fc241
cf94c3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ TESTED=0 | |
|
||
if [ "$(ls | wc -l)" -ne 0 ]; then | ||
echo "Test directory not empty. Skipping!" | ||
exit -1 | ||
exit 1 | ||
fi | ||
|
||
# function tests whether exporting and importing again leaves the JSON ast unchanged | ||
|
@@ -45,8 +45,7 @@ function testImportExportEquivalence { | |
# save exported json as expected result (silently) | ||
$SOLC --combined-json ast,compact-format --pretty-json "$nth_input_file" "${all_input_files[@]}" > expected.json 2> /dev/null | ||
# import it, and export it again as obtained result (silently) | ||
$SOLC --import-ast --combined-json ast,compact-format --pretty-json expected.json > obtained.json 2> /dev/null | ||
if [ $? -ne 0 ] | ||
if ! $SOLC --import-ast --combined-json ast,compact-format --pretty-json expected.json > obtained.json 2> /dev/null | ||
then | ||
# For investigating, use exit 1 here so the script stops at the | ||
# first failing test | ||
|
@@ -61,9 +60,9 @@ function testImportExportEquivalence { | |
then | ||
echo -e "ERROR: JSONS differ for $1: \n $DIFF \n" | ||
echo "Expected:" | ||
echo "$(cat ./expected.json)" | ||
cat ./expected.json | ||
echo "Obtained:" | ||
echo "$(cat ./obtained.json)" | ||
cat ./obtained.json | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also this is pretty clearly not breaking anything? |
||
else | ||
# Use user supplied diff view binary | ||
$DIFFVIEW expected.json obtained.json | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -eu | ||
|
||
REPO_ROOT="$(dirname "$0")"/../.. | ||
REPO_ROOT=$(realpath "${REPO_ROOT}") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,10 @@ | ||
./test/cmdlineTests.sh | ||
./scripts/wasm-rebuild/docker-scripts/rebuild_tags.sh | ||
./scripts/wasm-rebuild/docker-scripts/rebuild_current.sh | ||
./scripts/wasm-rebuild/docker-scripts/genbytecode.sh | ||
./scripts/ci/build_emscripten.sh | ||
./scripts/docs_version_pragma_check.sh | ||
./scripts/uniqueErrors.sh | ||
./scripts/tests.sh | ||
./scripts/bytecodecompare/storebytecode.sh | ||
./scripts/deps-ppa/static_z3.sh | ||
./scripts/ASTImportTest.sh | ||
./scripts/install_static_z3.sh | ||
./scripts/install_deps.sh | ||
./scripts/common_cmdline.sh | ||
./scripts/docker_deploy_manual.sh | ||
./scripts/endToEndExtraction/create_traces.sh | ||
./scripts/release_ppa.sh | ||
./scripts/create_source_tarball.sh | ||
./.circleci/soltest.sh | ||
./.circleci/soltest_all.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
BASE_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 || exit ; pwd -P )" | ||
#!/usr/bin/env bash | ||
set -eu | ||
|
||
BASE_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 && pwd -P )" | ||
|
||
mkdir -p build | ||
cd build || exit | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why were these removed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because I added |
||
cd build | ||
cmake ../../../ | ||
make soltest | ||
cd test/ || exit | ||
cd test/ | ||
echo "running soltest on 'semanticTests/extracted'..." | ||
./soltest --color_output=false --log_level=test_suite -t semanticTests/extracted/ -- --testpath "${BASE_PATH}/../../test" --no-smt --evmonepath /Users/alex/evmone/lib/libevmone.dylib --show-messages --show-metadata > "${BASE_PATH}/extracted-tests.trace" | ||
echo "running soltest on 'semanticTests/extracted'... done" | ||
|
||
cd "$BASE_PATH" || exit | ||
cd "$BASE_PATH" | ||
git clone git@github.com:ethereum/solidity.git solidity-develop | ||
cd solidity-develop || exit | ||
cd solidity-develop | ||
mkdir -p build | ||
cd build || exit | ||
cd build | ||
cmake .. | ||
make soltest | ||
cd test/ || exit | ||
cd test/ | ||
echo "running soltest on 'SolidityEndToEndTest'..." | ||
./soltest --color_output=false --log_level=test_suite -t SolidityEndToEndTest/ -- --testpath "${BASE_PATH}/solidity-develop/test" --no-smt --evmonepath /Users/alex/evmone/lib/libevmone.dylib --show-messages --show-metadata > "${BASE_PATH}/endToEndExtraction-tests.trace" | ||
echo "running soltest on 'SolidityEndToEndTest'... done" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
#!/usr/bin/env bash | ||
set -eu | ||
|
||
TEMPDIR=$(mktemp -d) | ||
( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
set -eu | ||
|
||
REPO_ROOT="$(dirname "$0")"/.. | ||
USE_DEBUGGER=0 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,6 @@ for (var optimize of [false, true]) | |
} | ||
EOF | ||
chmod +x solc | ||
./solc *.sol > /tmp/report.txt | ||
./solc -- *.sol > /tmp/report.txt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why --? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you have a file that's named like a command line option, Another way to avoid that is to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah ok! |
||
) | ||
rm -rf "$TMPDIR" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we ended up with #9421 (comment) anyway...