mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #7784 from ethereum/fix-external-tests-060
Fix 0.6.0 compilation errors in external tests
This commit is contained in:
commit
958ec98cbe
@ -32,14 +32,14 @@ function colony_test
|
|||||||
{
|
{
|
||||||
OPTIMIZER_LEVEL=3
|
OPTIMIZER_LEVEL=3
|
||||||
FORCE_ABIv2=false
|
FORCE_ABIv2=false
|
||||||
|
CONFIG="truffle.js"
|
||||||
|
|
||||||
truffle_setup https://github.com/erak/colonyNetwork.git develop_060
|
truffle_setup https://github.com/erak/colonyNetwork.git develop_060
|
||||||
run_install install_fn
|
run_install install_fn
|
||||||
|
|
||||||
CONFIG=$(find_truffle_config)
|
|
||||||
|
|
||||||
cd lib
|
cd lib
|
||||||
rm -Rf dappsys
|
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 ..
|
cd ..
|
||||||
|
|
||||||
truffle_run_test compile_fn test_fn
|
truffle_run_test compile_fn test_fn
|
||||||
|
@ -83,6 +83,13 @@ function download_project
|
|||||||
echo "Current commit hash: `git rev-parse HEAD`"
|
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
|
function truffle_setup
|
||||||
{
|
{
|
||||||
local repo="$1"
|
local repo="$1"
|
||||||
@ -202,6 +209,10 @@ function run_install
|
|||||||
{
|
{
|
||||||
local init_fn="$1"
|
local init_fn="$1"
|
||||||
printLog "Running install function..."
|
printLog "Running install function..."
|
||||||
|
|
||||||
|
replace_version_pragmas
|
||||||
|
force_solc "$CONFIG" "$DIR" "$SOLJSON"
|
||||||
|
|
||||||
$init_fn
|
$init_fn
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,7 +236,6 @@ function truffle_run_test
|
|||||||
local test_fn="$2"
|
local test_fn="$2"
|
||||||
|
|
||||||
replace_version_pragmas
|
replace_version_pragmas
|
||||||
|
|
||||||
force_solc "$CONFIG" "$DIR" "$SOLJSON"
|
force_solc "$CONFIG" "$DIR" "$SOLJSON"
|
||||||
|
|
||||||
printLog "Checking optimizer level..."
|
printLog "Checking optimizer level..."
|
||||||
|
@ -31,10 +31,14 @@ function test_fn { npm test; }
|
|||||||
function gnosis_safe_test
|
function gnosis_safe_test
|
||||||
{
|
{
|
||||||
OPTIMIZER_LEVEL=1
|
OPTIMIZER_LEVEL=1
|
||||||
truffle_setup https://github.com/erak/safe-contracts.git development_060
|
CONFIG="truffle.js"
|
||||||
run_install install_fn
|
|
||||||
|
|
||||||
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
|
replace_libsolc_call
|
||||||
|
|
||||||
truffle_run_test compile_fn test_fn
|
truffle_run_test compile_fn test_fn
|
||||||
|
@ -49,8 +49,6 @@ function solcjs_test
|
|||||||
printLog "Copying SMTChecker tests..."
|
printLog "Copying SMTChecker tests..."
|
||||||
cp -Rf "$TEST_DIR"/test/libsolidity/smtCheckerTests test/
|
cp -Rf "$TEST_DIR"/test/libsolidity/smtCheckerTests test/
|
||||||
|
|
||||||
run_install install_fn
|
|
||||||
|
|
||||||
# Update version (needed for some tests)
|
# Update version (needed for some tests)
|
||||||
echo "Updating package.json to version $VERSION"
|
echo "Updating package.json to version $VERSION"
|
||||||
npm version --allow-same-version --no-git-tag-version $VERSION
|
npm version --allow-same-version --no-git-tag-version $VERSION
|
||||||
|
@ -31,11 +31,11 @@ function test_fn { npm run test; }
|
|||||||
function zeppelin_test
|
function zeppelin_test
|
||||||
{
|
{
|
||||||
OPTIMIZER_LEVEL=1
|
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
|
run_install install_fn
|
||||||
|
|
||||||
CONFIG="truffle-config.js"
|
|
||||||
replace_libsolc_call
|
|
||||||
|
|
||||||
truffle_run_test compile_fn test_fn
|
truffle_run_test compile_fn test_fn
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user