git clone https://github.com/crypto-org-chain/cronos.gitInstall nix
https://nixos.org/download.html
Multi-user installation:
sh <(curl -L https://nixos.org/nix/install) --daemonMake sure the following line has been added to your shell profile (e.g. ~/.profile):
source ~/.nix-profile/etc/profile.d/nix.shThen re-login shell, the nix installation is completed.
Install cachix
nix-env -iA cachix -f https://cachix.org/api/v1/installBinary caches will save a lot of build times.
cachix use cronos
cachix use dapp # it's necessary to use dapp's binary cache on new macos system.make run-integration-testsTo customize the test runner, you can also issue commands separately.
It'll prepare all dependencies.
$ nix-shell integration_tests/shell.nix
<nix-shell> $$ cd integration_tests/contracts
$ HUSKY_SKIP_INSTALL=1 npm install
$ npm run typechain
$ cd ../../We use pytest to discover the test cases and run them, follow pytest doc for more options.
You can invoke pytest after entering the nix shell:
$ cd integration_tests
$ pytest -s -vvYou can use -k to select test cases by patterns in name:
$ cd integration_tests
$ pytest -k test_basicSome test cases will run on both geth and cronos, you can also select the platform to run using -k:
$ cd integration_tests
$ # run against cronos only
$ pytest -k cronos
$ # run against geth only
$ pytest -k geth$ jsonnet integration_tests/configs/default.jsonnet | yq -P