Skip to content

Commit

Permalink
skip precompile
Browse files Browse the repository at this point in the history
  • Loading branch information
fbac committed Aug 23, 2024
1 parent e531669 commit e8af6b8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 10 additions & 4 deletions cmd/zetae2e/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const (
flagSkipHeaderProof = "skip-header-proof"
flagTestV2 = "test-v2"
flagSkipTrackerCheck = "skip-tracker-check"
flagSkipPrecompiles = "skip-precompiles"
)

var (
Expand Down Expand Up @@ -77,6 +78,7 @@ func NewLocalCmd() *cobra.Command {
cmd.Flags().Bool(flagTestTSSMigration, false, "set to true to include a migration test at the end")
cmd.Flags().Bool(flagTestV2, false, "set to true to run tests for v2 contracts")
cmd.Flags().Bool(flagSkipTrackerCheck, false, "set to true to skip tracker check at the end of the tests")
cmd.Flags().Bool(flagSkipPrecompiles, false, "set to true to skip stateful precompiled contracts test")

return cmd
}
Expand All @@ -101,6 +103,7 @@ func localE2ETest(cmd *cobra.Command, _ []string) {
skipTrackerCheck = must(cmd.Flags().GetBool(flagSkipTrackerCheck))
testTSSMigration = must(cmd.Flags().GetBool(flagTestTSSMigration))
testV2 = must(cmd.Flags().GetBool(flagTestV2))
skipPrecompiles = must(cmd.Flags().GetBool(flagSkipPrecompiles))
)

logger := runner.NewLogger(verbose, color.FgWhite, "setup")
Expand Down Expand Up @@ -247,9 +250,6 @@ func localE2ETest(cmd *cobra.Command, _ []string) {
erc20AdvancedTests := []string{
e2etests.TestERC20DepositRestrictedName,
}
precompiledContractTests := []string{
e2etests.TestZetaPrecompilesPrototypeName,
}
zetaTests := []string{
e2etests.TestZetaWithdrawName,
e2etests.TestMessagePassingExternalChainsName,
Expand Down Expand Up @@ -296,14 +296,20 @@ func localE2ETest(cmd *cobra.Command, _ []string) {
ethereumAdvancedTests := []string{
e2etests.TestEtherWithdrawRestrictedName,
}
precompiledContractTests := []string{}

if !skipPrecompiles {
precompiledContractTests = []string{
e2etests.TestZetaPrecompilesPrototypeName,
}
}

if !light {
erc20Tests = append(erc20Tests, erc20AdvancedTests...)
zetaTests = append(zetaTests, zetaAdvancedTests...)
zevmMPTests = append(zevmMPTests, zevmMPAdvancedTests...)
bitcoinTests = append(bitcoinTests, bitcoinAdvancedTests...)
ethereumTests = append(ethereumTests, ethereumAdvancedTests...)
precompiledContractTests = make([]string, 0)
}

eg.Go(statefulPrecompilesTestRoutine(conf, deployerRunner, verbose, precompiledContractTests...))
Expand Down
6 changes: 3 additions & 3 deletions contrib/localnet/orchestrator/start-zetae2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ if [ "$LOCALNET_MODE" == "upgrade" ]; then
echo "running E2E command to setup the networks and populate the state..."

# Use light flag to ensure tests can complete before the upgrade height
zetae2e local $E2E_ARGS --skip-setup --config deployed.yml --light ${COMMON_ARGS}
zetae2e local $E2E_ARGS --skip-setup --config deployed.yml --light --skip-precompiles ${COMMON_ARGS}
if [ $? -ne 0 ]; then
echo "first e2e failed"
exit 1
Expand Down Expand Up @@ -170,9 +170,9 @@ if [ "$LOCALNET_MODE" == "upgrade" ]; then
# When the upgrade height is greater than 100 for upgrade test, the Bitcoin tests have been run once, therefore the Bitcoin wallet is already set up
# Use light flag to skip advanced tests
if [ "$UPGRADE_HEIGHT" -lt 100 ]; then
zetae2e local $E2E_ARGS --skip-setup --config deployed.yml --light ${COMMON_ARGS}
zetae2e local $E2E_ARGS --skip-setup --config deployed.yml --skip-bitcoin-setup --light --skip-precompiles ${COMMON_ARGS}
else
zetae2e local $E2E_ARGS --skip-setup --config deployed.yml --skip-bitcoin-setup --light ${COMMON_ARGS}
zetae2e local $E2E_ARGS --skip-setup --config deployed.yml --skip-bitcoin-setup --light --skip-precompiles ${COMMON_ARGS}
fi

ZETAE2E_EXIT_CODE=$?
Expand Down

0 comments on commit e8af6b8

Please sign in to comment.