Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests to be able to run using a leap dev-install package. #355

Closed
wants to merge 39 commits into from
Closed
Changes from 3 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1a73eb8
Update tests to be able to run using a leap dev-install package.
oschwaldp-oci Mar 14, 2023
13fe485
Merge branch 'main' into update-tests-to-use-leap-dev-install
oschwaldp-oci Mar 14, 2023
6076d9e
Merge branch 'main' into update-tests-to-use-leap-dev-install
oschwaldp-oci Mar 21, 2023
2f3cdba
Merge branch 'main' into update-tests-to-use-leap-dev-install
oschwaldp-oci Jul 19, 2023
d3f9b04
Add leap integration test to contract CICD workflow.
oschwaldp-oci Jul 19, 2023
4995c16
Add install web3 to workflow.
oschwaldp-oci Jul 19, 2023
0e9d95c
Put leap integration test into own job in workflow.
oschwaldp-oci Jul 19, 2023
7f7d855
Revert back to CDT v3.1.0 for leap integration test
oschwaldp-oci Jul 20, 2023
8340a29
Try setting the PYTHONPATH
oschwaldp-oci Jul 20, 2023
33f27a4
Fix python path to installed leap-dev modules.
oschwaldp-oci Jul 20, 2023
ba3bf65
See where leap-dev is being installed.
oschwaldp-oci Jul 20, 2023
4c3ac5f
Endeavor to fix the python path to TestHarness.
oschwaldp-oci Jul 20, 2023
aafc9a2
Debugging lack of symlink during install.
oschwaldp-oci Jul 20, 2023
f1c2b10
Revert back to installing using apt-get.
oschwaldp-oci Jul 20, 2023
f107499
Walk web3 back to a potentially more stable version.
oschwaldp-oci Jul 20, 2023
80ecdf8
Fix pip install version selection.
oschwaldp-oci Jul 20, 2023
8bdd860
Working through dependency issues.
oschwaldp-oci Jul 21, 2023
36acfe3
Sudo to gain permissions to create the symlink.
oschwaldp-oci Jul 21, 2023
7e02722
Remove PYTHONPATH now that symlink is created.
oschwaldp-oci Jul 21, 2023
2f65d15
Set test environment variables.
oschwaldp-oci Jul 24, 2023
a16a4c2
Revert "Set test environment variables."
oschwaldp-oci Jul 24, 2023
836fe14
Leap integration test workflow updates.
oschwaldp-oci Jul 25, 2023
c18a1f4
Workflow updates.
oschwaldp-oci Jul 25, 2023
16aa944
Fix syntax.
oschwaldp-oci Jul 25, 2023
eb484fa
Elevate permissions.
oschwaldp-oci Jul 25, 2023
8acaca5
Make logs checking steps always run even on failure.
oschwaldp-oci Jul 25, 2023
d8f5ec8
Build eos-evm-node step.
oschwaldp-oci Jul 25, 2023
43dbf43
Upload test logs when test fails.
oschwaldp-oci Jul 25, 2023
7b6a1ee
check the genesis file.
oschwaldp-oci Jul 26, 2023
d2b49ab
Run with verbose output.
oschwaldp-oci Jul 26, 2023
12d4576
Make root directory for testing to collect all artifacts.
oschwaldp-oci Jul 26, 2023
166bf93
Increase eos-evm-node verbosity for debugging workflow in cicd.
oschwaldp-oci Jul 26, 2023
78e28c6
Debug where the test logs directory is.
oschwaldp-oci Jul 26, 2023
534fd66
Give eos-evm-node longer to spin up and sync.
oschwaldp-oci Jul 26, 2023
0cb41ad
Allow waiting and retrying row validation with eos-evm-node for slowe…
oschwaldp-oci Jul 26, 2023
ad13c15
Trying to debug log upload.
oschwaldp-oci Jul 26, 2023
7f679fe
Increase sleep time for syncing.
oschwaldp-oci Jul 26, 2023
02079ac
Troubleshooting eos evm node not spinning up in time and whether slee…
oschwaldp-oci Jul 27, 2023
f2c09a7
Now that uploading all logs, don't need these steps.
oschwaldp-oci Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions tests/leap/nodeos_trust_evm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
from web3 import Web3
import rlp

sys.path.append(os.getcwd())
sys.path.append(os.path.join(os.getcwd(), "tests"))

from TestHarness import Cluster, TestHelper, Utils, WalletMgr
os.environ["CORE_SYMBOL_NAME"]='EOS'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we just overwrite leap/build/tests/core_symbol.py with

CORE_SYMBOL='EOS'

before running the nodeos_trust_evm_test.py ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not after AntelopeIO/leap#818

That change in leap's testing libs is being made to help EVM CI (and possibly other CI, like eosjs) so it can just

apt install leap.deb leap-dev.deb cdt.deb

and then, after completing the EVMnode & EVMcontract builds, have everything it needs to run the integration tests. That way the EVM repo's CI doesn't need to build/patch its own leap testing libraries. It helps in providing some isolation between repos, making the built .deb package a clear delineation point.

print(f"CORE_SYMBOL_NAME: {os.environ.get('CORE_SYMBOL_NAME')}")

from TestHarness import Cluster, TestHelper, Utils, WalletMgr, CORE_SYMBOL
from TestHarness.TestHelper import AppArgs
from TestHarness.testUtils import ReturnType
from TestHarness.testUtils import unhandledEnumType
from core_symbol import CORE_SYMBOL

from antelope_name import convert_name_to_value

Expand All @@ -53,10 +54,13 @@
# --trust-evm-build-root should point to the root of TrustEVM build dir
# --trust-evm-contract-root should point to root of TrustEVM contract build dir
#
# Example:
# cd ~/ext/leap/build
# edit tests/core_symbol.py to be EOS
# ~/ext/TrustEVM/tests/leap/nodeos_trust_evm_test.py --trust-evm-contract-root ~/ext/TrustEVM/contract/build --trust-evm-build-root ~/ext/TrustEVM/build --use-tx-wrapper ~/ext/TrustEVM/peripherals/tx_wrapper --leave-running
# Example (Running with leap src build):
# cd ~/leap/build
# ~/TrustEVM/tests/leap/nodeos_trust_evm_test.py --trust-evm-contract-root ~/TrustEVM/contract/build --trust-evm-build-root ~/TrustEVM/build --use-tx-wrapper ~/TrustEVM/peripherals/tx_wrapper --leave-running
#
# Example (Running with leap dev-install):
# export PYTHONPATH=<leap-dev-install-root>/lib/python3/dist-packages
# ~/TrustEVM/tests/leap/nodeos_trust_evm_test.py --trust-evm-contract-root ~/TrustEVM/contract/build --trust-evm-build-root ~/TrustEVM/build --use-tx-wrapper ~/TrustEVM/peripherals/tx_wrapper --leave-running
#
# Launches wallet at port: 9899
# Example: bin/cleos --wallet-url http://127.0.0.1:9899 ...
Expand Down