optimism

OP Stack Acceptance Tests

Overview

This directory contains the OP Stack acceptance tests. They run against the in-process sysgo devstack and are executed as normal Go tests.

The supported execution path is:

devtest.T.MarkFlaky(...) is used for tests that should downgrade failures to skips in the normal acceptance run. Set DEVNET_FAIL_FLAKY_TESTS=true to force those tests to fail normally. Acceptance runs also emit a flaky-tests.txt artifact in op-acceptance-tests/logs/... listing the current MarkFlaky(...) call sites.

Dependencies

Install repo tools via mise as documented in the repository root. Local acceptance runs also build contract and Rust dependencies when needed.

Usage

Quick Start

cd op-acceptance-tests
just

Available Commands

# Default: run all acceptance test packages
just

# Explicit alias
just acceptance-test
just acceptance-test-all

Direct CLI Usage

gotestsum --format testname --junitfile ./op-acceptance-tests/results/results.xml -- \
  -count=1 -p 4 -parallel 4 -timeout 2h ./op-acceptance-tests/tests/...

The just wrapper computes defaults from available CPUs:

Override them with ACCEPTANCE_TEST_JOBS, ACCEPTANCE_TEST_PARALLEL, and ACCEPTANCE_TEST_TIMEOUT.

Logging

When invoked with go test, devstack acceptance tests support configuring logging via CLI flags and environment variables:

Example:

LOG_LEVEL=info go test -v ./op-acceptance-tests/tests/interop/sync/multisupervisor_interop/... -run TestL2CLAheadOfSupervisor

Adding Tests

Add new acceptance tests as ordinary Go tests under tests. There is no external gate or manifest to update.

If a test is currently flaky in the normal acceptance run, mark it in code with devtest.T.MarkFlaky(...). That keeps the source of truth next to the test itself while the acceptance logs and flaky-test artifacts provide the review surface for recent failures.