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
|
project: colony
|
||||||
binary_type: solcjs
|
binary_type: solcjs
|
||||||
compile_only: 1
|
compile_only: 1
|
||||||
image: cimg/node:14.20
|
image: cimg/node:16.18
|
||||||
python2: true
|
|
||||||
|
|
||||||
- job_native_test_ext_gnosis: &job_native_test_ext_gnosis
|
- job_native_test_ext_gnosis: &job_native_test_ext_gnosis
|
||||||
<<: *requires_b_ubu_static
|
<<: *requires_b_ubu_static
|
||||||
@ -689,9 +688,8 @@ defaults:
|
|||||||
name: t_ems_test_ext_colony
|
name: t_ems_test_ext_colony
|
||||||
project: colony
|
project: colony
|
||||||
binary_type: solcjs
|
binary_type: solcjs
|
||||||
image: cimg/node:14.20
|
image: cimg/node:16.18
|
||||||
resource_class: medium
|
resource_class: medium
|
||||||
python2: true
|
|
||||||
|
|
||||||
- job_b_ubu_asan_clang: &job_b_ubu_asan_clang
|
- job_b_ubu_asan_clang: &job_b_ubu_asan_clang
|
||||||
<<: *on_all_tags_and_branches
|
<<: *on_all_tags_and_branches
|
||||||
@ -1272,9 +1270,6 @@ jobs:
|
|||||||
resource_class:
|
resource_class:
|
||||||
type: string
|
type: string
|
||||||
default: small
|
default: small
|
||||||
python2:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
docker:
|
docker:
|
||||||
- image: << parameters.image >>
|
- image: << parameters.image >>
|
||||||
resource_class: << parameters.resource_class >>
|
resource_class: << parameters.resource_class >>
|
||||||
@ -1297,22 +1292,13 @@ jobs:
|
|||||||
# lsof is used by Colony in its stop-blockchain-client.sh script
|
# lsof is used by Colony in its stop-blockchain-client.sh script
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt-get --quiet --assume-yes --no-install-recommends install lsof
|
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:
|
- when:
|
||||||
condition:
|
condition:
|
||||||
equal: [<< parameters.binary_type >>, "solcjs"]
|
equal: [<< parameters.binary_type >>, "solcjs"]
|
||||||
steps:
|
steps:
|
||||||
- run:
|
- run:
|
||||||
name: External << parameters.project >> tests (<< parameters.binary_type >>)
|
name: External << parameters.project >> tests (<< parameters.binary_type >>)
|
||||||
|
no_output_timeout: 15m
|
||||||
command: |
|
command: |
|
||||||
test/external_tests.py test --solc-binary-type "<< parameters.binary_type >>" --solc-binary-path /tmp/workspace/soljson.js --run "<< parameters.project >>"
|
test/external_tests.py test --solc-binary-type "<< parameters.binary_type >>" --solc-binary-path /tmp/workspace/soljson.js --run "<< parameters.project >>"
|
||||||
- when:
|
- when:
|
||||||
|
@ -31,21 +31,21 @@ BINARY_TYPE="$1"
|
|||||||
BINARY_PATH="$(realpath "$2")"
|
BINARY_PATH="$(realpath "$2")"
|
||||||
SELECTED_PRESETS="$3"
|
SELECTED_PRESETS="$3"
|
||||||
|
|
||||||
function compile_fn { yarn run provision:token:contracts; }
|
function compile_fn { npm run provision:token:contracts; }
|
||||||
function test_fn { yarn run test:contracts; }
|
function test_fn { npm run test:contracts; }
|
||||||
|
|
||||||
function colony_test
|
function colony_test
|
||||||
{
|
{
|
||||||
local repo="https://github.com/solidity-external-tests/colonyNetwork.git"
|
local repo="https://github.com/JoinColony/colonyNetwork.git"
|
||||||
local ref_type=branch
|
local ref_type="branch"
|
||||||
local ref="develop_080"
|
local ref="develop"
|
||||||
local config_file="truffle.js"
|
local config_file="truffle.js"
|
||||||
|
|
||||||
local compile_only_presets=(
|
local compile_only_presets=(
|
||||||
ir-no-optimize # 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 # Compiles but tests run out of gas
|
#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 # Compiles but tests run out of gas
|
#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 # Compiles but tests run out of gas
|
#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=(
|
local settings_presets=(
|
||||||
"${compile_only_presets[@]}"
|
"${compile_only_presets[@]}"
|
||||||
@ -60,16 +60,27 @@ function colony_test
|
|||||||
download_project "$repo" "$ref_type" "$ref" "$DIR"
|
download_project "$repo" "$ref_type" "$ref" "$DIR"
|
||||||
[[ $BINARY_TYPE == native ]] && replace_global_solc "$BINARY_PATH"
|
[[ $BINARY_TYPE == native ]] && replace_global_solc "$BINARY_PATH"
|
||||||
|
|
||||||
|
neutralize_package_lock
|
||||||
neutralize_package_json_hooks
|
neutralize_package_json_hooks
|
||||||
force_truffle_compiler_settings "$config_file" "$BINARY_TYPE" "${DIR}/solc/dist" "$(first_word "$SELECTED_PRESETS")"
|
force_truffle_compiler_settings "$config_file" "$BINARY_TYPE" "${DIR}/solc/dist" "$(first_word "$SELECTED_PRESETS")"
|
||||||
yarn install
|
|
||||||
git submodule update --init
|
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
|
cd lib
|
||||||
rm -Rf dappsys
|
rm -Rf dappsys
|
||||||
git clone https://github.com/solidity-external-tests/dappsys-monolithic.git -b master_080 dappsys
|
git clone https://github.com/solidity-external-tests/dappsys-monolithic.git -b master_080 dappsys
|
||||||
cd ..
|
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
|
replace_version_pragmas
|
||||||
[[ $BINARY_TYPE == solcjs ]] && force_solc_modules "${DIR}/solc/dist"
|
[[ $BINARY_TYPE == solcjs ]] && force_solc_modules "${DIR}/solc/dist"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user