Merge pull request #7784 from ethereum/fix-external-tests-060

Fix 0.6.0 compilation errors in external tests
This commit is contained in:
Daniel Kirchner 2019-12-02 19:16:45 +01:00 committed by GitHub
commit 958ec98cbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 12 deletions

View File

@ -32,14 +32,14 @@ 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 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

View File

@ -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"
@ -202,6 +209,10 @@ function run_install
{
local init_fn="$1"
printLog "Running install function..."
replace_version_pragmas
force_solc "$CONFIG" "$DIR" "$SOLJSON"
$init_fn
}
@ -225,7 +236,6 @@ function truffle_run_test
local test_fn="$2"
replace_version_pragmas
force_solc "$CONFIG" "$DIR" "$SOLJSON"
printLog "Checking optimizer level..."

View File

@ -31,10 +31,14 @@ function test_fn { npm test; }
function gnosis_safe_test
{
OPTIMIZER_LEVEL=1
truffle_setup https://github.com/erak/safe-contracts.git development_060
run_install install_fn
CONFIG="truffle.js"
CONFIG=$(find_truffle_config)
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

View File

@ -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

View File

@ -31,11 +31,11 @@ function test_fn { npm run test; }
function zeppelin_test
{
OPTIMIZER_LEVEL=1
truffle_setup https://github.com/erak/openzeppelin-solidity.git master_060
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
}