Skip to content

Commit a4c0d82

Browse files
authored
[Test] Consolidate environment smoke tests (#7089)
## Summary - Split core environment smoke coverage into explicit Isaac Sim PhysX, OV PhysX, and Newton MJWarp test files. - Select only tasks that explicitly provide the requested physics preset. - Consolidate contributor environment smoke coverage into one default-backend test with `num_envs=2`. - Remove duplicate contributor and stage-in-memory environment smoke suites. ## Validation - `uv run python -m compileall -q source/isaaclab_tasks/test/env_test_utils.py source/isaaclab_tasks/test/core source/isaaclab_tasks/test/contrib/test_contrib_environments.py` - `uv run isaaclab -f` - Verified the three backend files distribute one per existing task-test shard.
1 parent 466eaaa commit a4c0d82

18 files changed

Lines changed: 102 additions & 632 deletions

.github/workflows/build.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,8 @@ jobs:
723723
exit 1
724724
fi
725725
726-
test-skillgen:
727-
name: test-skillgen
726+
test-contrib-environments:
727+
name: test-contrib-environments
728728
runs-on: [self-hosted, gpu]
729729
timeout-minutes: 120
730730
continue-on-error: true
@@ -744,8 +744,8 @@ jobs:
744744
isaacsim-version: ${{ needs.config.outputs.isaacsim_image_tag }}
745745
dockerfile-path: docker/Dockerfile.curobo
746746
cache-tag: cache-curobo
747-
include-files: "test_generate_dataset_skillgen.py,test_environments_skillgen.py,test_environments_automate.py"
748-
container-name: isaac-lab-skillgen-test
747+
include-files: "test_generate_dataset_skillgen.py,test_contrib_environments.py"
748+
container-name: isaac-lab-contrib-environments-test
749749

750750
test-record-video:
751751
name: "record-video"
@@ -941,8 +941,9 @@ jobs:
941941
# (dexterous, many contacts). Deformable/MPM kernels are not covered;
942942
# widen if a test job reports large cache growth.
943943
include-files: >-
944-
test_environments.py,
945-
test_environments_newton.py
944+
test_environments_isaacsim_physx.py,
945+
test_environments_newton.py,
946+
test_environments_ovphysx.py
946947
# No Soft/Cloth: the deformable envs depend on optional extras the CI
947948
# image does not install (Soft needs pytetwild), so they only ever fail.
948949
test-k-expr: "Cartpole or Drawer or AnymalD or Handover"

source/isaaclab_tasks/changelog.d/mh-consolidate-environment-tests.skip

Whitespace-only changes.

source/isaaclab_tasks/test/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
import sys
1515

1616
import pytest
17+
import warp as wp
18+
19+
wp.config.enable_backward = False
1720

1821
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
1922

source/isaaclab_tasks/test/contrib/test_cartpole_showcase_environments_with_stage_in_memory.py

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
2+
# All rights reserved.
3+
#
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
6+
"""Launch Isaac Sim Simulator first."""
7+
8+
import sys
9+
10+
# Import pinocchio before AppLauncher so Isaac Lab's dependency wins over Isaac Sim's bundled copy.
11+
if sys.platform != "win32":
12+
import pinocchio # noqa: F401
13+
14+
from isaaclab.app import AppLauncher
15+
16+
app_launcher = AppLauncher(headless=True, enable_cameras=True)
17+
simulation_app = app_launcher.app
18+
19+
20+
"""Rest everything follows."""
21+
22+
import pytest
23+
24+
import isaaclab_tasks # noqa: F401
25+
26+
# Local imports should be imported last
27+
from env_test_utils import _run_environments, setup_environment # isort: skip
28+
29+
30+
_SKIPPED_TASKS = {
31+
"IsaacContrib-Franka-Pour": "Requires an external reset-dataset artifact.",
32+
"IsaacContrib-AutoMate-Assembly-Direct": "Requires CUDA support outside the standard environment test runner.",
33+
"IsaacContrib-AutoMate-Disassembly-Direct": "Requires CUDA support outside the standard environment test runner.",
34+
}
35+
_SKIPPED_TASK_SUBSTRINGS = {
36+
"RmpFlow": "Uses SingleArticulation, which requires an update.",
37+
"Skillgen": "Requires cuRobo-specific coverage.",
38+
"Suction": "Requires CPU simulation.",
39+
}
40+
41+
42+
def _skip_reason(task_name: str) -> str | None:
43+
"""Return the documented reason for skipping a contributed environment."""
44+
if task_name in _SKIPPED_TASKS:
45+
return _SKIPPED_TASKS[task_name]
46+
return next((reason for substring, reason in _SKIPPED_TASK_SUBSTRINGS.items() if substring in task_name), None)
47+
48+
49+
def _contrib_environment_params() -> list:
50+
"""Return each contributed environment with its documented test marks."""
51+
params = []
52+
for task_param in setup_environment(multi_agent=False, tier="contrib"):
53+
task_name = getattr(task_param, "values", (task_param,))[0]
54+
marks = getattr(task_param, "marks", ())
55+
skip_reason = _skip_reason(task_name)
56+
if skip_reason is not None:
57+
marks = (*marks, pytest.mark.skip(reason=skip_reason))
58+
params.append(pytest.param(task_name, id=task_name, marks=marks))
59+
return params
60+
61+
62+
@pytest.mark.parametrize("task_name", _contrib_environment_params())
63+
def test_contrib_environments(task_name):
64+
_run_environments(task_name, device="cuda", num_envs=2)

source/isaaclab_tasks/test/contrib/test_contrib_environments_smoke.py

Lines changed: 0 additions & 60 deletions
This file was deleted.

source/isaaclab_tasks/test/contrib/test_environments_automate.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

source/isaaclab_tasks/test/contrib/test_environments_skillgen.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

source/isaaclab_tasks/test/contrib/test_factory_environments.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

source/isaaclab_tasks/test/contrib/test_pickplace_stack_environments.py

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)