diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-13 04:49:46 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-13 05:41:56 +0800 |
commit | 76b4c0e6e6d4b51ec2890e097d13e3e6e280f627 (patch) | |
tree | cdba56e9852e32ceeb1d2b612ba570160fb5adba /test/externalTests.sh | |
parent | 62b05d415765d8ca31dad7001a4a49648845aa7e (diff) | |
download | dexon-solidity-76b4c0e6e6d4b51ec2890e097d13e3e6e280f627.tar.gz dexon-solidity-76b4c0e6e6d4b51ec2890e097d13e3e6e280f627.tar.zst dexon-solidity-76b4c0e6e6d4b51ec2890e097d13e3e6e280f627.zip |
Properly download branches of external Zeppelin/Gnosis tests
Diffstat (limited to 'test/externalTests.sh')
-rwxr-xr-x | test/externalTests.sh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/test/externalTests.sh b/test/externalTests.sh index 994508f6..3599e069 100755 --- a/test/externalTests.sh +++ b/test/externalTests.sh @@ -40,14 +40,24 @@ function test_truffle { name="$1" repo="$2" + branch="$3" echo "Running $name tests..." DIR=$(mktemp -d) ( - git clone --depth 1 "$repo" "$DIR" + if [ -n "$branch" ] + then + echo "Cloning $branch of $repo..." + git clone --depth 1 "$repo" -b "$branch" "$DIR" + else + echo "Cloning $repo..." + git clone --depth 1 "$repo" "$DIR" + fi cd "$DIR" + echo "Current commit hash: `git rev-parse HEAD`" npm install find . -name soljson.js -exec cp "$SOLJSON" {} \; if [ "$name" == "Gnosis" ]; then + echo "Replaced fixed-version pragmas..." # Replace fixed-version pragmas in Gnosis (part of Consensys best practice) find contracts test -name '*.sol' -type f -print0 | xargs -0 sed -i -e 's/pragma solidity 0/pragma solidity ^0/' fi @@ -57,5 +67,5 @@ function test_truffle } # Using our temporary fork here. Hopefully to be merged into upstream after the 0.5.0 release. -test_truffle Zeppelin https://github.com/axic/openzeppelin-solidity.git -b solidity-050 -test_truffle Gnosis https://github.com/axic/pm-contracts.git -b solidity-050 +test_truffle Zeppelin https://github.com/axic/openzeppelin-solidity.git solidity-050 +test_truffle Gnosis https://github.com/axic/pm-contracts.git solidity-050 |