Include non-fuzzing fuzzer tests in commandline run.

This commit is contained in:
chriseth 2017-02-16 17:13:55 +01:00
parent f93f9fa3a0
commit 8be318e75b

View File

@ -31,7 +31,7 @@ set -e
REPO_ROOT="$(dirname "$0")"/.. REPO_ROOT="$(dirname "$0")"/..
SOLC="$REPO_ROOT/build/solc/solc" SOLC="$REPO_ROOT/build/solc/solc"
# Compile all files in std and examples. # Compile all files in std and examples.
for f in "$REPO_ROOT"/std/*.sol for f in "$REPO_ROOT"/std/*.sol
do do
@ -46,6 +46,21 @@ do
test -z "$output" -a "$failed" -eq 0 test -z "$output" -a "$failed" -eq 0
done done
# Test library checksum echo "Testing library checksum..."
echo 'contact C {}' | "$SOLC" --link --libraries a:0x90f20564390eAe531E810af625A22f51385Cd222 echo '' | "$SOLC" --link --libraries a:0x90f20564390eAe531E810af625A22f51385Cd222
! echo 'contract C {}' | "$SOLC" --link --libraries a:0x80f20564390eAe531E810af625A22f51385Cd222 2>/dev/null ! echo '' | "$SOLC" --link --libraries a:0x80f20564390eAe531E810af625A22f51385Cd222 2>/dev/null
echo "Testing soljson via the fuzzer..."
TMPDIR=$(mktemp -d)
(
cd "$REPO_ROOT"
REPO_ROOT=$(pwd) # make it absolute
cd "$TMPDIR"
"$REPO_ROOT"/scripts/isolate_tests.py "$REPO_ROOT"/test/contracts/* "$REPO_ROOT"/test/libsolidity/*EndToEnd*
for f in *.sol
do
"$REPO_ROOT"/build/test/solfuzzer < "$f"
done
)
rm -rf "$TMPDIR"
echo "Done."