diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2016-11-15 07:39:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-15 07:39:42 +0800 |
commit | 42617cb8ddc844e3b721d25ed1096d206145b59b (patch) | |
tree | 616c595db3a53a401ed27e4a36f795b3c7f19a58 | |
parent | bdbc4fc82d7ce7e48a180d4bb79cc44b7025cefe (diff) | |
parent | 3dbf2830ca96922a3aec954ea9d7251f2bc02eed (diff) | |
download | dexon-solidity-42617cb8ddc844e3b721d25ed1096d206145b59b.tar dexon-solidity-42617cb8ddc844e3b721d25ed1096d206145b59b.tar.gz dexon-solidity-42617cb8ddc844e3b721d25ed1096d206145b59b.tar.bz2 dexon-solidity-42617cb8ddc844e3b721d25ed1096d206145b59b.tar.lz dexon-solidity-42617cb8ddc844e3b721d25ed1096d206145b59b.tar.xz dexon-solidity-42617cb8ddc844e3b721d25ed1096d206145b59b.tar.zst dexon-solidity-42617cb8ddc844e3b721d25ed1096d206145b59b.zip |
Merge pull request #1317 from ethereum/timelock
Compile all contracts in the std directory
-rwxr-xr-x | scripts/tests.sh | 18 | ||||
-rw-r--r-- | std/StandardToken.sol | 2 | ||||
-rw-r--r-- | std/Token.sol | 2 | ||||
-rw-r--r-- | std/mortal.sol | 2 | ||||
-rw-r--r-- | std/owned.sol | 2 | ||||
-rw-r--r-- | std/std.sol | 2 |
6 files changed, 26 insertions, 2 deletions
diff --git a/scripts/tests.sh b/scripts/tests.sh index 93afd2d2..5da427d4 100755 --- a/scripts/tests.sh +++ b/scripts/tests.sh @@ -28,8 +28,22 @@ 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=$? + # Remove the pre-release warning from the compiler output + 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 diff --git a/std/StandardToken.sol b/std/StandardToken.sol index 41f2d709..4ff1b8f9 100644 --- a/std/StandardToken.sol +++ b/std/StandardToken.sol @@ -1,3 +1,5 @@ +pragma solidity ^0.4.0; + import "./Token.sol"; contract StandardToken is Token { diff --git a/std/Token.sol b/std/Token.sol index 396dbf9e..59566f26 100644 --- a/std/Token.sol +++ b/std/Token.sol @@ -1,3 +1,5 @@ +pragma solidity ^0.4.0; + contract Token { event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); diff --git a/std/mortal.sol b/std/mortal.sol index 8de019ab..f0a6f4ce 100644 --- a/std/mortal.sol +++ b/std/mortal.sol @@ -1,3 +1,5 @@ +pragma solidity ^0.4.0; + import "./owned.sol"; contract mortal is owned { diff --git a/std/owned.sol b/std/owned.sol index 3d7674f5..bbb8d957 100644 --- a/std/owned.sol +++ b/std/owned.sol @@ -1,3 +1,5 @@ +pragma solidity ^0.4.0; + contract owned { address owner; diff --git a/std/std.sol b/std/std.sol index c3f66b1b..4d65bef2 100644 --- a/std/std.sol +++ b/std/std.sol @@ -1,3 +1,5 @@ +pragma solidity ^0.4.0; + import "./owned.sol"; import "./mortal.sol"; import "./Token.sol"; |