Unverified Commit 239374d4 authored by ben-johnston-nv's avatar ben-johnston-nv Committed by GitHub

Updates pytest flags to add for isaacsim integration testsing (#3247)

# Description

This change prepares the unit test framework to allow running CI within
the Isaac Sim pipeline to catch issues earlier on in Isaac Sim changes.

<!-- As a practice, it is recommended to open an issue to have
discussions on the proposed pull request.
This makes it easier for the community to keep track of what is being
developed or added, and if a given feature
is demanded by more than one party. -->

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->


- New feature (non-breaking change which adds functionality)


## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
parent 9d632146
...@@ -20,6 +20,7 @@ Guidelines for modifications: ...@@ -20,6 +20,7 @@ Guidelines for modifications:
--- ---
* Antonio Serrano-Muñoz * Antonio Serrano-Muñoz
* Ben Johnston
* David Hoeller * David Hoeller
* Farbod Farshidian * Farbod Farshidian
* Hunter Hansen * Hunter Hansen
......
[pytest]
markers =
isaacsim_ci: mark test to run in isaacsim ci
...@@ -789,6 +789,24 @@ class AppLauncher: ...@@ -789,6 +789,24 @@ class AppLauncher:
# this is mainly done to purge the print statements from the simulation app # this is mainly done to purge the print statements from the simulation app
if "--verbose" not in sys.argv and "--info" not in sys.argv: if "--verbose" not in sys.argv and "--info" not in sys.argv:
sys.stdout = open(os.devnull, "w") # noqa: SIM115 sys.stdout = open(os.devnull, "w") # noqa: SIM115
# pytest may have left some things in sys.argv, this will check for some of those
# do a mark and sweep to remove any -m pytest and -m isaacsim_ci and -c **/pytest.ini
indexes_to_remove = []
for idx, arg in enumerate(sys.argv[:-1]):
if arg == "-m":
value_for_dash_m = sys.argv[idx + 1]
if "pytest" in value_for_dash_m or "isaacsim_ci" in value_for_dash_m:
indexes_to_remove.append(idx)
indexes_to_remove.append(idx + 1)
if arg == "-c" and "pytest.ini" in sys.argv[idx + 1]:
indexes_to_remove.append(idx)
indexes_to_remove.append(idx + 1)
if arg == "--capture=no":
indexes_to_remove.append(idx)
for idx in sorted(indexes_to_remove, reverse=True):
sys.argv = sys.argv[:idx] + sys.argv[idx + 1 :]
# launch simulation app # launch simulation app
self._app = SimulationApp(self._sim_app_config, experience=self._sim_experience_file) self._app = SimulationApp(self._sim_app_config, experience=self._sim_experience_file)
# enable sys stdout and stderr # enable sys stdout and stderr
...@@ -800,6 +818,7 @@ class AppLauncher: ...@@ -800,6 +818,7 @@ class AppLauncher:
# remove the threadCount argument from sys.argv if it was added for distributed training # remove the threadCount argument from sys.argv if it was added for distributed training
pattern = r"--/plugins/carb\.tasking\.plugin/threadCount=\d+" pattern = r"--/plugins/carb\.tasking\.plugin/threadCount=\d+"
sys.argv = [arg for arg in sys.argv if not re.match(pattern, arg)] sys.argv = [arg for arg in sys.argv if not re.match(pattern, arg)]
# remove additional OV args from sys.argv # remove additional OV args from sys.argv
if len(self._kit_args) > 0: if len(self._kit_args) > 0:
sys.argv = [arg for arg in sys.argv if arg not in self._kit_args] sys.argv = [arg for arg in sys.argv if arg not in self._kit_args]
......
...@@ -164,6 +164,7 @@ def test_initialization(sim, num_cubes, material_path): ...@@ -164,6 +164,7 @@ def test_initialization(sim, num_cubes, material_path):
) )
@pytest.mark.isaacsim_ci
def test_initialization_on_device_cpu(): def test_initialization_on_device_cpu():
"""Test that initialization fails with deformable body API on the CPU.""" """Test that initialization fails with deformable body API on the CPU."""
with build_simulation_context(device="cpu", auto_add_lighting=True) as sim: with build_simulation_context(device="cpu", auto_add_lighting=True) as sim:
...@@ -179,6 +180,7 @@ def test_initialization_on_device_cpu(): ...@@ -179,6 +180,7 @@ def test_initialization_on_device_cpu():
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.isaacsim_ci
def test_initialization_with_kinematic_enabled(sim, num_cubes): def test_initialization_with_kinematic_enabled(sim, num_cubes):
"""Test that initialization for prim with kinematic flag enabled.""" """Test that initialization for prim with kinematic flag enabled."""
cube_object = generate_cubes_scene(num_cubes=num_cubes, kinematic_enabled=True) cube_object = generate_cubes_scene(num_cubes=num_cubes, kinematic_enabled=True)
...@@ -205,6 +207,7 @@ def test_initialization_with_kinematic_enabled(sim, num_cubes): ...@@ -205,6 +207,7 @@ def test_initialization_with_kinematic_enabled(sim, num_cubes):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.isaacsim_ci
def test_initialization_with_no_deformable_body(sim, num_cubes): def test_initialization_with_no_deformable_body(sim, num_cubes):
"""Test that initialization fails when no deformable body is found at the provided prim path.""" """Test that initialization fails when no deformable body is found at the provided prim path."""
cube_object = generate_cubes_scene(num_cubes=num_cubes, has_api=False) cube_object = generate_cubes_scene(num_cubes=num_cubes, has_api=False)
...@@ -218,6 +221,7 @@ def test_initialization_with_no_deformable_body(sim, num_cubes): ...@@ -218,6 +221,7 @@ def test_initialization_with_no_deformable_body(sim, num_cubes):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.isaacsim_ci
def test_set_nodal_state(sim, num_cubes): def test_set_nodal_state(sim, num_cubes):
"""Test setting the state of the deformable object.""" """Test setting the state of the deformable object."""
cube_object = generate_cubes_scene(num_cubes=num_cubes) cube_object = generate_cubes_scene(num_cubes=num_cubes)
...@@ -258,6 +262,7 @@ def test_set_nodal_state(sim, num_cubes): ...@@ -258,6 +262,7 @@ def test_set_nodal_state(sim, num_cubes):
@pytest.mark.parametrize("randomize_pos", [True, False]) @pytest.mark.parametrize("randomize_pos", [True, False])
@pytest.mark.parametrize("randomize_rot", [True, False]) @pytest.mark.parametrize("randomize_rot", [True, False])
@flaky(max_runs=3, min_passes=1) @flaky(max_runs=3, min_passes=1)
@pytest.mark.isaacsim_ci
def test_set_nodal_state_with_applied_transform(sim, num_cubes, randomize_pos, randomize_rot): def test_set_nodal_state_with_applied_transform(sim, num_cubes, randomize_pos, randomize_rot):
"""Test setting the state of the deformable object with applied transform.""" """Test setting the state of the deformable object with applied transform."""
carb_settings_iface = carb.settings.get_settings() carb_settings_iface = carb.settings.get_settings()
...@@ -302,6 +307,7 @@ def test_set_nodal_state_with_applied_transform(sim, num_cubes, randomize_pos, r ...@@ -302,6 +307,7 @@ def test_set_nodal_state_with_applied_transform(sim, num_cubes, randomize_pos, r
@pytest.mark.parametrize("num_cubes", [2, 4]) @pytest.mark.parametrize("num_cubes", [2, 4])
@pytest.mark.isaacsim_ci
def test_set_kinematic_targets(sim, num_cubes): def test_set_kinematic_targets(sim, num_cubes):
"""Test setting kinematic targets for the deformable object.""" """Test setting kinematic targets for the deformable object."""
cube_object = generate_cubes_scene(num_cubes=num_cubes, height=1.0) cube_object = generate_cubes_scene(num_cubes=num_cubes, height=1.0)
......
...@@ -97,6 +97,7 @@ def generate_cubes_scene( ...@@ -97,6 +97,7 @@ def generate_cubes_scene(
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.isaacsim_ci
def test_initialization(num_cubes, device): def test_initialization(num_cubes, device):
"""Test initialization for prim with rigid body API at the provided prim path.""" """Test initialization for prim with rigid body API at the provided prim path."""
with build_simulation_context(device=device, auto_add_lighting=True) as sim: with build_simulation_context(device=device, auto_add_lighting=True) as sim:
...@@ -130,6 +131,7 @@ def test_initialization(num_cubes, device): ...@@ -130,6 +131,7 @@ def test_initialization(num_cubes, device):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.isaacsim_ci
def test_initialization_with_kinematic_enabled(num_cubes, device): def test_initialization_with_kinematic_enabled(num_cubes, device):
"""Test that initialization for prim with kinematic flag enabled.""" """Test that initialization for prim with kinematic flag enabled."""
with build_simulation_context(device=device, auto_add_lighting=True) as sim: with build_simulation_context(device=device, auto_add_lighting=True) as sim:
...@@ -165,6 +167,7 @@ def test_initialization_with_kinematic_enabled(num_cubes, device): ...@@ -165,6 +167,7 @@ def test_initialization_with_kinematic_enabled(num_cubes, device):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.isaacsim_ci
def test_initialization_with_no_rigid_body(num_cubes, device): def test_initialization_with_no_rigid_body(num_cubes, device):
"""Test that initialization fails when no rigid body is found at the provided prim path.""" """Test that initialization fails when no rigid body is found at the provided prim path."""
with build_simulation_context(device=device, auto_add_lighting=True) as sim: with build_simulation_context(device=device, auto_add_lighting=True) as sim:
...@@ -182,6 +185,7 @@ def test_initialization_with_no_rigid_body(num_cubes, device): ...@@ -182,6 +185,7 @@ def test_initialization_with_no_rigid_body(num_cubes, device):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.isaacsim_ci
def test_initialization_with_articulation_root(num_cubes, device): def test_initialization_with_articulation_root(num_cubes, device):
"""Test that initialization fails when an articulation root is found at the provided prim path.""" """Test that initialization fails when an articulation root is found at the provided prim path."""
with build_simulation_context(device=device, auto_add_lighting=True) as sim: with build_simulation_context(device=device, auto_add_lighting=True) as sim:
...@@ -198,6 +202,7 @@ def test_initialization_with_articulation_root(num_cubes, device): ...@@ -198,6 +202,7 @@ def test_initialization_with_articulation_root(num_cubes, device):
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.isaacsim_ci
def test_external_force_buffer(device): def test_external_force_buffer(device):
"""Test if external force buffer correctly updates in the force value is zero case. """Test if external force buffer correctly updates in the force value is zero case.
...@@ -277,6 +282,7 @@ def test_external_force_buffer(device): ...@@ -277,6 +282,7 @@ def test_external_force_buffer(device):
@pytest.mark.parametrize("num_cubes", [2, 4]) @pytest.mark.parametrize("num_cubes", [2, 4])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.isaacsim_ci
def test_external_force_on_single_body(num_cubes, device): def test_external_force_on_single_body(num_cubes, device):
"""Test application of external force on the base of the object. """Test application of external force on the base of the object.
...@@ -402,6 +408,7 @@ def test_external_force_on_single_body_at_position(num_cubes, device): ...@@ -402,6 +408,7 @@ def test_external_force_on_single_body_at_position(num_cubes, device):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.isaacsim_ci
def test_set_rigid_object_state(num_cubes, device): def test_set_rigid_object_state(num_cubes, device):
"""Test setting the state of the rigid object. """Test setting the state of the rigid object.
...@@ -468,6 +475,7 @@ def test_set_rigid_object_state(num_cubes, device): ...@@ -468,6 +475,7 @@ def test_set_rigid_object_state(num_cubes, device):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.isaacsim_ci
def test_reset_rigid_object(num_cubes, device): def test_reset_rigid_object(num_cubes, device):
"""Test resetting the state of the rigid object.""" """Test resetting the state of the rigid object."""
with build_simulation_context(device=device, gravity_enabled=True, auto_add_lighting=True) as sim: with build_simulation_context(device=device, gravity_enabled=True, auto_add_lighting=True) as sim:
...@@ -506,6 +514,7 @@ def test_reset_rigid_object(num_cubes, device): ...@@ -506,6 +514,7 @@ def test_reset_rigid_object(num_cubes, device):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.isaacsim_ci
def test_rigid_body_set_material_properties(num_cubes, device): def test_rigid_body_set_material_properties(num_cubes, device):
"""Test getting and setting material properties of rigid object.""" """Test getting and setting material properties of rigid object."""
with build_simulation_context( with build_simulation_context(
...@@ -544,6 +553,7 @@ def test_rigid_body_set_material_properties(num_cubes, device): ...@@ -544,6 +553,7 @@ def test_rigid_body_set_material_properties(num_cubes, device):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.isaacsim_ci
def test_rigid_body_no_friction(num_cubes, device): def test_rigid_body_no_friction(num_cubes, device):
"""Test that a rigid object with no friction will maintain it's velocity when sliding across a plane.""" """Test that a rigid object with no friction will maintain it's velocity when sliding across a plane."""
with build_simulation_context(device=device, auto_add_lighting=True) as sim: with build_simulation_context(device=device, auto_add_lighting=True) as sim:
...@@ -601,6 +611,7 @@ def test_rigid_body_no_friction(num_cubes, device): ...@@ -601,6 +611,7 @@ def test_rigid_body_no_friction(num_cubes, device):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.parametrize("device", ["cuda", "cpu"]) @pytest.mark.parametrize("device", ["cuda", "cpu"])
@pytest.mark.isaacsim_ci
def test_rigid_body_with_static_friction(num_cubes, device): def test_rigid_body_with_static_friction(num_cubes, device):
"""Test that static friction applied to rigid object works as expected. """Test that static friction applied to rigid object works as expected.
...@@ -682,6 +693,7 @@ def test_rigid_body_with_static_friction(num_cubes, device): ...@@ -682,6 +693,7 @@ def test_rigid_body_with_static_friction(num_cubes, device):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.isaacsim_ci
def test_rigid_body_with_restitution(num_cubes, device): def test_rigid_body_with_restitution(num_cubes, device):
"""Test that restitution when applied to rigid object works as expected. """Test that restitution when applied to rigid object works as expected.
...@@ -761,6 +773,7 @@ def test_rigid_body_with_restitution(num_cubes, device): ...@@ -761,6 +773,7 @@ def test_rigid_body_with_restitution(num_cubes, device):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.isaacsim_ci
def test_rigid_body_set_mass(num_cubes, device): def test_rigid_body_set_mass(num_cubes, device):
"""Test getting and setting mass of rigid object.""" """Test getting and setting mass of rigid object."""
with build_simulation_context( with build_simulation_context(
...@@ -803,6 +816,7 @@ def test_rigid_body_set_mass(num_cubes, device): ...@@ -803,6 +816,7 @@ def test_rigid_body_set_mass(num_cubes, device):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.parametrize("gravity_enabled", [True, False]) @pytest.mark.parametrize("gravity_enabled", [True, False])
@pytest.mark.isaacsim_ci
def test_gravity_vec_w(num_cubes, device, gravity_enabled): def test_gravity_vec_w(num_cubes, device, gravity_enabled):
"""Test that gravity vector direction is set correctly for the rigid object.""" """Test that gravity vector direction is set correctly for the rigid object."""
with build_simulation_context(device=device, gravity_enabled=gravity_enabled) as sim: with build_simulation_context(device=device, gravity_enabled=gravity_enabled) as sim:
...@@ -842,6 +856,7 @@ def test_gravity_vec_w(num_cubes, device, gravity_enabled): ...@@ -842,6 +856,7 @@ def test_gravity_vec_w(num_cubes, device, gravity_enabled):
@pytest.mark.parametrize("num_cubes", [1, 2]) @pytest.mark.parametrize("num_cubes", [1, 2])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.parametrize("with_offset", [True, False]) @pytest.mark.parametrize("with_offset", [True, False])
@pytest.mark.isaacsim_ci
def test_body_root_state_properties(num_cubes, device, with_offset): def test_body_root_state_properties(num_cubes, device, with_offset):
"""Test the root_com_state_w, root_link_state_w, body_com_state_w, and body_link_state_w properties.""" """Test the root_com_state_w, root_link_state_w, body_com_state_w, and body_link_state_w properties."""
with build_simulation_context(device=device, gravity_enabled=False, auto_add_lighting=True) as sim: with build_simulation_context(device=device, gravity_enabled=False, auto_add_lighting=True) as sim:
...@@ -946,6 +961,7 @@ def test_body_root_state_properties(num_cubes, device, with_offset): ...@@ -946,6 +961,7 @@ def test_body_root_state_properties(num_cubes, device, with_offset):
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.parametrize("with_offset", [True, False]) @pytest.mark.parametrize("with_offset", [True, False])
@pytest.mark.parametrize("state_location", ["com", "link"]) @pytest.mark.parametrize("state_location", ["com", "link"])
@pytest.mark.isaacsim_ci
def test_write_root_state(num_cubes, device, with_offset, state_location): def test_write_root_state(num_cubes, device, with_offset, state_location):
"""Test the setters for root_state using both the link frame and center of mass as reference frame.""" """Test the setters for root_state using both the link frame and center of mass as reference frame."""
with build_simulation_context(device=device, gravity_enabled=False, auto_add_lighting=True) as sim: with build_simulation_context(device=device, gravity_enabled=False, auto_add_lighting=True) as sim:
...@@ -1008,6 +1024,7 @@ def test_write_root_state(num_cubes, device, with_offset, state_location): ...@@ -1008,6 +1024,7 @@ def test_write_root_state(num_cubes, device, with_offset, state_location):
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.parametrize("with_offset", [True]) @pytest.mark.parametrize("with_offset", [True])
@pytest.mark.parametrize("state_location", ["com", "link", "root"]) @pytest.mark.parametrize("state_location", ["com", "link", "root"])
@pytest.mark.isaacsim_ci
def test_write_state_functions_data_consistency(num_cubes, device, with_offset, state_location): def test_write_state_functions_data_consistency(num_cubes, device, with_offset, state_location):
"""Test the setters for root_state using both the link frame and center of mass as reference frame.""" """Test the setters for root_state using both the link frame and center of mass as reference frame."""
with build_simulation_context(device=device, gravity_enabled=False, auto_add_lighting=True) as sim: with build_simulation_context(device=device, gravity_enabled=False, auto_add_lighting=True) as sim:
......
...@@ -159,6 +159,7 @@ def sim(request): ...@@ -159,6 +159,7 @@ def sim(request):
@pytest.mark.parametrize("num_articulations", [1]) @pytest.mark.parametrize("num_articulations", [1])
@pytest.mark.parametrize("device", ["cpu"]) @pytest.mark.parametrize("device", ["cpu"])
@pytest.mark.parametrize("add_ground_plane", [True]) @pytest.mark.parametrize("add_ground_plane", [True])
@pytest.mark.isaacsim_ci
def test_initialization(sim, num_articulations, device, add_ground_plane) -> None: def test_initialization(sim, num_articulations, device, add_ground_plane) -> None:
"""Test initialization for articulation with a surface gripper. """Test initialization for articulation with a surface gripper.
...@@ -204,6 +205,7 @@ def test_initialization(sim, num_articulations, device, add_ground_plane) -> Non ...@@ -204,6 +205,7 @@ def test_initialization(sim, num_articulations, device, add_ground_plane) -> Non
@pytest.mark.parametrize("device", ["cuda:0"]) @pytest.mark.parametrize("device", ["cuda:0"])
@pytest.mark.parametrize("add_ground_plane", [True]) @pytest.mark.parametrize("add_ground_plane", [True])
@pytest.mark.isaacsim_ci
def test_raise_error_if_not_cpu(sim, device, add_ground_plane) -> None: def test_raise_error_if_not_cpu(sim, device, add_ground_plane) -> None:
"""Test that the SurfaceGripper raises an error if the device is not CPU.""" """Test that the SurfaceGripper raises an error if the device is not CPU."""
isaac_sim_version = get_version() isaac_sim_version = get_version()
......
...@@ -209,6 +209,7 @@ def sim(): ...@@ -209,6 +209,7 @@ def sim():
sim.clear_instance() sim.clear_instance()
@pytest.mark.isaacsim_ci
def test_franka_pose_abs_without_inertial_decoupling(sim): def test_franka_pose_abs_without_inertial_decoupling(sim):
"""Test absolute pose control with fixed impedance and without inertial dynamics decoupling.""" """Test absolute pose control with fixed impedance and without inertial dynamics decoupling."""
( (
...@@ -257,6 +258,7 @@ def test_franka_pose_abs_without_inertial_decoupling(sim): ...@@ -257,6 +258,7 @@ def test_franka_pose_abs_without_inertial_decoupling(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_pose_abs_with_partial_inertial_decoupling(sim): def test_franka_pose_abs_with_partial_inertial_decoupling(sim):
"""Test absolute pose control with fixed impedance and partial inertial dynamics decoupling.""" """Test absolute pose control with fixed impedance and partial inertial dynamics decoupling."""
( (
...@@ -306,6 +308,7 @@ def test_franka_pose_abs_with_partial_inertial_decoupling(sim): ...@@ -306,6 +308,7 @@ def test_franka_pose_abs_with_partial_inertial_decoupling(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_pose_abs_fixed_impedance_with_gravity_compensation(sim): def test_franka_pose_abs_fixed_impedance_with_gravity_compensation(sim):
"""Test absolute pose control with fixed impedance, gravity compensation, and inertial dynamics decoupling.""" """Test absolute pose control with fixed impedance, gravity compensation, and inertial dynamics decoupling."""
( (
...@@ -356,6 +359,7 @@ def test_franka_pose_abs_fixed_impedance_with_gravity_compensation(sim): ...@@ -356,6 +359,7 @@ def test_franka_pose_abs_fixed_impedance_with_gravity_compensation(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_pose_abs(sim): def test_franka_pose_abs(sim):
"""Test absolute pose control with fixed impedance and inertial dynamics decoupling.""" """Test absolute pose control with fixed impedance and inertial dynamics decoupling."""
( (
...@@ -405,6 +409,7 @@ def test_franka_pose_abs(sim): ...@@ -405,6 +409,7 @@ def test_franka_pose_abs(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_pose_rel(sim): def test_franka_pose_rel(sim):
"""Test relative pose control with fixed impedance and inertial dynamics decoupling.""" """Test relative pose control with fixed impedance and inertial dynamics decoupling."""
( (
...@@ -454,6 +459,7 @@ def test_franka_pose_rel(sim): ...@@ -454,6 +459,7 @@ def test_franka_pose_rel(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_pose_abs_variable_impedance(sim): def test_franka_pose_abs_variable_impedance(sim):
"""Test absolute pose control with variable impedance and inertial dynamics decoupling.""" """Test absolute pose control with variable impedance and inertial dynamics decoupling."""
( (
...@@ -501,6 +507,7 @@ def test_franka_pose_abs_variable_impedance(sim): ...@@ -501,6 +507,7 @@ def test_franka_pose_abs_variable_impedance(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_wrench_abs_open_loop(sim): def test_franka_wrench_abs_open_loop(sim):
"""Test open loop absolute force control.""" """Test open loop absolute force control."""
( (
...@@ -581,6 +588,7 @@ def test_franka_wrench_abs_open_loop(sim): ...@@ -581,6 +588,7 @@ def test_franka_wrench_abs_open_loop(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_wrench_abs_closed_loop(sim): def test_franka_wrench_abs_closed_loop(sim):
"""Test closed loop absolute force control.""" """Test closed loop absolute force control."""
( (
...@@ -669,6 +677,7 @@ def test_franka_wrench_abs_closed_loop(sim): ...@@ -669,6 +677,7 @@ def test_franka_wrench_abs_closed_loop(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_hybrid_decoupled_motion(sim): def test_franka_hybrid_decoupled_motion(sim):
"""Test hybrid control with fixed impedance and partial inertial dynamics decoupling.""" """Test hybrid control with fixed impedance and partial inertial dynamics decoupling."""
( (
...@@ -744,6 +753,7 @@ def test_franka_hybrid_decoupled_motion(sim): ...@@ -744,6 +753,7 @@ def test_franka_hybrid_decoupled_motion(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_hybrid_variable_kp_impedance(sim): def test_franka_hybrid_variable_kp_impedance(sim):
"""Test hybrid control with variable kp impedance and inertial dynamics decoupling.""" """Test hybrid control with variable kp impedance and inertial dynamics decoupling."""
( (
...@@ -818,6 +828,7 @@ def test_franka_hybrid_variable_kp_impedance(sim): ...@@ -818,6 +828,7 @@ def test_franka_hybrid_variable_kp_impedance(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_taskframe_pose_abs(sim): def test_franka_taskframe_pose_abs(sim):
"""Test absolute pose control in task frame with fixed impedance and inertial dynamics decoupling.""" """Test absolute pose control in task frame with fixed impedance and inertial dynamics decoupling."""
( (
...@@ -868,6 +879,7 @@ def test_franka_taskframe_pose_abs(sim): ...@@ -868,6 +879,7 @@ def test_franka_taskframe_pose_abs(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_taskframe_pose_rel(sim): def test_franka_taskframe_pose_rel(sim):
"""Test relative pose control in task frame with fixed impedance and inertial dynamics decoupling.""" """Test relative pose control in task frame with fixed impedance and inertial dynamics decoupling."""
( (
...@@ -918,6 +930,7 @@ def test_franka_taskframe_pose_rel(sim): ...@@ -918,6 +930,7 @@ def test_franka_taskframe_pose_rel(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_taskframe_hybrid(sim): def test_franka_taskframe_hybrid(sim):
"""Test hybrid control in task frame with fixed impedance and inertial dynamics decoupling.""" """Test hybrid control in task frame with fixed impedance and inertial dynamics decoupling."""
( (
...@@ -994,6 +1007,7 @@ def test_franka_taskframe_hybrid(sim): ...@@ -994,6 +1007,7 @@ def test_franka_taskframe_hybrid(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_pose_abs_without_inertial_decoupling_with_nullspace_centering(sim): def test_franka_pose_abs_without_inertial_decoupling_with_nullspace_centering(sim):
"""Test absolute pose control with fixed impedance and nullspace centerin but without inertial decoupling.""" """Test absolute pose control with fixed impedance and nullspace centerin but without inertial decoupling."""
( (
...@@ -1043,6 +1057,7 @@ def test_franka_pose_abs_without_inertial_decoupling_with_nullspace_centering(si ...@@ -1043,6 +1057,7 @@ def test_franka_pose_abs_without_inertial_decoupling_with_nullspace_centering(si
) )
@pytest.mark.isaacsim_ci
def test_franka_pose_abs_with_partial_inertial_decoupling_nullspace_centering(sim): def test_franka_pose_abs_with_partial_inertial_decoupling_nullspace_centering(sim):
"""Test absolute pose control with fixed impedance, partial inertial decoupling and nullspace centering.""" """Test absolute pose control with fixed impedance, partial inertial decoupling and nullspace centering."""
( (
...@@ -1093,6 +1108,7 @@ def test_franka_pose_abs_with_partial_inertial_decoupling_nullspace_centering(si ...@@ -1093,6 +1108,7 @@ def test_franka_pose_abs_with_partial_inertial_decoupling_nullspace_centering(si
) )
@pytest.mark.isaacsim_ci
def test_franka_pose_abs_with_nullspace_centering(sim): def test_franka_pose_abs_with_nullspace_centering(sim):
"""Test absolute pose control with fixed impedance, inertial decoupling and nullspace centering.""" """Test absolute pose control with fixed impedance, inertial decoupling and nullspace centering."""
( (
...@@ -1143,6 +1159,7 @@ def test_franka_pose_abs_with_nullspace_centering(sim): ...@@ -1143,6 +1159,7 @@ def test_franka_pose_abs_with_nullspace_centering(sim):
) )
@pytest.mark.isaacsim_ci
def test_franka_taskframe_hybrid_with_nullspace_centering(sim): def test_franka_taskframe_hybrid_with_nullspace_centering(sim):
"""Test hybrid control in task frame with fixed impedance, inertial decoupling and nullspace centering.""" """Test hybrid control in task frame with fixed impedance, inertial decoupling and nullspace centering."""
( (
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
# isort: off # isort: off
import warnings import warnings
import pytest
warnings.filterwarnings("ignore", category=DeprecationWarning) warnings.filterwarnings("ignore", category=DeprecationWarning)
# isort: on # isort: on
...@@ -13,6 +14,7 @@ import numpy as np ...@@ -13,6 +14,7 @@ import numpy as np
import scipy.interpolate as interpolate import scipy.interpolate as interpolate
@pytest.mark.isaacsim_ci
def test_interpolation(): def test_interpolation():
"""Test scipy interpolation 2D method.""" """Test scipy interpolation 2D method."""
# parameters # parameters
......
...@@ -9,6 +9,7 @@ import torch.utils.benchmark as benchmark ...@@ -9,6 +9,7 @@ import torch.utils.benchmark as benchmark
import pytest import pytest
@pytest.mark.isaacsim_ci
def test_array_slicing(): def test_array_slicing():
"""Check that using ellipsis and slices work for torch tensors.""" """Check that using ellipsis and slices work for torch tensors."""
...@@ -31,6 +32,7 @@ def test_array_slicing(): ...@@ -31,6 +32,7 @@ def test_array_slicing():
assert my_tensor[:, 0, 0].shape == (400,) assert my_tensor[:, 0, 0].shape == (400,)
@pytest.mark.isaacsim_ci
def test_array_circular(): def test_array_circular():
"""Check circular buffer implementation in torch.""" """Check circular buffer implementation in torch."""
...@@ -74,6 +76,7 @@ def test_array_circular(): ...@@ -74,6 +76,7 @@ def test_array_circular():
assert torch.allclose(my_tensor_4, my_tensor.roll(1, dims=1)) assert torch.allclose(my_tensor_4, my_tensor.roll(1, dims=1))
@pytest.mark.isaacsim_ci
def test_array_circular_copy(): def test_array_circular_copy():
"""Check that circular buffer implementation in torch is copying data.""" """Check that circular buffer implementation in torch is copying data."""
...@@ -92,6 +95,7 @@ def test_array_circular_copy(): ...@@ -92,6 +95,7 @@ def test_array_circular_copy():
assert torch.allclose(my_tensor_1, my_tensor_clone.roll(1, dims=1)) assert torch.allclose(my_tensor_1, my_tensor_clone.roll(1, dims=1))
@pytest.mark.isaacsim_ci
def test_array_multi_indexing(): def test_array_multi_indexing():
"""Check multi-indexing works for torch tensors.""" """Check multi-indexing works for torch tensors."""
...@@ -103,6 +107,7 @@ def test_array_multi_indexing(): ...@@ -103,6 +107,7 @@ def test_array_multi_indexing():
my_tensor[[0, 1, 2, 3], [0, 1, 2, 3, 4]] my_tensor[[0, 1, 2, 3], [0, 1, 2, 3, 4]]
@pytest.mark.isaacsim_ci
def test_array_single_indexing(): def test_array_single_indexing():
"""Check how indexing effects the returned tensor.""" """Check how indexing effects the returned tensor."""
...@@ -126,6 +131,7 @@ def test_array_single_indexing(): ...@@ -126,6 +131,7 @@ def test_array_single_indexing():
assert my_slice.untyped_storage().data_ptr() != my_tensor.untyped_storage().data_ptr() assert my_slice.untyped_storage().data_ptr() != my_tensor.untyped_storage().data_ptr()
@pytest.mark.isaacsim_ci
def test_logical_or(): def test_logical_or():
"""Test bitwise or operation.""" """Test bitwise or operation."""
......
...@@ -150,6 +150,7 @@ def empty_env(): ...@@ -150,6 +150,7 @@ def empty_env():
env.close() env.close()
@pytest.mark.isaacsim_ci
def test_xr_anchor(empty_env, mock_xrcore): def test_xr_anchor(empty_env, mock_xrcore):
"""Test XR anchor creation and configuration.""" """Test XR anchor creation and configuration."""
env, env_cfg = empty_env env, env_cfg = empty_env
...@@ -172,6 +173,7 @@ def test_xr_anchor(empty_env, mock_xrcore): ...@@ -172,6 +173,7 @@ def test_xr_anchor(empty_env, mock_xrcore):
device.reset() device.reset()
@pytest.mark.isaacsim_ci
def test_xr_anchor_default(empty_env, mock_xrcore): def test_xr_anchor_default(empty_env, mock_xrcore):
"""Test XR anchor creation with default configuration.""" """Test XR anchor creation with default configuration."""
env, _ = empty_env env, _ = empty_env
...@@ -193,6 +195,7 @@ def test_xr_anchor_default(empty_env, mock_xrcore): ...@@ -193,6 +195,7 @@ def test_xr_anchor_default(empty_env, mock_xrcore):
device.reset() device.reset()
@pytest.mark.isaacsim_ci
def test_xr_anchor_multiple_devices(empty_env, mock_xrcore): def test_xr_anchor_multiple_devices(empty_env, mock_xrcore):
"""Test XR anchor behavior with multiple devices.""" """Test XR anchor behavior with multiple devices."""
env, _ = empty_env env, _ = empty_env
...@@ -216,6 +219,7 @@ def test_xr_anchor_multiple_devices(empty_env, mock_xrcore): ...@@ -216,6 +219,7 @@ def test_xr_anchor_multiple_devices(empty_env, mock_xrcore):
device_2.reset() device_2.reset()
@pytest.mark.isaacsim_ci
def test_get_raw_data(empty_env, mock_xrcore): def test_get_raw_data(empty_env, mock_xrcore):
"""Test the _get_raw_data method returns correctly formatted tracking data.""" """Test the _get_raw_data method returns correctly formatted tracking data."""
env, _ = empty_env env, _ = empty_env
......
...@@ -10,9 +10,12 @@ from __future__ import annotations ...@@ -10,9 +10,12 @@ from __future__ import annotations
import time import time
import pytest
from isaaclab.app import AppLauncher from isaaclab.app import AppLauncher
@pytest.mark.isaacsim_ci
def test_kit_start_up_time(): def test_kit_start_up_time():
"""Test kit start-up time.""" """Test kit start-up time."""
start_time = time.time() start_time = time.time()
......
...@@ -33,6 +33,7 @@ from isaaclab.utils.timer import Timer ...@@ -33,6 +33,7 @@ from isaaclab.utils.timer import Timer
({"name": "Anymal_D", "robot_cfg": ANYMAL_D_CFG, "expected_load_time": 40.0}, "cpu"), ({"name": "Anymal_D", "robot_cfg": ANYMAL_D_CFG, "expected_load_time": 40.0}, "cpu"),
], ],
) )
@pytest.mark.isaacsim_ci
def test_robot_load_performance(test_config, device): def test_robot_load_performance(test_config, device):
"""Test robot load time.""" """Test robot load time."""
with build_simulation_context(device=device) as sim: with build_simulation_context(device=device) as sim:
......
...@@ -369,6 +369,7 @@ def test_no_contact_reporting(setup_simulation): ...@@ -369,6 +369,7 @@ def test_no_contact_reporting(setup_simulation):
assert contact_sensor_2.data.force_matrix_w.sum().item() == 0.0 assert contact_sensor_2.data.force_matrix_w.sum().item() == 0.0
@pytest.mark.isaacsim_ci
def test_sensor_print(setup_simulation): def test_sensor_print(setup_simulation):
"""Test sensor print is working correctly.""" """Test sensor print is working correctly."""
sim_dt, durations, terrains, devices, carb_settings_iface = setup_simulation sim_dt, durations, terrains, devices, carb_settings_iface = setup_simulation
......
...@@ -384,6 +384,7 @@ def test_frame_transformer_robot_body_to_external_cube(sim): ...@@ -384,6 +384,7 @@ def test_frame_transformer_robot_body_to_external_cube(sim):
torch.testing.assert_close(cube_quat_source_tf[:, 0], cube_quat_b) torch.testing.assert_close(cube_quat_source_tf[:, 0], cube_quat_b)
@pytest.mark.isaacsim_ci
def test_frame_transformer_offset_frames(sim): def test_frame_transformer_offset_frames(sim):
"""Test body transformation w.r.t. base source frame. """Test body transformation w.r.t. base source frame.
...@@ -479,6 +480,7 @@ def test_frame_transformer_offset_frames(sim): ...@@ -479,6 +480,7 @@ def test_frame_transformer_offset_frames(sim):
torch.testing.assert_close(cube_quat_bottom, cube_quat_w_gt) torch.testing.assert_close(cube_quat_bottom, cube_quat_w_gt)
@pytest.mark.isaacsim_ci
def test_frame_transformer_all_bodies(sim): def test_frame_transformer_all_bodies(sim):
"""Test transformation of all bodies w.r.t. base source frame. """Test transformation of all bodies w.r.t. base source frame.
...@@ -568,6 +570,7 @@ def test_frame_transformer_all_bodies(sim): ...@@ -568,6 +570,7 @@ def test_frame_transformer_all_bodies(sim):
torch.testing.assert_close(bodies_quat_source_tf[:, index], body_quat_b) torch.testing.assert_close(bodies_quat_source_tf[:, index], body_quat_b)
@pytest.mark.isaacsim_ci
def test_sensor_print(sim): def test_sensor_print(sim):
"""Test sensor print is working correctly.""" """Test sensor print is working correctly."""
# Spawn things into stage # Spawn things into stage
......
...@@ -174,6 +174,7 @@ def setup_sim(): ...@@ -174,6 +174,7 @@ def setup_sim():
sim.clear_instance() sim.clear_instance()
@pytest.mark.isaacsim_ci
def test_constant_velocity(setup_sim): def test_constant_velocity(setup_sim):
"""Test the Imu sensor with a constant velocity. """Test the Imu sensor with a constant velocity.
...@@ -262,6 +263,7 @@ def test_constant_velocity(setup_sim): ...@@ -262,6 +263,7 @@ def test_constant_velocity(setup_sim):
prev_ang_acc_cube = scene.sensors["imu_cube"].data.ang_acc_b.clone() prev_ang_acc_cube = scene.sensors["imu_cube"].data.ang_acc_b.clone()
@pytest.mark.isaacsim_ci
def test_constant_acceleration(setup_sim): def test_constant_acceleration(setup_sim):
"""Test the Imu sensor with a constant acceleration.""" """Test the Imu sensor with a constant acceleration."""
sim, scene = setup_sim sim, scene = setup_sim
...@@ -305,6 +307,7 @@ def test_constant_acceleration(setup_sim): ...@@ -305,6 +307,7 @@ def test_constant_acceleration(setup_sim):
) )
@pytest.mark.isaacsim_ci
def test_single_dof_pendulum(setup_sim): def test_single_dof_pendulum(setup_sim):
"""Test imu against analytical pendulum problem.""" """Test imu against analytical pendulum problem."""
sim, scene = setup_sim sim, scene = setup_sim
...@@ -438,6 +441,7 @@ def test_single_dof_pendulum(setup_sim): ...@@ -438,6 +441,7 @@ def test_single_dof_pendulum(setup_sim):
) )
@pytest.mark.isaacsim_ci
def test_offset_calculation(setup_sim): def test_offset_calculation(setup_sim):
"""Test offset configuration argument.""" """Test offset configuration argument."""
sim, scene = setup_sim sim, scene = setup_sim
...@@ -512,6 +516,7 @@ def test_offset_calculation(setup_sim): ...@@ -512,6 +516,7 @@ def test_offset_calculation(setup_sim):
) )
@pytest.mark.isaacsim_ci
def test_env_ids_propagation(setup_sim): def test_env_ids_propagation(setup_sim):
"""Test that env_ids argument propagates through update and reset methods""" """Test that env_ids argument propagates through update and reset methods"""
sim, scene = setup_sim sim, scene = setup_sim
...@@ -542,6 +547,7 @@ def test_env_ids_propagation(setup_sim): ...@@ -542,6 +547,7 @@ def test_env_ids_propagation(setup_sim):
scene.update(sim.get_physics_dt()) scene.update(sim.get_physics_dt())
@pytest.mark.isaacsim_ci
def test_sensor_print(setup_sim): def test_sensor_print(setup_sim):
"""Test sensor print is working correctly.""" """Test sensor print is working correctly."""
sim, scene = setup_sim sim, scene = setup_sim
......
...@@ -68,6 +68,7 @@ def setup_camera(): ...@@ -68,6 +68,7 @@ def setup_camera():
sim.clear_instance() sim.clear_instance()
@pytest.mark.isaacsim_ci
def test_multi_tiled_camera_init(setup_camera): def test_multi_tiled_camera_init(setup_camera):
"""Test initialization of multiple tiled cameras.""" """Test initialization of multiple tiled cameras."""
camera_cfg, sim, dt = setup_camera camera_cfg, sim, dt = setup_camera
...@@ -149,6 +150,7 @@ def test_multi_tiled_camera_init(setup_camera): ...@@ -149,6 +150,7 @@ def test_multi_tiled_camera_init(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_all_annotators_multi_tiled_camera(setup_camera): def test_all_annotators_multi_tiled_camera(setup_camera):
"""Test initialization of multiple tiled cameras with all supported annotators.""" """Test initialization of multiple tiled cameras with all supported annotators."""
camera_cfg, sim, dt = setup_camera camera_cfg, sim, dt = setup_camera
...@@ -261,6 +263,7 @@ def test_all_annotators_multi_tiled_camera(setup_camera): ...@@ -261,6 +263,7 @@ def test_all_annotators_multi_tiled_camera(setup_camera):
@flaky(max_runs=3, min_passes=1) @flaky(max_runs=3, min_passes=1)
@pytest.mark.isaacsim_ci
def test_different_resolution_multi_tiled_camera(setup_camera): def test_different_resolution_multi_tiled_camera(setup_camera):
"""Test multiple tiled cameras with different resolutions.""" """Test multiple tiled cameras with different resolutions."""
camera_cfg, sim, dt = setup_camera camera_cfg, sim, dt = setup_camera
...@@ -332,6 +335,7 @@ def test_different_resolution_multi_tiled_camera(setup_camera): ...@@ -332,6 +335,7 @@ def test_different_resolution_multi_tiled_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_frame_offset_multi_tiled_camera(setup_camera): def test_frame_offset_multi_tiled_camera(setup_camera):
"""Test frame offset issue with multiple tiled cameras""" """Test frame offset issue with multiple tiled cameras"""
camera_cfg, sim, dt = setup_camera camera_cfg, sim, dt = setup_camera
...@@ -397,6 +401,7 @@ def test_frame_offset_multi_tiled_camera(setup_camera): ...@@ -397,6 +401,7 @@ def test_frame_offset_multi_tiled_camera(setup_camera):
@flaky(max_runs=3, min_passes=1) @flaky(max_runs=3, min_passes=1)
@pytest.mark.isaacsim_ci
def test_frame_different_poses_multi_tiled_camera(setup_camera): def test_frame_different_poses_multi_tiled_camera(setup_camera):
"""Test multiple tiled cameras placed at different poses render different images.""" """Test multiple tiled cameras placed at different poses render different images."""
camera_cfg, sim, dt = setup_camera camera_cfg, sim, dt = setup_camera
......
...@@ -42,6 +42,7 @@ def temp_dir(): ...@@ -42,6 +42,7 @@ def temp_dir():
@pytest.mark.parametrize("task_name", ["Isaac-Stack-Cube-Franka-IK-Rel-v0"]) @pytest.mark.parametrize("task_name", ["Isaac-Stack-Cube-Franka-IK-Rel-v0"])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.parametrize("num_envs", [1, 2]) @pytest.mark.parametrize("num_envs", [1, 2])
@pytest.mark.isaacsim_ci
def test_action_state_recorder_terms(temp_dir, task_name, device, num_envs): def test_action_state_recorder_terms(temp_dir, task_name, device, num_envs):
"""Check FrameTransformer values after reset.""" """Check FrameTransformer values after reset."""
omni.usd.get_context().new_stage() omni.usd.get_context().new_stage()
......
...@@ -100,6 +100,7 @@ def setup_sim(): ...@@ -100,6 +100,7 @@ def setup_sim():
teardown(sim) teardown(sim)
@pytest.mark.isaacsim_ci
def test_camera_init(setup_sim): def test_camera_init(setup_sim):
"""Test camera initialization.""" """Test camera initialization."""
sim, camera_cfg, dt = setup_sim sim, camera_cfg, dt = setup_sim
...@@ -136,6 +137,7 @@ def test_camera_init(setup_sim): ...@@ -136,6 +137,7 @@ def test_camera_init(setup_sim):
assert camera.frame[0] == 0 assert camera.frame[0] == 0
@pytest.mark.isaacsim_ci
def test_camera_resolution(setup_sim): def test_camera_resolution(setup_sim):
"""Test camera resolution is correctly set.""" """Test camera resolution is correctly set."""
sim, camera_cfg, dt = setup_sim sim, camera_cfg, dt = setup_sim
...@@ -149,6 +151,7 @@ def test_camera_resolution(setup_sim): ...@@ -149,6 +151,7 @@ def test_camera_resolution(setup_sim):
assert im_data.shape == (1, camera_cfg.pattern_cfg.height, camera_cfg.pattern_cfg.width, 1) assert im_data.shape == (1, camera_cfg.pattern_cfg.height, camera_cfg.pattern_cfg.width, 1)
@pytest.mark.isaacsim_ci
def test_depth_clipping(setup_sim): def test_depth_clipping(setup_sim):
"""Test depth clipping. """Test depth clipping.
...@@ -237,6 +240,7 @@ def test_depth_clipping(setup_sim): ...@@ -237,6 +240,7 @@ def test_depth_clipping(setup_sim):
assert camera_max.data.output["distance_to_image_plane"].max() <= camera_cfg_zero.max_distance assert camera_max.data.output["distance_to_image_plane"].max() <= camera_cfg_zero.max_distance
@pytest.mark.isaacsim_ci
def test_camera_init_offset(setup_sim): def test_camera_init_offset(setup_sim):
"""Test camera initialization with offset using different conventions.""" """Test camera initialization with offset using different conventions."""
sim, camera_cfg, dt = setup_sim sim, camera_cfg, dt = setup_sim
...@@ -292,6 +296,7 @@ def test_camera_init_offset(setup_sim): ...@@ -292,6 +296,7 @@ def test_camera_init_offset(setup_sim):
np.testing.assert_allclose(camera_ros.data.quat_w_world[0].cpu().numpy(), QUAT_WORLD, rtol=1e-5) np.testing.assert_allclose(camera_ros.data.quat_w_world[0].cpu().numpy(), QUAT_WORLD, rtol=1e-5)
@pytest.mark.isaacsim_ci
def test_camera_init_intrinsic_matrix(setup_sim): def test_camera_init_intrinsic_matrix(setup_sim):
"""Test camera initialization from intrinsic matrix.""" """Test camera initialization from intrinsic matrix."""
sim, camera_cfg, dt = setup_sim sim, camera_cfg, dt = setup_sim
...@@ -343,6 +348,7 @@ def test_camera_init_intrinsic_matrix(setup_sim): ...@@ -343,6 +348,7 @@ def test_camera_init_intrinsic_matrix(setup_sim):
) )
@pytest.mark.isaacsim_ci
def test_multi_camera_init(setup_sim): def test_multi_camera_init(setup_sim):
"""Test multi-camera initialization.""" """Test multi-camera initialization."""
sim, camera_cfg, dt = setup_sim sim, camera_cfg, dt = setup_sim
...@@ -381,6 +387,7 @@ def test_multi_camera_init(setup_sim): ...@@ -381,6 +387,7 @@ def test_multi_camera_init(setup_sim):
assert im_data.shape == (1, camera_cfg.pattern_cfg.height, camera_cfg.pattern_cfg.width, 1) assert im_data.shape == (1, camera_cfg.pattern_cfg.height, camera_cfg.pattern_cfg.width, 1)
@pytest.mark.isaacsim_ci
def test_camera_set_world_poses(setup_sim): def test_camera_set_world_poses(setup_sim):
"""Test camera function to set specific world pose.""" """Test camera function to set specific world pose."""
sim, camera_cfg, dt = setup_sim sim, camera_cfg, dt = setup_sim
...@@ -399,6 +406,7 @@ def test_camera_set_world_poses(setup_sim): ...@@ -399,6 +406,7 @@ def test_camera_set_world_poses(setup_sim):
torch.testing.assert_close(camera.data.quat_w_world, orientation) torch.testing.assert_close(camera.data.quat_w_world, orientation)
@pytest.mark.isaacsim_ci
def test_camera_set_world_poses_from_view(setup_sim): def test_camera_set_world_poses_from_view(setup_sim):
"""Test camera function to set specific world pose from view.""" """Test camera function to set specific world pose from view."""
sim, camera_cfg, dt = setup_sim sim, camera_cfg, dt = setup_sim
...@@ -418,6 +426,7 @@ def test_camera_set_world_poses_from_view(setup_sim): ...@@ -418,6 +426,7 @@ def test_camera_set_world_poses_from_view(setup_sim):
torch.testing.assert_close(camera.data.quat_w_ros, quat_ros_gt) torch.testing.assert_close(camera.data.quat_w_ros, quat_ros_gt)
@pytest.mark.isaacsim_ci
def test_intrinsic_matrix(setup_sim): def test_intrinsic_matrix(setup_sim):
"""Checks that the camera's set and retrieve methods work for intrinsic matrix.""" """Checks that the camera's set and retrieve methods work for intrinsic matrix."""
sim, camera_cfg, dt = setup_sim sim, camera_cfg, dt = setup_sim
...@@ -442,6 +451,7 @@ def test_intrinsic_matrix(setup_sim): ...@@ -442,6 +451,7 @@ def test_intrinsic_matrix(setup_sim):
torch.testing.assert_close(rs_intrinsic_matrix, camera.data.intrinsic_matrices) torch.testing.assert_close(rs_intrinsic_matrix, camera.data.intrinsic_matrices)
@pytest.mark.isaacsim_ci
def test_throughput(setup_sim): def test_throughput(setup_sim):
"""Checks that the single camera gets created properly with a rig.""" """Checks that the single camera gets created properly with a rig."""
sim, camera_cfg, dt = setup_sim sim, camera_cfg, dt = setup_sim
...@@ -493,6 +503,7 @@ def test_throughput(setup_sim): ...@@ -493,6 +503,7 @@ def test_throughput(setup_sim):
assert im_data.shape == (1, camera_cfg.pattern_cfg.height, camera_cfg.pattern_cfg.width, 1) assert im_data.shape == (1, camera_cfg.pattern_cfg.height, camera_cfg.pattern_cfg.width, 1)
@pytest.mark.isaacsim_ci
def test_output_equal_to_usdcamera(setup_sim): def test_output_equal_to_usdcamera(setup_sim):
sim, camera_cfg, dt = setup_sim sim, camera_cfg, dt = setup_sim
camera_pattern_cfg = patterns.PinholeCameraPatternCfg( camera_pattern_cfg = patterns.PinholeCameraPatternCfg(
...@@ -589,6 +600,7 @@ def test_output_equal_to_usdcamera(setup_sim): ...@@ -589,6 +600,7 @@ def test_output_equal_to_usdcamera(setup_sim):
) )
@pytest.mark.isaacsim_ci
def test_output_equal_to_usdcamera_offset(setup_sim): def test_output_equal_to_usdcamera_offset(setup_sim):
sim, camera_cfg, dt = setup_sim sim, camera_cfg, dt = setup_sim
offset_rot = [-0.1251, 0.3617, 0.8731, -0.3020] offset_rot = [-0.1251, 0.3617, 0.8731, -0.3020]
...@@ -664,6 +676,7 @@ def test_output_equal_to_usdcamera_offset(setup_sim): ...@@ -664,6 +676,7 @@ def test_output_equal_to_usdcamera_offset(setup_sim):
) )
@pytest.mark.isaacsim_ci
def test_output_equal_to_usdcamera_prim_offset(setup_sim): def test_output_equal_to_usdcamera_prim_offset(setup_sim):
"""Test that the output of the ray caster camera is equal to the output of the usd camera when both are placed """Test that the output of the ray caster camera is equal to the output of the usd camera when both are placed
under an XForm prim that is translated and rotated from the world origin under an XForm prim that is translated and rotated from the world origin
...@@ -758,6 +771,7 @@ def test_output_equal_to_usdcamera_prim_offset(setup_sim): ...@@ -758,6 +771,7 @@ def test_output_equal_to_usdcamera_prim_offset(setup_sim):
@pytest.mark.parametrize("focal_length", [0.193, 1.93, 19.3]) @pytest.mark.parametrize("focal_length", [0.193, 1.93, 19.3])
@pytest.mark.isaacsim_ci
def test_output_equal_to_usd_camera_intrinsics(setup_sim, focal_length): def test_output_equal_to_usd_camera_intrinsics(setup_sim, focal_length):
""" """
Test that the output of the ray caster camera and usd camera are the same when both are Test that the output of the ray caster camera and usd camera are the same when both are
...@@ -879,6 +893,7 @@ def test_output_equal_to_usd_camera_intrinsics(setup_sim, focal_length): ...@@ -879,6 +893,7 @@ def test_output_equal_to_usd_camera_intrinsics(setup_sim, focal_length):
@pytest.mark.parametrize("focal_length_aperture", [(0.193, 0.20955), (1.93, 2.0955), (19.3, 20.955), (0.193, 20.955)]) @pytest.mark.parametrize("focal_length_aperture", [(0.193, 0.20955), (1.93, 2.0955), (19.3, 20.955), (0.193, 20.955)])
@pytest.mark.isaacsim_ci
def test_output_equal_to_usd_camera_when_intrinsics_set(setup_sim, focal_length_aperture): def test_output_equal_to_usd_camera_when_intrinsics_set(setup_sim, focal_length_aperture):
""" """
Test that the output of the ray caster camera is equal to the output of the usd camera when both are placed Test that the output of the ray caster camera is equal to the output of the usd camera when both are placed
...@@ -988,6 +1003,7 @@ def test_output_equal_to_usd_camera_when_intrinsics_set(setup_sim, focal_length_ ...@@ -988,6 +1003,7 @@ def test_output_equal_to_usd_camera_when_intrinsics_set(setup_sim, focal_length_
del camera_warp, camera_usd del camera_warp, camera_usd
@pytest.mark.isaacsim_ci
def test_sensor_print(setup_sim): def test_sensor_print(setup_sim):
"""Test sensor print is working correctly.""" """Test sensor print is working correctly."""
sim, camera_cfg, dt = setup_sim sim, camera_cfg, dt = setup_sim
......
...@@ -72,6 +72,7 @@ def setup_camera() -> tuple[sim_utils.SimulationContext, TiledCameraCfg, float]: ...@@ -72,6 +72,7 @@ def setup_camera() -> tuple[sim_utils.SimulationContext, TiledCameraCfg, float]:
sim.clear_instance() sim.clear_instance()
@pytest.mark.isaacsim_ci
def test_single_camera_init(setup_camera): def test_single_camera_init(setup_camera):
"""Test single camera initialization.""" """Test single camera initialization."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -118,6 +119,7 @@ def test_single_camera_init(setup_camera): ...@@ -118,6 +119,7 @@ def test_single_camera_init(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_depth_clipping_max(setup_camera): def test_depth_clipping_max(setup_camera):
"""Test depth max clipping.""" """Test depth max clipping."""
sim, _, dt = setup_camera sim, _, dt = setup_camera
...@@ -156,6 +158,7 @@ def test_depth_clipping_max(setup_camera): ...@@ -156,6 +158,7 @@ def test_depth_clipping_max(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_depth_clipping_none(setup_camera): def test_depth_clipping_none(setup_camera):
"""Test depth none clipping.""" """Test depth none clipping."""
sim, _, dt = setup_camera sim, _, dt = setup_camera
...@@ -198,6 +201,7 @@ def test_depth_clipping_none(setup_camera): ...@@ -198,6 +201,7 @@ def test_depth_clipping_none(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_depth_clipping_zero(setup_camera): def test_depth_clipping_zero(setup_camera):
"""Test depth zero clipping.""" """Test depth zero clipping."""
sim, _, dt = setup_camera sim, _, dt = setup_camera
...@@ -236,6 +240,7 @@ def test_depth_clipping_zero(setup_camera): ...@@ -236,6 +240,7 @@ def test_depth_clipping_zero(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_multi_camera_init(setup_camera): def test_multi_camera_init(setup_camera):
"""Test multi-camera initialization.""" """Test multi-camera initialization."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -291,6 +296,7 @@ def test_multi_camera_init(setup_camera): ...@@ -291,6 +296,7 @@ def test_multi_camera_init(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_rgb_only_camera(setup_camera): def test_rgb_only_camera(setup_camera):
"""Test initialization with only RGB data type.""" """Test initialization with only RGB data type."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -343,6 +349,7 @@ def test_rgb_only_camera(setup_camera): ...@@ -343,6 +349,7 @@ def test_rgb_only_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_data_types(setup_camera): def test_data_types(setup_camera):
"""Test different data types for camera initialization.""" """Test different data types for camera initialization."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -389,6 +396,7 @@ def test_data_types(setup_camera): ...@@ -389,6 +396,7 @@ def test_data_types(setup_camera):
del camera_both del camera_both
@pytest.mark.isaacsim_ci
def test_depth_only_camera(setup_camera): def test_depth_only_camera(setup_camera):
"""Test initialization with only depth.""" """Test initialization with only depth."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -441,6 +449,7 @@ def test_depth_only_camera(setup_camera): ...@@ -441,6 +449,7 @@ def test_depth_only_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_rgba_only_camera(setup_camera): def test_rgba_only_camera(setup_camera):
"""Test initialization with only RGBA.""" """Test initialization with only RGBA."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -493,6 +502,7 @@ def test_rgba_only_camera(setup_camera): ...@@ -493,6 +502,7 @@ def test_rgba_only_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_distance_to_camera_only_camera(setup_camera): def test_distance_to_camera_only_camera(setup_camera):
"""Test initialization with only distance_to_camera.""" """Test initialization with only distance_to_camera."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -545,6 +555,7 @@ def test_distance_to_camera_only_camera(setup_camera): ...@@ -545,6 +555,7 @@ def test_distance_to_camera_only_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_distance_to_image_plane_only_camera(setup_camera): def test_distance_to_image_plane_only_camera(setup_camera):
"""Test initialization with only distance_to_image_plane.""" """Test initialization with only distance_to_image_plane."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -597,6 +608,7 @@ def test_distance_to_image_plane_only_camera(setup_camera): ...@@ -597,6 +608,7 @@ def test_distance_to_image_plane_only_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_normals_only_camera(setup_camera): def test_normals_only_camera(setup_camera):
"""Test initialization with only normals.""" """Test initialization with only normals."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -649,6 +661,7 @@ def test_normals_only_camera(setup_camera): ...@@ -649,6 +661,7 @@ def test_normals_only_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_motion_vectors_only_camera(setup_camera): def test_motion_vectors_only_camera(setup_camera):
"""Test initialization with only motion_vectors.""" """Test initialization with only motion_vectors."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -701,6 +714,7 @@ def test_motion_vectors_only_camera(setup_camera): ...@@ -701,6 +714,7 @@ def test_motion_vectors_only_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_semantic_segmentation_colorize_only_camera(setup_camera): def test_semantic_segmentation_colorize_only_camera(setup_camera):
"""Test initialization with only semantic_segmentation.""" """Test initialization with only semantic_segmentation."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -754,6 +768,7 @@ def test_semantic_segmentation_colorize_only_camera(setup_camera): ...@@ -754,6 +768,7 @@ def test_semantic_segmentation_colorize_only_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_instance_segmentation_fast_colorize_only_camera(setup_camera): def test_instance_segmentation_fast_colorize_only_camera(setup_camera):
"""Test initialization with only instance_segmentation_fast.""" """Test initialization with only instance_segmentation_fast."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -807,6 +822,7 @@ def test_instance_segmentation_fast_colorize_only_camera(setup_camera): ...@@ -807,6 +822,7 @@ def test_instance_segmentation_fast_colorize_only_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_instance_id_segmentation_fast_colorize_only_camera(setup_camera): def test_instance_id_segmentation_fast_colorize_only_camera(setup_camera):
"""Test initialization with only instance_id_segmentation_fast.""" """Test initialization with only instance_id_segmentation_fast."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -860,6 +876,7 @@ def test_instance_id_segmentation_fast_colorize_only_camera(setup_camera): ...@@ -860,6 +876,7 @@ def test_instance_id_segmentation_fast_colorize_only_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_semantic_segmentation_non_colorize_only_camera(setup_camera): def test_semantic_segmentation_non_colorize_only_camera(setup_camera):
"""Test initialization with only semantic_segmentation.""" """Test initialization with only semantic_segmentation."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -915,6 +932,7 @@ def test_semantic_segmentation_non_colorize_only_camera(setup_camera): ...@@ -915,6 +932,7 @@ def test_semantic_segmentation_non_colorize_only_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_instance_segmentation_fast_non_colorize_only_camera(setup_camera): def test_instance_segmentation_fast_non_colorize_only_camera(setup_camera):
"""Test initialization with only instance_segmentation_fast.""" """Test initialization with only instance_segmentation_fast."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -1023,6 +1041,7 @@ def test_instance_id_segmentation_fast_non_colorize_only_camera(setup_camera): ...@@ -1023,6 +1041,7 @@ def test_instance_id_segmentation_fast_non_colorize_only_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_all_annotators_camera(setup_camera): def test_all_annotators_camera(setup_camera):
"""Test initialization with all supported annotators.""" """Test initialization with all supported annotators."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -1121,6 +1140,7 @@ def test_all_annotators_camera(setup_camera): ...@@ -1121,6 +1140,7 @@ def test_all_annotators_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_all_annotators_low_resolution_camera(setup_camera): def test_all_annotators_low_resolution_camera(setup_camera):
"""Test initialization with all supported annotators.""" """Test initialization with all supported annotators."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -1221,6 +1241,7 @@ def test_all_annotators_low_resolution_camera(setup_camera): ...@@ -1221,6 +1241,7 @@ def test_all_annotators_low_resolution_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_all_annotators_non_perfect_square_number_camera(setup_camera): def test_all_annotators_non_perfect_square_number_camera(setup_camera):
"""Test initialization with all supported annotators.""" """Test initialization with all supported annotators."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -1319,6 +1340,7 @@ def test_all_annotators_non_perfect_square_number_camera(setup_camera): ...@@ -1319,6 +1340,7 @@ def test_all_annotators_non_perfect_square_number_camera(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_all_annotators_instanceable(setup_camera): def test_all_annotators_instanceable(setup_camera):
"""Test initialization with all supported annotators on instanceable assets.""" """Test initialization with all supported annotators on instanceable assets."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -1448,6 +1470,7 @@ def test_all_annotators_instanceable(setup_camera): ...@@ -1448,6 +1470,7 @@ def test_all_annotators_instanceable(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_throughput(setup_camera): def test_throughput(setup_camera):
"""Test tiled camera throughput.""" """Test tiled camera throughput."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -1484,6 +1507,7 @@ def test_throughput(setup_camera): ...@@ -1484,6 +1507,7 @@ def test_throughput(setup_camera):
del camera del camera
@pytest.mark.isaacsim_ci
def test_output_equal_to_usd_camera_intrinsics(setup_camera): def test_output_equal_to_usd_camera_intrinsics(setup_camera):
""" """
Test that the output of the ray caster camera and the usd camera are the same when both are Test that the output of the ray caster camera and the usd camera are the same when both are
...@@ -1575,6 +1599,7 @@ def test_output_equal_to_usd_camera_intrinsics(setup_camera): ...@@ -1575,6 +1599,7 @@ def test_output_equal_to_usd_camera_intrinsics(setup_camera):
del camera_usd del camera_usd
@pytest.mark.isaacsim_ci
def test_sensor_print(setup_camera): def test_sensor_print(setup_camera):
"""Test sensor print is working correctly.""" """Test sensor print is working correctly."""
sim, camera_cfg, _ = setup_camera sim, camera_cfg, _ = setup_camera
...@@ -1586,6 +1611,7 @@ def test_sensor_print(setup_camera): ...@@ -1586,6 +1611,7 @@ def test_sensor_print(setup_camera):
print(sensor) print(sensor)
@pytest.mark.isaacsim_ci
def test_frame_offset_small_resolution(setup_camera): def test_frame_offset_small_resolution(setup_camera):
"""Test frame offset issue with small resolution camera.""" """Test frame offset issue with small resolution camera."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
...@@ -1628,6 +1654,7 @@ def test_frame_offset_small_resolution(setup_camera): ...@@ -1628,6 +1654,7 @@ def test_frame_offset_small_resolution(setup_camera):
assert torch.abs(image_after - image_before).mean() > 0.1 # images of same color should be below 0.01 assert torch.abs(image_after - image_before).mean() > 0.1 # images of same color should be below 0.01
@pytest.mark.isaacsim_ci
def test_frame_offset_large_resolution(setup_camera): def test_frame_offset_large_resolution(setup_camera):
"""Test frame offset issue with large resolution camera.""" """Test frame offset issue with large resolution camera."""
sim, camera_cfg, dt = setup_camera sim, camera_cfg, dt = setup_camera
......
...@@ -30,6 +30,7 @@ from isaaclab.sim.simulation_context import build_simulation_context ...@@ -30,6 +30,7 @@ from isaaclab.sim.simulation_context import build_simulation_context
@pytest.mark.parametrize("gravity_enabled", [True, False]) @pytest.mark.parametrize("gravity_enabled", [True, False])
@pytest.mark.parametrize("device", ["cuda:0", "cpu"]) @pytest.mark.parametrize("device", ["cuda:0", "cpu"])
@pytest.mark.parametrize("dt", [0.01, 0.1]) @pytest.mark.parametrize("dt", [0.01, 0.1])
@pytest.mark.isaacsim_ci
def test_build_simulation_context_no_cfg(gravity_enabled, device, dt): def test_build_simulation_context_no_cfg(gravity_enabled, device, dt):
"""Test that the simulation context is built when no simulation cfg is passed in.""" """Test that the simulation context is built when no simulation cfg is passed in."""
with build_simulation_context(gravity_enabled=gravity_enabled, device=device, dt=dt) as sim: with build_simulation_context(gravity_enabled=gravity_enabled, device=device, dt=dt) as sim:
...@@ -46,6 +47,7 @@ def test_build_simulation_context_no_cfg(gravity_enabled, device, dt): ...@@ -46,6 +47,7 @@ def test_build_simulation_context_no_cfg(gravity_enabled, device, dt):
@pytest.mark.parametrize("add_ground_plane", [True, False]) @pytest.mark.parametrize("add_ground_plane", [True, False])
@pytest.mark.isaacsim_ci
def test_build_simulation_context_ground_plane(add_ground_plane): def test_build_simulation_context_ground_plane(add_ground_plane):
"""Test that the simulation context is built with the correct ground plane.""" """Test that the simulation context is built with the correct ground plane."""
with build_simulation_context(add_ground_plane=add_ground_plane) as _: with build_simulation_context(add_ground_plane=add_ground_plane) as _:
...@@ -55,6 +57,7 @@ def test_build_simulation_context_ground_plane(add_ground_plane): ...@@ -55,6 +57,7 @@ def test_build_simulation_context_ground_plane(add_ground_plane):
@pytest.mark.parametrize("add_lighting", [True, False]) @pytest.mark.parametrize("add_lighting", [True, False])
@pytest.mark.parametrize("auto_add_lighting", [True, False]) @pytest.mark.parametrize("auto_add_lighting", [True, False])
@pytest.mark.isaacsim_ci
def test_build_simulation_context_auto_add_lighting(add_lighting, auto_add_lighting): def test_build_simulation_context_auto_add_lighting(add_lighting, auto_add_lighting):
"""Test that the simulation context is built with the correct lighting.""" """Test that the simulation context is built with the correct lighting."""
with build_simulation_context(add_lighting=add_lighting, auto_add_lighting=auto_add_lighting) as _: with build_simulation_context(add_lighting=add_lighting, auto_add_lighting=auto_add_lighting) as _:
...@@ -66,6 +69,7 @@ def test_build_simulation_context_auto_add_lighting(add_lighting, auto_add_light ...@@ -66,6 +69,7 @@ def test_build_simulation_context_auto_add_lighting(add_lighting, auto_add_light
assert not is_prim_path_valid("/World/defaultDomeLight") assert not is_prim_path_valid("/World/defaultDomeLight")
@pytest.mark.isaacsim_ci
def test_build_simulation_context_cfg(): def test_build_simulation_context_cfg():
"""Test that the simulation context is built with the correct cfg and values don't get overridden.""" """Test that the simulation context is built with the correct cfg and values don't get overridden."""
dt = 0.001 dt = 0.001
......
...@@ -53,6 +53,7 @@ def test_setup_teardown(): ...@@ -53,6 +53,7 @@ def test_setup_teardown():
sim.clear_instance() sim.clear_instance()
@pytest.mark.isaacsim_ci
def test_no_change(test_setup_teardown): def test_no_change(test_setup_teardown):
"""Call conversion twice. This should not generate a new USD file.""" """Call conversion twice. This should not generate a new USD file."""
sim, mjcf_config = test_setup_teardown sim, mjcf_config = test_setup_teardown
...@@ -70,6 +71,7 @@ def test_no_change(test_setup_teardown): ...@@ -70,6 +71,7 @@ def test_no_change(test_setup_teardown):
assert time_usd_file_created == new_time_usd_file_created assert time_usd_file_created == new_time_usd_file_created
@pytest.mark.isaacsim_ci
def test_config_change(test_setup_teardown): def test_config_change(test_setup_teardown):
"""Call conversion twice but change the config in the second call. This should generate a new USD file.""" """Call conversion twice but change the config in the second call. This should generate a new USD file."""
sim, mjcf_config = test_setup_teardown sim, mjcf_config = test_setup_teardown
...@@ -89,6 +91,7 @@ def test_config_change(test_setup_teardown): ...@@ -89,6 +91,7 @@ def test_config_change(test_setup_teardown):
assert time_usd_file_created != new_time_usd_file_created assert time_usd_file_created != new_time_usd_file_created
@pytest.mark.isaacsim_ci
def test_create_prim_from_usd(test_setup_teardown): def test_create_prim_from_usd(test_setup_teardown):
"""Call conversion and create a prim from it.""" """Call conversion and create a prim from it."""
sim, mjcf_config = test_setup_teardown sim, mjcf_config = test_setup_teardown
......
...@@ -81,6 +81,7 @@ def setup_simulation(): ...@@ -81,6 +81,7 @@ def setup_simulation():
sim.clear_instance() sim.clear_instance()
@pytest.mark.isaacsim_ci
def test_valid_properties_cfg(setup_simulation): def test_valid_properties_cfg(setup_simulation):
"""Test that all the config instances have non-None values. """Test that all the config instances have non-None values.
...@@ -93,6 +94,7 @@ def test_valid_properties_cfg(setup_simulation): ...@@ -93,6 +94,7 @@ def test_valid_properties_cfg(setup_simulation):
assert v is not None, f"{cfg.__class__.__name__}:{k} is None. Please make sure schemas are valid." assert v is not None, f"{cfg.__class__.__name__}:{k} is None. Please make sure schemas are valid."
@pytest.mark.isaacsim_ci
def test_modify_properties_on_invalid_prim(setup_simulation): def test_modify_properties_on_invalid_prim(setup_simulation):
"""Test modifying properties on a prim that does not exist.""" """Test modifying properties on a prim that does not exist."""
sim, _, rigid_cfg, _, _, _ = setup_simulation sim, _, rigid_cfg, _, _, _ = setup_simulation
...@@ -101,6 +103,7 @@ def test_modify_properties_on_invalid_prim(setup_simulation): ...@@ -101,6 +103,7 @@ def test_modify_properties_on_invalid_prim(setup_simulation):
schemas.modify_rigid_body_properties("/World/asset_xyz", rigid_cfg) schemas.modify_rigid_body_properties("/World/asset_xyz", rigid_cfg)
@pytest.mark.isaacsim_ci
def test_modify_properties_on_articulation_instanced_usd(setup_simulation): def test_modify_properties_on_articulation_instanced_usd(setup_simulation):
"""Test modifying properties on articulation instanced usd. """Test modifying properties on articulation instanced usd.
...@@ -129,6 +132,7 @@ def test_modify_properties_on_articulation_instanced_usd(setup_simulation): ...@@ -129,6 +132,7 @@ def test_modify_properties_on_articulation_instanced_usd(setup_simulation):
schemas.modify_articulation_root_properties("/World/asset_instanced", arti_cfg) schemas.modify_articulation_root_properties("/World/asset_instanced", arti_cfg)
@pytest.mark.isaacsim_ci
def test_modify_properties_on_articulation_usd(setup_simulation): def test_modify_properties_on_articulation_usd(setup_simulation):
"""Test setting properties on articulation usd.""" """Test setting properties on articulation usd."""
sim, arti_cfg, rigid_cfg, collision_cfg, mass_cfg, joint_cfg = setup_simulation sim, arti_cfg, rigid_cfg, collision_cfg, mass_cfg, joint_cfg = setup_simulation
...@@ -158,6 +162,7 @@ def test_modify_properties_on_articulation_usd(setup_simulation): ...@@ -158,6 +162,7 @@ def test_modify_properties_on_articulation_usd(setup_simulation):
_validate_articulation_properties_on_prim("/World/asset", arti_cfg, True) _validate_articulation_properties_on_prim("/World/asset", arti_cfg, True)
@pytest.mark.isaacsim_ci
def test_defining_rigid_body_properties_on_prim(setup_simulation): def test_defining_rigid_body_properties_on_prim(setup_simulation):
"""Test defining rigid body properties on a prim.""" """Test defining rigid body properties on a prim."""
sim, _, rigid_cfg, collision_cfg, mass_cfg, _ = setup_simulation sim, _, rigid_cfg, collision_cfg, mass_cfg, _ = setup_simulation
...@@ -189,6 +194,7 @@ def test_defining_rigid_body_properties_on_prim(setup_simulation): ...@@ -189,6 +194,7 @@ def test_defining_rigid_body_properties_on_prim(setup_simulation):
sim.step() sim.step()
@pytest.mark.isaacsim_ci
def test_defining_articulation_properties_on_prim(setup_simulation): def test_defining_articulation_properties_on_prim(setup_simulation):
"""Test defining articulation properties on a prim.""" """Test defining articulation properties on a prim."""
sim, arti_cfg, rigid_cfg, collision_cfg, mass_cfg, _ = setup_simulation sim, arti_cfg, rigid_cfg, collision_cfg, mass_cfg, _ = setup_simulation
......
...@@ -34,6 +34,7 @@ def test_setup_teardown(): ...@@ -34,6 +34,7 @@ def test_setup_teardown():
SimulationContext.clear_instance() SimulationContext.clear_instance()
@pytest.mark.isaacsim_ci
def test_singleton(): def test_singleton():
"""Tests that the singleton is working.""" """Tests that the singleton is working."""
sim1 = SimulationContext() sim1 = SimulationContext()
...@@ -55,6 +56,7 @@ def test_singleton(): ...@@ -55,6 +56,7 @@ def test_singleton():
sim3.clear_instance() sim3.clear_instance()
@pytest.mark.isaacsim_ci
def test_initialization(): def test_initialization():
"""Test the simulation config.""" """Test the simulation config."""
cfg = SimulationCfg(physics_prim_path="/Physics/PhysX", render_interval=5, gravity=(0.0, -0.5, -0.5)) cfg = SimulationCfg(physics_prim_path="/Physics/PhysX", render_interval=5, gravity=(0.0, -0.5, -0.5))
...@@ -76,6 +78,7 @@ def test_initialization(): ...@@ -76,6 +78,7 @@ def test_initialization():
np.testing.assert_almost_equal(gravity, cfg.gravity) np.testing.assert_almost_equal(gravity, cfg.gravity)
@pytest.mark.isaacsim_ci
def test_sim_version(): def test_sim_version():
"""Test obtaining the version.""" """Test obtaining the version."""
sim = SimulationContext() sim = SimulationContext()
...@@ -84,6 +87,7 @@ def test_sim_version(): ...@@ -84,6 +87,7 @@ def test_sim_version():
assert version[0] >= 4 assert version[0] >= 4
@pytest.mark.isaacsim_ci
def test_carb_setting(): def test_carb_setting():
"""Test setting carb settings.""" """Test setting carb settings."""
sim = SimulationContext() sim = SimulationContext()
...@@ -95,6 +99,7 @@ def test_carb_setting(): ...@@ -95,6 +99,7 @@ def test_carb_setting():
assert tuple(sim.get_setting("/myExt/using_omniverse_version")) == tuple(sim.get_version()) assert tuple(sim.get_setting("/myExt/using_omniverse_version")) == tuple(sim.get_version())
@pytest.mark.isaacsim_ci
def test_headless_mode(): def test_headless_mode():
"""Test that render mode is headless since we are running in headless mode.""" """Test that render mode is headless since we are running in headless mode."""
sim = SimulationContext() sim = SimulationContext()
...@@ -131,6 +136,7 @@ def test_headless_mode(): ...@@ -131,6 +136,7 @@ def test_headless_mode():
# assert ctypes.c_long.from_address(id(sim)).value == sim_ref_count - 1 # assert ctypes.c_long.from_address(id(sim)).value == sim_ref_count - 1
@pytest.mark.isaacsim_ci
def test_zero_gravity(): def test_zero_gravity():
"""Test that gravity can be properly disabled.""" """Test that gravity can be properly disabled."""
cfg = SimulationCfg(gravity=(0.0, 0.0, 0.0)) cfg = SimulationCfg(gravity=(0.0, 0.0, 0.0))
......
...@@ -28,6 +28,7 @@ from isaaclab.sim.simulation_context import SimulationContext ...@@ -28,6 +28,7 @@ from isaaclab.sim.simulation_context import SimulationContext
@pytest.mark.skip(reason="Timeline not stopped") @pytest.mark.skip(reason="Timeline not stopped")
@pytest.mark.isaacsim_ci
def test_render_cfg(): def test_render_cfg():
"""Test that the simulation context is created with the correct render cfg.""" """Test that the simulation context is created with the correct render cfg."""
enable_translucency = True enable_translucency = True
...@@ -92,6 +93,7 @@ def test_render_cfg(): ...@@ -92,6 +93,7 @@ def test_render_cfg():
assert carb_settings_iface.get("/rtx/post/aa/op") == 4 # dlss = 3, dlaa=4 assert carb_settings_iface.get("/rtx/post/aa/op") == 4 # dlss = 3, dlaa=4
@pytest.mark.isaacsim_ci
def test_render_cfg_presets(): def test_render_cfg_presets():
"""Test that the simulation context is created with the correct render cfg preset with overrides.""" """Test that the simulation context is created with the correct render cfg preset with overrides."""
...@@ -146,6 +148,7 @@ def test_render_cfg_presets(): ...@@ -146,6 +148,7 @@ def test_render_cfg_presets():
@pytest.mark.skip(reason="Timeline not stopped") @pytest.mark.skip(reason="Timeline not stopped")
@pytest.mark.isaacsim_ci
def test_render_cfg_defaults(): def test_render_cfg_defaults():
"""Test that the simulation context is created with the correct render cfg.""" """Test that the simulation context is created with the correct render cfg."""
enable_translucency = False enable_translucency = False
......
...@@ -43,6 +43,7 @@ def sim(): ...@@ -43,6 +43,7 @@ def sim():
sim.clear_instance() sim.clear_instance()
@pytest.mark.isaacsim_ci
def test_spawn_usd(sim): def test_spawn_usd(sim):
"""Test loading prim from Usd file.""" """Test loading prim from Usd file."""
# Spawn cone # Spawn cone
...@@ -54,6 +55,7 @@ def test_spawn_usd(sim): ...@@ -54,6 +55,7 @@ def test_spawn_usd(sim):
assert prim.GetPrimTypeInfo().GetTypeName() == "Xform" assert prim.GetPrimTypeInfo().GetTypeName() == "Xform"
@pytest.mark.isaacsim_ci
def test_spawn_usd_fails(sim): def test_spawn_usd_fails(sim):
"""Test loading prim from Usd file fails when asset usd path is invalid.""" """Test loading prim from Usd file fails when asset usd path is invalid."""
# Spawn cone # Spawn cone
...@@ -63,6 +65,7 @@ def test_spawn_usd_fails(sim): ...@@ -63,6 +65,7 @@ def test_spawn_usd_fails(sim):
cfg.func("/World/Franka", cfg) cfg.func("/World/Franka", cfg)
@pytest.mark.isaacsim_ci
def test_spawn_urdf(sim): def test_spawn_urdf(sim):
"""Test loading prim from URDF file.""" """Test loading prim from URDF file."""
# retrieve path to urdf importer extension # retrieve path to urdf importer extension
...@@ -83,6 +86,7 @@ def test_spawn_urdf(sim): ...@@ -83,6 +86,7 @@ def test_spawn_urdf(sim):
assert prim.GetPrimTypeInfo().GetTypeName() == "Xform" assert prim.GetPrimTypeInfo().GetTypeName() == "Xform"
@pytest.mark.isaacsim_ci
def test_spawn_ground_plane(sim): def test_spawn_ground_plane(sim):
"""Test loading prim for the ground plane from grid world USD.""" """Test loading prim for the ground plane from grid world USD."""
# Spawn ground plane # Spawn ground plane
......
...@@ -53,6 +53,7 @@ def sim_config(): ...@@ -53,6 +53,7 @@ def sim_config():
sim.clear_instance() sim.clear_instance()
@pytest.mark.isaacsim_ci
def test_no_change(sim_config): def test_no_change(sim_config):
"""Call conversion twice. This should not generate a new USD file.""" """Call conversion twice. This should not generate a new USD file."""
sim, config = sim_config sim, config = sim_config
...@@ -69,6 +70,7 @@ def test_no_change(sim_config): ...@@ -69,6 +70,7 @@ def test_no_change(sim_config):
assert time_usd_file_created == new_time_usd_file_created assert time_usd_file_created == new_time_usd_file_created
@pytest.mark.isaacsim_ci
def test_config_change(sim_config): def test_config_change(sim_config):
"""Call conversion twice but change the config in the second call. This should generate a new USD file.""" """Call conversion twice but change the config in the second call. This should generate a new USD file."""
sim, config = sim_config sim, config = sim_config
...@@ -87,6 +89,7 @@ def test_config_change(sim_config): ...@@ -87,6 +89,7 @@ def test_config_change(sim_config):
assert time_usd_file_created != new_time_usd_file_created assert time_usd_file_created != new_time_usd_file_created
@pytest.mark.isaacsim_ci
def test_create_prim_from_usd(sim_config): def test_create_prim_from_usd(sim_config):
"""Call conversion and create a prim from it.""" """Call conversion and create a prim from it."""
sim, config = sim_config sim, config = sim_config
...@@ -98,6 +101,7 @@ def test_create_prim_from_usd(sim_config): ...@@ -98,6 +101,7 @@ def test_create_prim_from_usd(sim_config):
assert prim_utils.is_prim_path_valid(prim_path) assert prim_utils.is_prim_path_valid(prim_path)
@pytest.mark.isaacsim_ci
def test_config_drive_type(sim_config): def test_config_drive_type(sim_config):
"""Change the drive mechanism of the robot to be position.""" """Change the drive mechanism of the robot to be position."""
sim, config = sim_config sim, config = sim_config
......
...@@ -107,6 +107,7 @@ def setup_test_environment(): ...@@ -107,6 +107,7 @@ def setup_test_environment():
del os.environ["PYTHONUNBUFFERED"] del os.environ["PYTHONUNBUFFERED"]
@pytest.mark.isaacsim_ci
def test_generate_dataset(setup_test_environment): def test_generate_dataset(setup_test_environment):
"""Test the dataset generation script.""" """Test the dataset generation script."""
workflow_root = setup_test_environment workflow_root = setup_test_environment
......
...@@ -29,6 +29,7 @@ import isaaclab_tasks # noqa: F401 ...@@ -29,6 +29,7 @@ import isaaclab_tasks # noqa: F401
@pytest.mark.parametrize("num_envs, device", [(32, "cuda"), (1, "cuda")]) @pytest.mark.parametrize("num_envs, device", [(32, "cuda"), (1, "cuda")])
@pytest.mark.parametrize("task_name", setup_environment(include_play=False, factory_envs=False, multi_agent=False)) @pytest.mark.parametrize("task_name", setup_environment(include_play=False, factory_envs=False, multi_agent=False))
@pytest.mark.isaacsim_ci
def test_environments(task_name, num_envs, device): def test_environments(task_name, num_envs, device):
# run environments without stage in memory # run environments without stage in memory
_run_environments(task_name, device, num_envs, create_stage_in_memory=False) _run_environments(task_name, device, num_envs, create_stage_in_memory=False)
...@@ -21,6 +21,7 @@ import isaaclab_tasks # noqa: F401 ...@@ -21,6 +21,7 @@ import isaaclab_tasks # noqa: F401
@pytest.mark.parametrize("num_envs, device", [(32, "cuda"), (1, "cuda")]) @pytest.mark.parametrize("num_envs, device", [(32, "cuda"), (1, "cuda")])
@pytest.mark.parametrize("task_name", setup_environment(factory_envs=True, multi_agent=False)) @pytest.mark.parametrize("task_name", setup_environment(factory_envs=True, multi_agent=False))
@pytest.mark.isaacsim_ci
def test_factory_environments(task_name, num_envs, device): def test_factory_environments(task_name, num_envs, device):
"""Run all factory environments and check environments return valid signals.""" """Run all factory environments and check environments return valid signals."""
print(f">>> Running test for environment: {task_name}") print(f">>> Running test for environment: {task_name}")
......
...@@ -132,7 +132,7 @@ def create_timeout_test_case(test_file, timeout, stdout_data, stderr_data): ...@@ -132,7 +132,7 @@ def create_timeout_test_case(test_file, timeout, stdout_data, stderr_data):
return test_suite return test_suite
def run_individual_tests(test_files, workspace_root): def run_individual_tests(test_files, workspace_root, isaacsim_ci):
"""Run each test file separately, ensuring one finishes before starting the next.""" """Run each test file separately, ensuring one finishes before starting the next."""
failed_tests = [] failed_tests = []
test_status = {} test_status = {}
...@@ -156,12 +156,20 @@ def run_individual_tests(test_files, workspace_root): ...@@ -156,12 +156,20 @@ def run_individual_tests(test_files, workspace_root):
"-m", "-m",
"pytest", "pytest",
"--no-header", "--no-header",
"-c",
f"{workspace_root}/pytest.ini",
f"--junitxml=tests/test-reports-{str(file_name)}.xml", f"--junitxml=tests/test-reports-{str(file_name)}.xml",
str(test_file), "--verbose",
"-v",
"--tb=short", "--tb=short",
] ]
if isaacsim_ci:
cmd.append("-m")
cmd.append("isaacsim_ci")
# Add the test file path last
cmd.append(str(test_file))
# Run test with timeout and capture output # Run test with timeout and capture output
returncode, stdout_data, stderr_data, timed_out = capture_test_output_with_timeout(cmd, timeout, env) returncode, stdout_data, stderr_data, timed_out = capture_test_output_with_timeout(cmd, timeout, env)
...@@ -269,6 +277,8 @@ def pytest_sessionstart(session): ...@@ -269,6 +277,8 @@ def pytest_sessionstart(session):
filter_pattern = os.environ.get("TEST_FILTER_PATTERN", "") filter_pattern = os.environ.get("TEST_FILTER_PATTERN", "")
exclude_pattern = os.environ.get("TEST_EXCLUDE_PATTERN", "") exclude_pattern = os.environ.get("TEST_EXCLUDE_PATTERN", "")
isaacsim_ci = os.environ.get("ISAACSIM_CI_SHORT", "false") == "true"
# Also try to get from pytest config # Also try to get from pytest config
if hasattr(session.config, "option") and hasattr(session.config.option, "filter_pattern"): if hasattr(session.config, "option") and hasattr(session.config.option, "filter_pattern"):
filter_pattern = filter_pattern or getattr(session.config.option, "filter_pattern", "") filter_pattern = filter_pattern or getattr(session.config.option, "filter_pattern", "")
...@@ -286,6 +296,7 @@ def pytest_sessionstart(session): ...@@ -286,6 +296,7 @@ def pytest_sessionstart(session):
# Get all test files in the source directories # Get all test files in the source directories
test_files = [] test_files = []
for source_dir in source_dirs: for source_dir in source_dirs:
if not os.path.exists(source_dir): if not os.path.exists(source_dir):
print(f"Error: source directory not found at {source_dir}") print(f"Error: source directory not found at {source_dir}")
...@@ -313,6 +324,14 @@ def pytest_sessionstart(session): ...@@ -313,6 +324,14 @@ def pytest_sessionstart(session):
test_files.append(full_path) test_files.append(full_path)
if isaacsim_ci:
new_test_files = []
for test_file in test_files:
with open(test_file) as f:
if "@pytest.mark.isaacsim_ci" in f.read():
new_test_files.append(test_file)
test_files = new_test_files
if not test_files: if not test_files:
print("No test files found in source directory") print("No test files found in source directory")
pytest.exit("No test files found", returncode=1) pytest.exit("No test files found", returncode=1)
...@@ -322,7 +341,7 @@ def pytest_sessionstart(session): ...@@ -322,7 +341,7 @@ def pytest_sessionstart(session):
print(f" - {test_file}") print(f" - {test_file}")
# Run all tests individually # Run all tests individually
failed_tests, test_status = run_individual_tests(test_files, workspace_root) failed_tests, test_status = run_individual_tests(test_files, workspace_root, isaacsim_ci)
print("failed tests:", failed_tests) print("failed tests:", failed_tests)
...@@ -404,4 +423,4 @@ def pytest_sessionstart(session): ...@@ -404,4 +423,4 @@ def pytest_sessionstart(session):
print(summary_str) print(summary_str)
# Exit pytest after custom execution to prevent normal pytest from overwriting our report # Exit pytest after custom execution to prevent normal pytest from overwriting our report
pytest.exit("Custom test execution completed", returncode=0) pytest.exit("Custom test execution completed", returncode=0 if num_failing == 0 else 1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment