Skip to content

Commit

Permalink
Switch ens external test to ens-contracts repo
Browse files Browse the repository at this point in the history
  • Loading branch information
cameel committed Oct 27, 2021
1 parent 5b0a006 commit 08162f3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
6 changes: 2 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1186,8 +1186,7 @@ workflows:
name: t_ems_compile_ext_ens
project: ens
compile_only: 1
# NOTE: One of the dependencies (fsevents) fails to build its native extension on node.js 12+.
nodejs_version: 10
nodejs_version: 16

# FIXME: Gnosis tests are pretty flaky right now. They often fail on CircleCI due to random ProviderError
# and there are also other less frequent problems. See https://github.com/gnosis/safe-contracts/issues/216.
Expand All @@ -1211,8 +1210,7 @@ workflows:
<<: *workflow_emscripten
name: t_ems_test_ext_ens
project: ens
# NOTE: One of the dependencies (fsevents) fails to build its native extension on node.js 12+.
nodejs_version: 10
nodejs_version: 16

# Windows build and tests
- b_win: *workflow_trigger_on_tags
Expand Down
25 changes: 10 additions & 15 deletions test/externalTests/ens.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,29 @@ source test/externalTests/common.sh
verify_input "$1"
export SOLJSON="$1"

function compile_fn { npx truffle compile; }
function test_fn { npm run test; }
function compile_fn { yarn build; }
function test_fn { yarn test; }

function ens_test
{
local repo="https://github.com/solidity-external-tests/ens.git"
local branch=master_080
local config_file="truffle-config.js"
local repo="https://github.com/ensdomains/ens-contracts.git"
local branch=master
local config_file="hardhat-config.js"
local min_optimizer_level=1
local max_optimizer_level=3

setup_solcjs "$DIR" "$SOLJSON"
download_project "$repo" "$branch" "$DIR"

# Use latest Truffle. Older versions crash on the output from 0.8.0.
force_truffle_version ^5.1.55

neutralize_package_lock
neutralize_package_json_hooks
force_truffle_compiler_settings "$config_file" "${DIR}/solc" "$min_optimizer_level"
npm install

replace_version_pragmas
force_truffle_solc_modules "$SOLJSON"
force_hardhat_compiler_binary "$config_file" "$SOLJSON"
force_hardhat_compiler_settings "$config_file" "$min_optimizer_level"
yarn install

for level in $(seq "$min_optimizer_level" "$max_optimizer_level"); do
truffle_run_test "$config_file" "${DIR}/solc" "$level" compile_fn test_fn
hardhat_run_test "$config_file" "$level" compile_fn test_fn
done
}

external_test Ens ens_test
external_test ENS ens_test

0 comments on commit 08162f3

Please sign in to comment.