aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-11-02 19:32:55 +0800
committerchriseth <c@ethdev.com>2016-11-12 02:59:31 +0800
commit061b50ae19b0f8b9dcffc8dab5f08c4e26e884fb (patch)
tree0a641e8964614d486dd425869a38f9c97bd13b99 /scripts
parenta40dcfef1257c4b159eb8248ecb0f837b42d8ead (diff)
downloaddexon-solidity-061b50ae19b0f8b9dcffc8dab5f08c4e26e884fb.tar.gz
dexon-solidity-061b50ae19b0f8b9dcffc8dab5f08c4e26e884fb.tar.zst
dexon-solidity-061b50ae19b0f8b9dcffc8dab5f08c4e26e884fb.zip
Add tests for the std files.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/tests.sh17
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/tests.sh b/scripts/tests.sh
index 93afd2d2..5fa75d4d 100755
--- a/scripts/tests.sh
+++ b/scripts/tests.sh
@@ -28,8 +28,21 @@
set -e
-# There is an implicit assumption here that we HAVE to run from root directory.
-REPO_ROOT=$(pwd)
+REPO_ROOT="$(dirname "$0")"/..
+
+ # Compile all files in std and examples.
+
+for f in "$REPO_ROOT"/std/*.sol
+do
+ echo "Compiling $f..."
+ set +e
+ output=$("$REPO_ROOT"/build/solc/solc "$f" 2>&1)
+ failed=$?
+ output=$(echo "$output" | grep -v 'pre-release')
+ echo "$output"
+ set -e
+ test -z "$output" -a "$failed" -eq 0
+done
# This conditional is only needed because we don't have a working Homebrew
# install for `eth` at the time of writing, so we unzip the ZIP file locally