Skip to content

Commit 340fd16

Browse files
committed
skip some tests on windows
1 parent a69a7b8 commit 340fd16

File tree

11 files changed

+82
-46
lines changed

11 files changed

+82
-46
lines changed

source/isaaclab/test/controllers/test_local_frame_task.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
# pinocchio is required by the Pink IK controller
99
import sys
1010

11+
import pytest
12+
13+
# Skip all tests in this module on Windows - MUST be before any other imports
14+
pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="Test not supported on Windows")
15+
1116
if sys.platform != "win32":
1217
import pinocchio # noqa: F401
1318

@@ -19,14 +24,13 @@
1924
import numpy as np
2025
from pathlib import Path
2126

22-
import pinocchio as pin
2327
import pytest
2428

25-
from isaaclab.controllers.pink_ik.local_frame_task import LocalFrameTask
26-
from isaaclab.controllers.pink_ik.pink_kinematics_configuration import PinkKinematicsConfiguration
29+
if sys.platform != "win32":
30+
import pinocchio as pin
2731

28-
# Skip all tests in this module on Windows
29-
pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="Test not supported on Windows")
32+
from isaaclab.controllers.pink_ik.local_frame_task import LocalFrameTask
33+
from isaaclab.controllers.pink_ik.pink_kinematics_configuration import PinkKinematicsConfiguration
3034

3135
# class TestLocalFrameTask:
3236
# """Test suite for LocalFrameTask class."""

source/isaaclab/test/controllers/test_null_space_posture_task.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
# pinocchio is required by the Pink IK controller
88
import sys
99

10+
import pytest
11+
12+
# Skip all tests in this module on Windows - MUST be before any other imports
13+
pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="Test not supported on Windows")
14+
1015
if sys.platform != "win32":
1116
import pinocchio # noqa: F401
1217
import pinocchio as pin # noqa: F401
13-
else:
14-
import pinocchio # noqa: F401
15-
import pinocchio as pin # noqa: F401
1618

1719
from isaaclab.app import AppLauncher
1820

@@ -24,14 +26,13 @@
2426
import numpy as np
2527

2628
import pytest
27-
from pink.configuration import Configuration
28-
from pink.tasks import FrameTask
29-
from pinocchio.robot_wrapper import RobotWrapper
3029

31-
from isaaclab.controllers.pink_ik.null_space_posture_task import NullSpacePostureTask
30+
if sys.platform != "win32":
31+
from pink.configuration import Configuration
32+
from pink.tasks import FrameTask
33+
from pinocchio.robot_wrapper import RobotWrapper
3234

33-
# Skip all tests in this module on Windows
34-
pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="Test not supported on Windows")
35+
from isaaclab.controllers.pink_ik.null_space_posture_task import NullSpacePostureTask
3536

3637

3738
class TestNullSpacePostureTaskSimplifiedRobot:

source/isaaclab/test/controllers/test_pink_ik.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
# pinocchio is required by the Pink IK controller
99
import sys
1010

11+
import pytest
12+
13+
# Skip all tests in this module on Windows - MUST be before any other imports
14+
pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="Test not supported on Windows")
15+
1116
if sys.platform != "win32":
1217
import pinocchio # noqa: F401
1318

@@ -28,18 +33,18 @@
2833

2934
import omni.usd
3035
import pytest
31-
from pink.configuration import Configuration
32-
from pink.tasks import FrameTask
3336

3437
from isaaclab.utils.math import axis_angle_from_quat, matrix_from_quat, quat_from_matrix, quat_inv
3538

3639
import isaaclab_tasks # noqa: F401
37-
import isaaclab_tasks.manager_based.locomanipulation.pick_place # noqa: F401
38-
import isaaclab_tasks.manager_based.manipulation.pick_place # noqa: F401
3940
from isaaclab_tasks.utils.parse_cfg import parse_env_cfg
4041

41-
# Skip all tests in this module on Windows
42-
pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="Test not supported on Windows")
42+
if sys.platform != "win32":
43+
from pink.configuration import Configuration
44+
from pink.tasks import FrameTask
45+
46+
import isaaclab_tasks.manager_based.locomanipulation.pick_place # noqa: F401
47+
import isaaclab_tasks.manager_based.manipulation.pick_place # noqa: F401
4348

4449

4550
def load_test_config(env_name):

source/isaaclab/test/controllers/test_pink_ik_components.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
# pinocchio is required by the Pink IK controller
99
import sys
1010

11+
import pytest
12+
13+
# Skip all tests in this module on Windows - MUST be before any other imports
14+
pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="Test not supported on Windows")
15+
1116
if sys.platform != "win32":
1217
import pinocchio # noqa: F401
1318

@@ -19,14 +24,13 @@
1924
import numpy as np
2025
from pathlib import Path
2126

22-
import pinocchio as pin
2327
import pytest
24-
from pink.exceptions import FrameNotFound
2528

26-
from isaaclab.controllers.pink_ik.pink_kinematics_configuration import PinkKinematicsConfiguration
29+
if sys.platform != "win32":
30+
import pinocchio as pin
31+
from pink.exceptions import FrameNotFound
2732

28-
# Skip all tests in this module on Windows
29-
pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="Test not supported on Windows")
33+
from isaaclab.controllers.pink_ik.pink_kinematics_configuration import PinkKinematicsConfiguration
3034

3135

3236
class TestPinkKinematicsConfiguration:

source/isaaclab/test/sim/test_urdf_converter.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
"""Launch Isaac Sim Simulator first."""
77

8+
import sys
9+
810
from isaaclab.app import AppLauncher
911

1012
# launch omniverse app
@@ -71,6 +73,7 @@ def test_no_change(sim_config):
7173

7274

7375
@pytest.mark.isaacsim_ci
76+
@pytest.mark.skipif(sys.platform == "win32", reason="Test hangs on Windows due to file locking issues")
7477
def test_config_change(sim_config):
7578
"""Call conversion twice but change the config in the second call. This should generate a new USD file."""
7679
sim, config = sim_config
@@ -102,6 +105,7 @@ def test_create_prim_from_usd(sim_config):
102105

103106

104107
@pytest.mark.isaacsim_ci
108+
@pytest.mark.skipif(sys.platform == "win32", reason="Test hangs on Windows due to file locking issues")
105109
def test_config_drive_type(sim_config):
106110
"""Change the drive mechanism of the robot to be position."""
107111
sim, config = sim_config

source/isaaclab_mimic/test/test_curobo_planner_cube_stack.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import pytest
1717

18-
# Skip all tests in this module on Windows
18+
# Skip all tests in this module on Windows - MUST be before AppLauncher
1919
pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="Test not supported on Windows")
2020

2121
SEED: int = 42
@@ -31,14 +31,17 @@
3131
import torch
3232
from collections.abc import Generator
3333

34+
import pytest
35+
3436
import isaaclab.utils.math as math_utils
3537
from isaaclab.assets import Articulation, RigidObject
3638
from isaaclab.envs.manager_based_env import ManagerBasedEnv
3739
from isaaclab.markers import FRAME_MARKER_CFG, VisualizationMarkers
3840

39-
from isaaclab_mimic.envs.franka_stack_ik_rel_mimic_env_cfg import FrankaCubeStackIKRelMimicEnvCfg
40-
from isaaclab_mimic.motion_planners.curobo.curobo_planner import CuroboPlanner
41-
from isaaclab_mimic.motion_planners.curobo.curobo_planner_cfg import CuroboPlannerCfg
41+
if sys.platform != "win32":
42+
from isaaclab_mimic.envs.franka_stack_ik_rel_mimic_env_cfg import FrankaCubeStackIKRelMimicEnvCfg
43+
from isaaclab_mimic.motion_planners.curobo.curobo_planner import CuroboPlanner
44+
from isaaclab_mimic.motion_planners.curobo.curobo_planner_cfg import CuroboPlannerCfg
4245

4346
GRIPPER_OPEN_CMD: float = 1.0
4447
GRIPPER_CLOSE_CMD: float = -1.0

source/isaaclab_mimic/test/test_curobo_planner_franka.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import pytest
1212

13-
# Skip all tests in this module on Windows
13+
# Skip all tests in this module on Windows - MUST be before AppLauncher
1414
pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="Test not supported on Windows")
1515

1616
SEED: int = 42
@@ -25,6 +25,8 @@
2525
import gymnasium as gym
2626
import torch
2727

28+
import pytest
29+
2830
import isaaclab.utils.assets as _al_assets
2931
import isaaclab.utils.math as math_utils
3032
from isaaclab.assets import Articulation, RigidObjectCfg
@@ -35,10 +37,13 @@
3537

3638
ISAAC_NUCLEUS_DIR: str = getattr(_al_assets, "ISAAC_NUCLEUS_DIR", "/Isaac")
3739

38-
from isaaclab_mimic.motion_planners.curobo.curobo_planner import CuroboPlanner
39-
from isaaclab_mimic.motion_planners.curobo.curobo_planner_cfg import CuroboPlannerCfg
40+
if sys.platform != "win32":
41+
from isaaclab_mimic.motion_planners.curobo.curobo_planner import CuroboPlanner
42+
from isaaclab_mimic.motion_planners.curobo.curobo_planner_cfg import CuroboPlannerCfg
4043

41-
from isaaclab_tasks.manager_based.manipulation.stack.config.franka.stack_joint_pos_env_cfg import FrankaCubeStackEnvCfg
44+
from isaaclab_tasks.manager_based.manipulation.stack.config.franka.stack_joint_pos_env_cfg import (
45+
FrankaCubeStackEnvCfg,
46+
)
4247

4348
# Predefined EE goals for the test
4449
# Each entry is a tuple of: (goal specification, goal ID)

source/isaaclab_mimic/test/test_generate_dataset.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55

66
"""Test dataset generation for Isaac Lab Mimic workflow."""
77

8-
from isaaclab.app import AppLauncher
9-
10-
# launch omniverse app
11-
simulation_app = AppLauncher(headless=True).app
12-
138
import os
149
import subprocess
1510
import sys
1611
import tempfile
1712

1813
import pytest
1914

20-
# Skip all tests in this module on Windows
15+
# Skip all tests in this module on Windows - MUST be before AppLauncher
2116
pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="Test not supported on Windows")
2217

18+
from isaaclab.app import AppLauncher
19+
20+
# launch omniverse app
21+
simulation_app = AppLauncher(headless=True).app
22+
2323
from isaaclab.utils.assets import ISAACLAB_NUCLEUS_DIR, retrieve_file_path
2424

2525
DATASETS_DOWNLOAD_DIR = tempfile.mkdtemp(suffix="_Isaac-Stack-Cube-Franka-IK-Rel-Mimic-v0")

source/isaaclab_mimic/test/test_generate_dataset_skillgen.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55

66
"""Test dataset generation with SkillGen for Isaac Lab Mimic workflow."""
77

8-
from isaaclab.app import AppLauncher
9-
10-
# Launch omniverse app
11-
simulation_app = AppLauncher(headless=True).app
12-
138
import os
149
import subprocess
1510
import sys
1611
import tempfile
1712

1813
import pytest
1914

20-
# Skip all tests in this module on Windows
15+
# Skip all tests in this module on Windows - MUST be before AppLauncher
2116
pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="Test not supported on Windows")
2217

18+
from isaaclab.app import AppLauncher
19+
20+
# Launch omniverse app
21+
simulation_app = AppLauncher(headless=True).app
22+
2323
from isaaclab.utils.assets import ISAACLAB_NUCLEUS_DIR, retrieve_file_path
2424

2525
DATASETS_DOWNLOAD_DIR = tempfile.mkdtemp(suffix="_Isaac-Stack-Cube-Franka-IK-Rel-Skillgen-v0")

source/isaaclab_tasks/test/benchmarking/env_benchmark_test_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import yaml
1313
from datetime import datetime
1414

15-
import carb
1615
from tensorboard.backend.event_processing import event_accumulator
1716

1817

@@ -135,6 +134,8 @@ def process_kpi_data(kpi_payloads, tag=""):
135134

136135
def output_payloads(payloads):
137136
"""Output the KPI payloads to a json file."""
137+
import carb
138+
138139
# first grab all log files
139140
repo_path = os.path.join(carb.tokens.get_tokens_interface().resolve("${app}"), "..")
140141
output_path = os.path.join(repo_path, "logs/kpi.json")
@@ -148,6 +149,8 @@ def output_payloads(payloads):
148149

149150
def _retrieve_logs(workflow, task):
150151
"""Retrieve training logs."""
152+
import carb
153+
151154
# first grab all log files
152155
repo_path = os.path.join(carb.tokens.get_tokens_interface().resolve("${app}"), "..")
153156
from isaacsim.core.version import get_version

0 commit comments

Comments
 (0)