From 9f1348d7c742b52413e565e4ba2b5d9b7ccc7850 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Wed, 27 Nov 2019 12:17:27 +0100 Subject: [PATCH 1/6] Switches to Colony dappsys fork. --- test/externalTests/colony.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/externalTests/colony.sh b/test/externalTests/colony.sh index 0c3922272..7d90ac79d 100755 --- a/test/externalTests/colony.sh +++ b/test/externalTests/colony.sh @@ -39,7 +39,7 @@ function colony_test cd lib rm -Rf dappsys - git clone https://github.com/erak/dappsys-monolithic.git -b callvalue-payable-fix dappsys + git clone https://github.com/erak/dappsys-monolithic.git -b master_060 dappsys cd .. truffle_run_test compile_fn test_fn From 3f00a0fc8c903dde79346f4d4fae7582c1fecc00 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Wed, 27 Nov 2019 12:32:54 +0100 Subject: [PATCH 2/6] Fixes wrong URL of Zeppelin fork. --- test/externalTests/zeppelin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/externalTests/zeppelin.sh b/test/externalTests/zeppelin.sh index d4a909636..8eadf68e8 100755 --- a/test/externalTests/zeppelin.sh +++ b/test/externalTests/zeppelin.sh @@ -31,7 +31,7 @@ function test_fn { npm run test; } function zeppelin_test { OPTIMIZER_LEVEL=1 - truffle_setup https://github.com/erak/openzeppelin-solidity.git master_060 + truffle_setup https://github.com/erak/openzeppelin-contracts.git master_060 run_install install_fn CONFIG="truffle-config.js" From 40b58adcdb4f5d14b10557742128721d7aabc545 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Thu, 28 Nov 2019 22:12:42 +0100 Subject: [PATCH 3/6] Fixes solc path override in Truffle config. --- test/externalTests/colony.sh | 4 ++-- test/externalTests/common.sh | 5 ++++- test/externalTests/gnosis.sh | 3 ++- test/externalTests/zeppelin.sh | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/test/externalTests/colony.sh b/test/externalTests/colony.sh index 7d90ac79d..66231eb99 100755 --- a/test/externalTests/colony.sh +++ b/test/externalTests/colony.sh @@ -32,11 +32,11 @@ function colony_test { OPTIMIZER_LEVEL=3 FORCE_ABIv2=false + CONFIG="truffle.js" + truffle_setup https://github.com/erak/colonyNetwork.git develop_060 run_install install_fn - CONFIG=$(find_truffle_config) - cd lib rm -Rf dappsys git clone https://github.com/erak/dappsys-monolithic.git -b master_060 dappsys diff --git a/test/externalTests/common.sh b/test/externalTests/common.sh index c719cb92d..f3085e27f 100644 --- a/test/externalTests/common.sh +++ b/test/externalTests/common.sh @@ -202,6 +202,10 @@ function run_install { local init_fn="$1" printLog "Running install function..." + + replace_version_pragmas + force_solc "$CONFIG" "$DIR" "$SOLJSON" + $init_fn } @@ -225,7 +229,6 @@ function truffle_run_test local test_fn="$2" replace_version_pragmas - force_solc "$CONFIG" "$DIR" "$SOLJSON" printLog "Checking optimizer level..." diff --git a/test/externalTests/gnosis.sh b/test/externalTests/gnosis.sh index 8c4f88d87..d5d8cae58 100755 --- a/test/externalTests/gnosis.sh +++ b/test/externalTests/gnosis.sh @@ -31,10 +31,11 @@ function test_fn { npm test; } function gnosis_safe_test { OPTIMIZER_LEVEL=1 + CONFIG="truffle.js" + truffle_setup https://github.com/erak/safe-contracts.git development_060 run_install install_fn - CONFIG=$(find_truffle_config) replace_libsolc_call truffle_run_test compile_fn test_fn diff --git a/test/externalTests/zeppelin.sh b/test/externalTests/zeppelin.sh index 8eadf68e8..7c932786e 100755 --- a/test/externalTests/zeppelin.sh +++ b/test/externalTests/zeppelin.sh @@ -31,11 +31,11 @@ function test_fn { npm run test; } function zeppelin_test { OPTIMIZER_LEVEL=1 + CONFIG="truffle-config.js" + truffle_setup https://github.com/erak/openzeppelin-contracts.git master_060 run_install install_fn - CONFIG="truffle-config.js" - replace_libsolc_call truffle_run_test compile_fn test_fn } From f13fa7ed825a4ab7474b54efe96325e87ff48297 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Fri, 29 Nov 2019 01:42:57 +0100 Subject: [PATCH 4/6] Adjusts solc-js test to earlier override of soljson. --- test/externalTests/solc-js/solc-js.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/externalTests/solc-js/solc-js.sh b/test/externalTests/solc-js/solc-js.sh index daffee0e3..611f989db 100755 --- a/test/externalTests/solc-js/solc-js.sh +++ b/test/externalTests/solc-js/solc-js.sh @@ -49,8 +49,6 @@ function solcjs_test printLog "Copying SMTChecker tests..." cp -Rf "$TEST_DIR"/test/libsolidity/smtCheckerTests test/ - run_install install_fn - # Update version (needed for some tests) echo "Updating package.json to version $VERSION" npm version --allow-same-version --no-git-tag-version $VERSION From 1fbcf7bd8bcea246777b031066876ccb217dfeb7 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Fri, 29 Nov 2019 10:19:17 +0100 Subject: [PATCH 5/6] Override Truffle version in Gnosis safe-contracts. --- test/externalTests/common.sh | 7 +++++++ test/externalTests/gnosis.sh | 2 ++ 2 files changed, 9 insertions(+) diff --git a/test/externalTests/common.sh b/test/externalTests/common.sh index f3085e27f..25b4a6068 100644 --- a/test/externalTests/common.sh +++ b/test/externalTests/common.sh @@ -83,6 +83,13 @@ function download_project echo "Current commit hash: `git rev-parse HEAD`" } +function force_truffle_version +{ + local repo="$1" + + sed -i 's/"truffle":\s*".*"/"truffle": "^5.0.42"/g' package.json +} + function truffle_setup { local repo="$1" diff --git a/test/externalTests/gnosis.sh b/test/externalTests/gnosis.sh index d5d8cae58..271164029 100755 --- a/test/externalTests/gnosis.sh +++ b/test/externalTests/gnosis.sh @@ -34,6 +34,8 @@ function gnosis_safe_test CONFIG="truffle.js" truffle_setup https://github.com/erak/safe-contracts.git development_060 + force_truffle_version + run_install install_fn replace_libsolc_call From 28ebe967a21acdfda20021c1818dd4e061c6d24e Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Fri, 29 Nov 2019 11:00:55 +0100 Subject: [PATCH 6/6] Force Gnosis PM fork of 0.6.0 --- test/externalTests/gnosis.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/externalTests/gnosis.sh b/test/externalTests/gnosis.sh index 271164029..b2bb657cb 100755 --- a/test/externalTests/gnosis.sh +++ b/test/externalTests/gnosis.sh @@ -34,10 +34,11 @@ function gnosis_safe_test CONFIG="truffle.js" truffle_setup https://github.com/erak/safe-contracts.git development_060 + force_truffle_version + sed -i 's|github:gnosis/mock-contract#sol_0_5_0|github:erak/mock-contract#master_060|g' package.json run_install install_fn - replace_libsolc_call truffle_run_test compile_fn test_fn