mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update colony external test
This commit is contained in:
parent
3f2cde9bd6
commit
7b22b02ec5
@ -576,8 +576,7 @@ defaults:
|
||||
project: colony
|
||||
binary_type: solcjs
|
||||
compile_only: 1
|
||||
image: cimg/node:14.20
|
||||
python2: true
|
||||
image: cimg/node:16.18
|
||||
|
||||
- job_native_test_ext_gnosis: &job_native_test_ext_gnosis
|
||||
<<: *requires_b_ubu_static
|
||||
@ -689,9 +688,8 @@ defaults:
|
||||
name: t_ems_test_ext_colony
|
||||
project: colony
|
||||
binary_type: solcjs
|
||||
image: cimg/node:14.20
|
||||
image: cimg/node:16.18
|
||||
resource_class: medium
|
||||
python2: true
|
||||
|
||||
- job_b_ubu_asan_clang: &job_b_ubu_asan_clang
|
||||
<<: *on_all_tags_and_branches
|
||||
@ -1272,9 +1270,6 @@ jobs:
|
||||
resource_class:
|
||||
type: string
|
||||
default: small
|
||||
python2:
|
||||
type: boolean
|
||||
default: false
|
||||
docker:
|
||||
- image: << parameters.image >>
|
||||
resource_class: << parameters.resource_class >>
|
||||
@ -1297,22 +1292,13 @@ jobs:
|
||||
# lsof is used by Colony in its stop-blockchain-client.sh script
|
||||
sudo apt update
|
||||
sudo apt-get --quiet --assume-yes --no-install-recommends install lsof
|
||||
- when:
|
||||
condition: << parameters.python2 >>
|
||||
steps:
|
||||
- run:
|
||||
name: Install Python 2 and make it the default
|
||||
command: |
|
||||
# python is used by node-gyp to build native modules (needed for Colony).
|
||||
# In the 14.x image node-gyp still requires Python 2.
|
||||
sudo apt install python2 --assume-yes --no-install-recommends
|
||||
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
|
||||
- when:
|
||||
condition:
|
||||
equal: [<< parameters.binary_type >>, "solcjs"]
|
||||
steps:
|
||||
- run:
|
||||
name: External << parameters.project >> tests (<< parameters.binary_type >>)
|
||||
no_output_timeout: 15m
|
||||
command: |
|
||||
test/external_tests.py test --solc-binary-type "<< parameters.binary_type >>" --solc-binary-path /tmp/workspace/soljson.js --run "<< parameters.project >>"
|
||||
- when:
|
||||
|
@ -31,21 +31,21 @@ BINARY_TYPE="$1"
|
||||
BINARY_PATH="$(realpath "$2")"
|
||||
SELECTED_PRESETS="$3"
|
||||
|
||||
function compile_fn { yarn run provision:token:contracts; }
|
||||
function test_fn { yarn run test:contracts; }
|
||||
function compile_fn { npm run provision:token:contracts; }
|
||||
function test_fn { npm run test:contracts; }
|
||||
|
||||
function colony_test
|
||||
{
|
||||
local repo="https://github.com/solidity-external-tests/colonyNetwork.git"
|
||||
local ref_type=branch
|
||||
local ref="develop_080"
|
||||
local repo="https://github.com/JoinColony/colonyNetwork.git"
|
||||
local ref_type="branch"
|
||||
local ref="develop"
|
||||
local config_file="truffle.js"
|
||||
|
||||
local compile_only_presets=(
|
||||
ir-no-optimize # Compiles but tests run out of gas
|
||||
ir-optimize-evm-only # Compiles but tests run out of gas
|
||||
legacy-no-optimize # Compiles but tests run out of gas
|
||||
legacy-optimize-evm-only # Compiles but tests run out of gas
|
||||
#ir-no-optimize # Compilation fails with: "YulException: Variable var__47248 is 6 slot(s) too deep inside the stack. Stack too deep."
|
||||
#ir-optimize-evm-only # Compilation fails with: "YulException: Variable var__47248 is 6 slot(s) too deep inside the stack. Stack too deep."
|
||||
#legacy-no-optimize # Compilation fails with: "CompilerError: Stack too deep. When compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack."
|
||||
#legacy-optimize-evm-only # Compilation fails with: "CompilerError: Stack too deep. When compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack."
|
||||
)
|
||||
local settings_presets=(
|
||||
"${compile_only_presets[@]}"
|
||||
@ -60,16 +60,27 @@ function colony_test
|
||||
download_project "$repo" "$ref_type" "$ref" "$DIR"
|
||||
[[ $BINARY_TYPE == native ]] && replace_global_solc "$BINARY_PATH"
|
||||
|
||||
neutralize_package_lock
|
||||
neutralize_package_json_hooks
|
||||
force_truffle_compiler_settings "$config_file" "$BINARY_TYPE" "${DIR}/solc/dist" "$(first_word "$SELECTED_PRESETS")"
|
||||
yarn install
|
||||
git submodule update --init
|
||||
|
||||
# Force Truffle version that has support to Shanghai
|
||||
force_truffle_version "5.9.0"
|
||||
npm install
|
||||
# Ensure Ganache version that has support to Shanghai
|
||||
# https://github.com/trufflesuite/ganache/releases/tag/v7.8.0
|
||||
npm install ganache@7.8.0
|
||||
|
||||
cd lib
|
||||
rm -Rf dappsys
|
||||
git clone https://github.com/solidity-external-tests/dappsys-monolithic.git -b master_080 dappsys
|
||||
cd ..
|
||||
|
||||
# Ignoring node-hid since it is not relevant for the tests and fails with the following error during installation:
|
||||
# make: *** [HID-hidraw.target.mk:124: Release/obj.target/HID-hidraw/src/HID.o] Error 1
|
||||
sed -i 's|"node-hid": *\".*\",*||g' package.json
|
||||
|
||||
replace_version_pragmas
|
||||
[[ $BINARY_TYPE == solcjs ]] && force_solc_modules "${DIR}/solc/dist"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user