diff options
author | androlo <androlo1980@gmail.com> | 2018-12-20 19:28:42 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2019-01-07 21:50:49 +0800 |
commit | b18c8a60ffc59e8664a298cc595e79951b54ebd9 (patch) | |
tree | 94258db2439bbad269230551a1bd3dedfbfb25e9 /test/cmdlineTests.sh | |
parent | 633228f1a74f9509af17ead951b0841fbffa12d3 (diff) | |
download | dexon-solidity-b18c8a60ffc59e8664a298cc595e79951b54ebd9.tar.gz dexon-solidity-b18c8a60ffc59e8664a298cc595e79951b54ebd9.tar.zst dexon-solidity-b18c8a60ffc59e8664a298cc595e79951b54ebd9.zip |
Use directories for tests.
Diffstat (limited to 'test/cmdlineTests.sh')
-rwxr-xr-x | test/cmdlineTests.sh | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index 3beee552..f8cafc52 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -217,30 +217,29 @@ test_solc_behaviour "${0}" "ctx:=/some/remapping/target" "" "" 1 "Invalid remapp printTask "Running standard JSON commandline tests..." ( - cd "$REPO_ROOT"/test/cmdlineTests/ - for file in *.json + cd "$REPO_ROOT"/test/cmdlineTests/standard_json/ + for tdir in */ do - args="--standard-json" - stdin="$REPO_ROOT/test/cmdlineTests/$file" - stdout=$(cat $file.stdout 2>/dev/null || true) - exitCode=$(cat $file.exit 2>/dev/null || true) - err=$(cat $file.err 2>/dev/null || true) - printTask " - $file" - test_solc_behaviour "" "$args" "$stdin" "$stdout" "$exitCode" "$err" + stdin="${tdir}/input.json" + stdout=$(cat ${tdir}/output.json 2>/dev/null || true) + exitCode=$(cat ${tdir}/exit 2>/dev/null || true) + err=$(cat ${tdir}/err 2>/dev/null || true) + printTask " - ${tdir}" + test_solc_behaviour "" "--standard-json" "$stdin" "$stdout" "$exitCode" "$err" done ) printTask "Running general commandline tests..." ( - cd "$REPO_ROOT"/test/cmdlineTests/ - for file in *.sol + cd "$REPO_ROOT"/test/cmdlineTests/regular_sol + for tdir in */ do - args=$(cat $file.args 2>/dev/null || true) - stdout=$(cat $file.stdout 2>/dev/null || true) - exitCode=$(cat $file.exit 2>/dev/null || true) - err=$(cat $file.err 2>/dev/null || true) - printTask " - $file" - test_solc_behaviour "$file" "$args" "" "$stdout" "$exitCode" "$err" + args=$(cat ${tdir}/args 2>/dev/null || true) + stdout=$(cat ${tdir}/output 2>/dev/null || true) + exitCode=$(cat ${tdir}/exit 2>/dev/null || true) + err=$(cat ${tdir}/err 2>/dev/null || true) + printTask " - ${tdir}" + test_solc_behaviour "${tdir}contracts.sol" "$args" "" "$stdout" "$exitCode" "$err" done ) |