-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
tests/leap/nodeos_trust_evm_test.py
Outdated
sys.path.append(os.path.join(os.getcwd(), "tests")) | ||
|
||
from TestHarness import Cluster, TestHelper, Utils, WalletMgr | ||
os.environ["CORE_SYMBOL_NAME"]='EOS' |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
Temporarily move leap integration test before contract tests for quicker CICD debugging iteration.
Use leap and cdt versions 4 with the leap integration test.
.github/workflows/contract.yml
Outdated
- name: Test Leap Integration | ||
run: | | ||
pip install web3 | ||
export PYTHONPATH=/usr/local/lib/python3/dist-packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did something change? afaik all this should be installed in /usr
when built in CI
https://github.com/AntelopeIO/leap/blob/main/.github/workflows/build_base.yaml#L80
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I'm endeavoring to figure out. I just did build using the pinned_build.sh
script and then installed the lead-dev
pkg it created from the v4.0.4
tag. Using dpkg -L leap-dev
it appeared that TestHarness
was installed in /usr/local/lib/python3/dist-packages/TestHarness
. But it still isn't finding the module there either. Or rather, it is a symlink to /usr/local/share/leap_testing/tests/TestHarness
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, pinned_build.sh
does /usr/local
by default (but not in CI where it's also /usr
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted. Updated the location where it installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to export PYTHONPATH
in this case, where the test in leap doesn't need to?
https://github.com/AntelopeIO/leap/blob/main/.github/workflows/build.yaml#L98
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to chase that down. My current theory is that the symlink isn't being created to put the TestHarness
into the python3/dist-packages
. This build is running cmake version 3.26.4
. Not sure which version is being used over in the leap
workflow since there is a switch in https://github.com/AntelopeIO/leap/blob/78c1b62a76b37ac3531e526b8434c1ce54a451c2/CMakeLists.txt#L252
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dpkg -L leap-dev | grep TestHarness
in this workflow is not showing the symlink:
/usr/share/leap_testing/tests/TestHarness
/usr/share/leap_testing/tests/TestHarness/Cluster.py
/usr/share/leap_testing/tests/TestHarness/Node.py
/usr/share/leap_testing/tests/TestHarness/TestHelper.py
/usr/share/leap_testing/tests/TestHarness/WalletMgr.py
/usr/share/leap_testing/tests/TestHarness/__init__.py
/usr/share/leap_testing/tests/TestHarness/core_symbol.py
/usr/share/leap_testing/tests/TestHarness/depresolver.py
/usr/share/leap_testing/tests/TestHarness/interfaces.py
/usr/share/leap_testing/tests/TestHarness/launch_transaction_generators.py
/usr/share/leap_testing/tests/TestHarness/libc.py
/usr/share/leap_testing/tests/TestHarness/logging-template.json
/usr/share/leap_testing/tests/TestHarness/logging.py
/usr/share/leap_testing/tests/TestHarness/queries.py
/usr/share/leap_testing/tests/TestHarness/testUtils.py
/usr/share/leap_testing/tests/TestHarness/transactions.py
https://github.com/eosnetworkfoundation/eos-evm/actions/runs/5613879938/job/15210866007
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although local build (note: using pinned_build.sh
to create leap-dev
) with cmake version 3.22.1
does:
/usr/local/share/leap_testing/tests/TestHarness
/usr/local/share/leap_testing/tests/TestHarness/Cluster.py
/usr/local/share/leap_testing/tests/TestHarness/Node.py
/usr/local/share/leap_testing/tests/TestHarness/TestHelper.py
/usr/local/share/leap_testing/tests/TestHarness/WalletMgr.py
/usr/local/share/leap_testing/tests/TestHarness/__init__.py
/usr/local/share/leap_testing/tests/TestHarness/core_symbol.py
/usr/local/share/leap_testing/tests/TestHarness/depresolver.py
/usr/local/share/leap_testing/tests/TestHarness/interfaces.py
/usr/local/share/leap_testing/tests/TestHarness/launch_transaction_generators.py
/usr/local/share/leap_testing/tests/TestHarness/libc.py
/usr/local/share/leap_testing/tests/TestHarness/logging-template.json
/usr/local/share/leap_testing/tests/TestHarness/logging.py
/usr/local/share/leap_testing/tests/TestHarness/queries.py
/usr/local/share/leap_testing/tests/TestHarness/testUtils.py
/usr/local/share/leap_testing/tests/TestHarness/transactions.py
/usr/local/lib/python3/dist-packages/TestHarness
So from that perspective it doesn't look like a cmake version problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where: /usr/local/lib/python3/dist-packages/TestHarness -> ../../../share/leap_testing/tests/TestHarness
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that this is due to the postinst
script relying on CMAKE_INSTALL_FULL_LIBDIR
in v4.0.4
which sets the path for the symlink incorrectly to: ln -s ../../../share/leap_testing/tests/TestHarness /usr/lib/x86_64-linux-gnu/python3/dist-packages/TestHarness
.
This has been fixed in main
: https://github.com/AntelopeIO/leap/blob/main/scripts/postinst
Thus, currently setting the PYTHONPATH
is a workaround to allow discovery of the installed python modules from leap-dev
Need to link TestHarness into typical python dist-packages. This is taken care of automatically in the install in leap main but not in v4.0.4 being used here. TestHarness has a dependency on cleos which currently is not installed in the leap-dev package, so need leap package for now as well.
PYTHONPATH was not what we wanted here anyway. Also believe we can remove the concrete version specification for web3 as it was not the cause of the issue.
This reverts commit 2f65d15.
Update Web3 functions now using snake case instead of camel case. Update tx_wrapper index.js to use fetch import over require. Workflow needs to install some dependencies as documented in test.
Break out step for update package index and upgrading packages first. Add step to check versions and check tx_wrapper logs.
…r trx sync machines.
…p is working correctly in CICD.
Superseded by: eosnetworkfoundation/eos-evm-node#17 |
Depends on: AntelopeIO/leap#818