Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 114 additions & 27 deletions .github/workflows/build.yaml

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion .github/workflows/tools-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:
# Shared CI action helpers and their co-located tests.
- ".github/actions/_lib/**"
- ".github/workflows/tools-tests.yml"
# test_ci_marker_jobs.py checks the marker gates in this workflow.
- ".github/workflows/build.yaml"
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -68,7 +70,7 @@ jobs:
# --noconftest keeps tools/conftest.py out of the session. That file is the CI test
# orchestrator - its pytest_sessionstart scans source/ and scripts/ and runs the whole
# suite, so loading it here would ignore the files named below.
run: python3 -m pytest tools/test_crash_journal.py tools/test_file_scheduler.py
run: python3 -m pytest tools/test_crash_journal.py tools/test_file_scheduler.py tools/test_ci_marker_jobs.py
.github/actions/_lib/test_registry_credential_fallback.py -v --noconftest

- uses: astral-sh/setup-uv@v6
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rejected unregistered CI markers in the test orchestrator.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import sys
import xml.etree.ElementTree as ElementTree
from pathlib import Path
from types import ModuleType
from types import ModuleType, SimpleNamespace

import pytest

Expand Down Expand Up @@ -718,3 +718,50 @@ def test_external_git_asset_tests_receive_extended_startup_deadline():

assert startup_deadline == orchestrator.test_settings.GIT_ASSET_STARTUP_TIMEOUT
assert orchestrator._resolve_startup_deadline("test_sample.py", timeout=10000, is_cold_cache_test=False) == 120


def _start_marker_session(orchestrator, monkeypatch, ci_marker: str):
"""Run the orchestrator's session start for ``ci_marker`` and return the exit code it requests."""
for name in (
"TEST_FILTER_PATTERN",
"TEST_EXCLUDE_PATTERN",
"TEST_INCLUDE_FILES",
"TEST_QUARANTINED_ONLY",
"TEST_CUROBO_ONLY",
"ISAACSIM_CI_SHORT",
"TEST_NODE_IDS",
"TEST_NODE_IDS_FILE",
"TEST_NODE_IDS_KEY",
):
monkeypatch.delenv(name, raising=False)
monkeypatch.setenv("CI_MARKER", ci_marker)
config = SimpleNamespace(getini=lambda name: ["kitless: runs without Kit", "arm_ci: runs on arm"], option=None)
with pytest.raises(pytest.exit.Exception) as exit_info:
orchestrator.pytest_sessionstart(SimpleNamespace(config=config))
return exit_info.value.returncode


@pytest.mark.parametrize("ci_marker", ["kitles", "kitless and not arm_ci"])
def test_unregistered_ci_marker_fails_before_selection(ci_marker, monkeypatch):
"""A marker run matches files by name, so an expression or a misspelling must fail instead of passing empty."""
orchestrator = _load_orchestrator_module()

def unexpected_selection(*args, **kwargs):
raise AssertionError("test files were selected for an unregistered marker")

monkeypatch.setattr(orchestrator, "_collect_test_files", unexpected_selection)

assert _start_marker_session(orchestrator, monkeypatch, ci_marker) == 1


def test_registered_ci_marker_without_marked_files_passes_empty(monkeypatch, tmp_path):
"""A job whose files carry no marker passes with an empty report instead of failing."""
orchestrator = _load_orchestrator_module()
unmarked = tmp_path / "test_unmarked.py"
unmarked.write_text("def test_unmarked():\n pass\n")
monkeypatch.setattr(orchestrator, "_collect_test_files", lambda *args, **kwargs: [str(unmarked)])
monkeypatch.setenv("TEST_RESULT_FILE", "marker_report.xml")
monkeypatch.chdir(tmp_path)

assert _start_marker_session(orchestrator, monkeypatch, "kitless") == 0
assert (tmp_path / "tests" / "marker_report.xml").is_file()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Marked the test files that run without Kit as kitless so a marker run can select them.
2 changes: 2 additions & 0 deletions source/isaaclab_newton/test/assets/test_cable_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

from isaaclab_contrib.coupling import CouplerEntryCfg, CouplerProxyCfg, CouplerProxyMappingCfg

pytestmark = pytest.mark.kitless


@configclass
class _CableSceneCfg(InteractiveSceneCfg):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
from newton.selection import ArticulationView
from scipy.spatial.transform import Rotation

pytestmark = pytest.mark.kitless

# One revolute, one ball, one revolute -- the layout that hides an off-by-one when the tables are
# built by walking the model instead of the view's own per-joint counts.
COORD_COUNTS = [1, 4, 1]
Expand Down
2 changes: 2 additions & 0 deletions source/isaaclab_newton/test/assets/test_mpm_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import pytest
import torch

pytestmark = pytest.mark.kitless

newton = pytest.importorskip("newton")

from isaaclab_newton.assets.mpm_object import MPMObject, MPMObjectCfg
Expand Down
2 changes: 2 additions & 0 deletions source/isaaclab_newton/test/cloner/test_clone_xform_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import warp as wp
from isaaclab_newton.cloner.newton_clone_utils import _quat_rotate

pytestmark = pytest.mark.kitless

_TOL = 1e-5

# Hand-picked quaternions (xyzw) that cover identity and the 180-degree cases where a sign
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

from pxr import Sdf, Usd, UsdGeom, UsdPhysics, UsdShade

pytestmark = pytest.mark.kitless

_SOURCE = "/World/Asset"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
from isaaclab.cloner import make_clone_plan
from isaaclab.sim import SimulationCfg, SimulationContext, SpawnerCfg, build_simulation_context

pytestmark = pytest.mark.kitless

replicate_module = importlib.import_module("isaaclab_newton.cloner.replicate")


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import newton
import numpy as np
import pytest
import warp as wp
from isaaclab_newton.cloner import NewtonReplicateContext
from isaaclab_newton.cloner import newton_clone_utils as newton_clone_utils_module
Expand All @@ -27,6 +28,8 @@
from isaaclab.sim import SimulationContext, SpawnerCfg
from isaaclab.sim.schemas import define_deformable_curve_properties

pytestmark = pytest.mark.kitless


class TestReplicateBuilderMapping(unittest.TestCase):
def test_world_prototypes_preserve_repeated_instances_and_default_poses(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

from pxr import Usd, UsdGeom, UsdPhysics

pytestmark = pytest.mark.kitless


@pytest.mark.parametrize("load_visual_shapes", [True, False])
@pytest.mark.parametrize("dynamic", [True, False])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

from isaaclab.utils import math as math_utils

pytestmark = pytest.mark.kitless

_NUM_ENVS = 3
_NUM_JOINTS = 7
_DEVICE = "cpu"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import isaaclab_newton.controllers.ik.newton_ik_objectives as objectives_module
import isaaclab_newton.controllers.ik.newton_ik_solver as ik_solver_module
import pytest
import torch
import warp as wp
from isaaclab_newton.controllers.ik.newton_ik_objectives import (
Expand All @@ -24,6 +25,8 @@

from isaaclab.utils import configclass

pytestmark = pytest.mark.kitless

# Maps the stub body names used across these tests to Newton link indices.
_LINKS = {"ee": 0, "torso": 1, "custom": 0}

Expand Down
2 changes: 2 additions & 0 deletions source/isaaclab_newton/test/envs/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
from isaaclab.utils import configclass
from isaaclab.visualizers import VisualizerCfg

pytestmark = pytest.mark.kitless


@configclass
class ActionsCfg:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
)
from newton.solvers import SolverMuJoCo

pytestmark = pytest.mark.kitless

_TENDON = int(SolverMuJoCo.TrnType.TENDON)
_JOINT = 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
from isaaclab_newton.physics import MPMSolverCfg, NewtonMPMManager
from newton.solvers import SolverImplicitMPM

pytestmark = pytest.mark.kitless


@pytest.fixture(scope="module")
def cpu_mpm_solver_and_state():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
from isaaclab.sim import SimulationCfg, SimulationContext, build_simulation_context
from isaaclab.test.utils import test_devices

pytestmark = pytest.mark.kitless

# ---------------------------------------------------------------------------
# Lightweight (no sim) parametrisation
# ---------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions source/isaaclab_newton/test/physics/test_vbd_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from isaaclab.sim import BackendCfg, SimulationContext
from isaaclab.utils import replace

pytestmark = pytest.mark.kitless


# The soft-contact and simulation axes are independent, so each value is covered once.
@pytest.mark.parametrize(
Expand Down
2 changes: 2 additions & 0 deletions source/isaaclab_newton/test/renderers/test_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
from isaaclab.renderers.segmentation_colors import BACKGROUND_ID, UNLABELLED_ID, pack_rgba, random_color_from_id
from isaaclab.sim.utils.semantics import add_labels

pytestmark = pytest.mark.kitless


def _cfg(**overrides):
"""Minimal renderer-cfg stand-in exposing only the fields the mapper reads."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

"""Tests for Newton's compiled visual-material writers."""

import pytest
import torch
import warp as wp
from isaaclab_newton.physics import NewtonBackendCfg, NewtonBuilderCfg
Expand All @@ -21,6 +22,8 @@
from isaaclab.renderers.base_renderer import VisualMaterialBatch
from isaaclab.sim import SimulationContext

pytestmark = pytest.mark.kitless


def _srgb(colors: torch.Tensor) -> torch.Tensor:
return torch.where(colors <= 0.0031308, 12.92 * colors, 1.055 * colors.pow(1.0 / 2.4) - 0.055)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from isaaclab.utils.configclass import configclass
from isaaclab.utils.math import create_rotation_matrix_from_view, quat_from_matrix

pytestmark = [pytest.mark.integration, pytest.mark.rendering]
pytestmark = [pytest.mark.integration, pytest.mark.rendering, pytest.mark.kitless]

SIM_DT = 1.0 / 60.0
WIDTH, HEIGHT = 640, 480
Expand Down
2 changes: 2 additions & 0 deletions source/isaaclab_newton/test/sensors/test_contact_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@

from isaaclab_assets.robots.allegro import ALLEGRO_HAND_CFG

pytestmark = pytest.mark.kitless

##
# Scene Configuration
##
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import warnings

import pytest
import torch
import warp as wp
from isaaclab_newton.sensors.contact_sensor.contact_sensor_data import ContactSensorData
Expand All @@ -17,6 +18,8 @@
update_contact_sensor_kernel,
)

pytestmark = pytest.mark.kitless


def test_force_matrix_history_rolls_newest_first_and_honors_mask():
"""Test newest-first ordering of every history buffer without advancing masked environments.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
##
from isaaclab_assets.robots.anymal import ANYMAL_C_CFG # isort:skip

pytestmark = pytest.mark.kitless


def quat_from_euler_rpy(roll, pitch, yaw, degrees=False):
"""Converts Euler XYZ to Quaternion (x, y, z, w)."""
Expand Down
2 changes: 2 additions & 0 deletions source/isaaclab_newton/test/sensors/test_imu.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
from isaaclab.terrains import TerrainImporterCfg
from isaaclab.utils import configclass

pytestmark = pytest.mark.kitless


@configclass
class ImuTestSceneCfg(InteractiveSceneCfg):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

from isaaclab_assets.robots.ant import ANT_CFG

pytestmark = pytest.mark.kitless


def _make_single_joint_articulation_cfg() -> ArticulationCfg:
"""Single-joint revolute test articulation (root ``CenterPivot`` + arm ``Arm``)."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
from isaaclab.terrains import TerrainImporterCfg
from isaaclab.utils import configclass

pytestmark = pytest.mark.kitless

SENSOR_HEIGHT = 2.0
RAY_OFFSET = 0.2
RAY_START_HEIGHT = SENSOR_HEIGHT - RAY_OFFSET
Expand Down
2 changes: 2 additions & 0 deletions source/isaaclab_newton/test/sensors/test_pva.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
from isaaclab.terrains import TerrainImporterCfg
from isaaclab.utils import configclass

pytestmark = pytest.mark.kitless


@configclass
class PvaTestSceneCfg(InteractiveSceneCfg):
Expand Down
2 changes: 2 additions & 0 deletions source/isaaclab_newton/test/sensors/test_site_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

from isaaclab.utils.warp.math_ops import transform_to_vec_quat

pytestmark = pytest.mark.kitless

# ---------------------------------------------------------------------------
# transform_to_vec_quat
# ---------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions source/isaaclab_newton/test/sim/test_cable_usd_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from isaaclab.sim.spawners.materials import CableMaterialCfg
from isaaclab.sim.spawners.shapes import CableCfg

pytestmark = pytest.mark.kitless

# Cable joint degrees of freedom, in the order Newton lays them out.
_SHEAR_X, _SHEAR_Y, _STRETCH, _BEND_X, _BEND_Y, _TWIST = range(6)

Expand Down
2 changes: 1 addition & 1 deletion source/isaaclab_newton/test/sim/test_mpm_spawners.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import isaaclab.sim as sim_utils

pytestmark = pytest.mark.unit
pytestmark = [pytest.mark.unit, pytest.mark.kitless]


@pytest.fixture
Expand Down
2 changes: 2 additions & 0 deletions source/isaaclab_newton/test/sim/test_mpm_visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

import isaaclab.sim as sim_utils

pytestmark = pytest.mark.kitless

_PRIM_PATHS = ["/World/envs/env_0/Sand/Particles", "/World/envs/env_1/Sand/Particles"]
"""Environment-namespaced points prims, matching the ``{ENV_REGEX_NS}/<asset>/Particles`` paths used by MPMObject."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
from isaaclab.sim import SimulationCfg, SimulationContext, build_simulation_context
from isaaclab.utils import configclass

pytestmark = pytest.mark.kitless

NEWTON_SIM_CFG = SimulationCfg(physics=NewtonCfg(solver_cfg=MJWarpSolverCfg()))
WORLD_MARKER_POS = (5.0, 3.0, 1.0)
SITE_PATH = "/World/Robot/SiteFrame"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Marked the test files that run without Kit as kitless so a marker run can select them.
2 changes: 1 addition & 1 deletion source/isaaclab_ov/test/assets/test_articulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

from isaaclab_assets import FRANKA_PANDA_CFG # noqa: E402

pytestmark = pytest.mark.integration
pytestmark = [pytest.mark.integration, pytest.mark.kitless]

_FIXTURE = Path(__file__).parent / "data" / "articulation_ordering_branching.usda"
_STIFFNESS, _DAMPING, _MAX_FORCE = 5.0, 0.5, 100.0
Expand Down
Loading
Loading