Skip to content

Tests#

This page gives the test suites of the repository and the sequence in which to run them. Build and Test Commands gives each command with its options.

Test Suites#

The game models, ACRES Core, the run-time library and the Python tests need no game.

Suite Command Content
Game models Tests/Game/run.sh The engine-free models of the game: vehicle, Polaris, LiDAR, implements, episode log. No Unreal.
ACRES Core Game/Core/build.sh or ctest --test-dir Game/Core/Build The unit tests and the integration tests on the map. Labels: tier, data and extras.
Run-time library Vehicle/Runtime/build.sh or ctest --test-dir Vehicle/Runtime/Build -L runtime The tiers unit, static, integration and nightly.
Python python -m pytest Tests/Map, Tests/SimControl, Tests/Data and Tests/Fast, with the markers of pytest.ini.
ROS 2 colcon test in Vehicle/ROS/ The tests of acres_sim, acres_core_sim, acres_vehicle and acres_description.
Documentation python Docs/Tools/check_docs.py, python Docs/Tools/ste_check.py The site, the coverage of the options and interfaces, the language rules.

The Gate#

The gate (python -m acres_bench.gate quick) is the end-to-end check of the fast simulator. It runs the do-nothing solver and the reference solver of each task and each skill on the 64 test scenes. The verifier runs each log again. A run fails when:

  • the do-nothing solver passes a scene,
  • the verifier does not get the same log again, or
  • the reference passes fewer scenes than its floor in Config/gate_floors.json.

The floors are the accepted results. After you accept a change of the results, write the new floors with python -m acres_bench.gate floors and commit them with the results. A run is kept in a cache: when no input of the fast simulator changed, the gate takes the result from the cache. The tests of the Python suite do not do the checks of the gate again.

Tiers#

Tier Meaning
unit One part. No map data and no build of other parts.
integration A part on the delivered map, or the committed map products.
e2e Whole missions, a replay of a whole run, the link or the game.

A test that needs the map data of Git LFS is skipped when the data is not there. Set ACRES_RUNTIME_STRICT=1 to make a skipped Runtime test a failure.

Sequence#

  1. While you work: the quick tier.

    python -m pytest -q -n 2
    
  2. Before a commit: the gate and the integration tier, on the GPU computer.

    python -m acres_bench.gate quick
    python -m pytest Tests/Fast -m "integration and not slow" -q -n 2
    
  3. Before a push: the local continuous integration (ACRES Core, the run-time library, the game models, the documentation).

    Tools/ci.sh
    
  4. After a change of the map, build the map products again and run their tests (Map Pipeline).

Tests with the Packaged Game#

The tools in Tools/SimControl start the packaged game and check it through the sockets. Start one game at a time. The pytest marker game marks a test that needs the game. Set ACRES_TEST_GAME=1 to run them.

Tool Check
Tools/SimControl/lockstep_determinism.py Two runs with the same seed and commands give the same trajectory.
Tools/SimControl/crosscheck_missions.py ACRES Core and the game drive the same missions.
Tools/SimControl/check_planner_support.py The planner support of the control channel.
Tools/SimControl/render_check.py The images and scans of two builds at fixed poses.