@@ -189,8 +189,11 @@ def run(test, device):
189189 for pattern in compiled_patterns :
190190 test .assertRegex (all_text , pattern , f"Expected output pattern not found: { pattern .pattern } " )
191191
192- # Fail on unexpected warnings
192+ # Fail on unexpected warnings originating from newton code
193+ newton_root = os .path .dirname (os .path .dirname (newton .examples .__file__ ))
193194 for w in caught :
195+ if not str (w .filename ).startswith (newton_root ):
196+ continue
194197 msg = str (w .message )
195198 if not any (p .search (msg ) for p in compiled_patterns ):
196199 test .fail (f"Unexpected warning: { msg } " )
@@ -227,7 +230,6 @@ class TestBasicExamples(unittest.TestCase):
227230 test_options_cpu = {"world_count" : 16 },
228231 test_options_cuda = {"world_count" : 64 },
229232 test_suffix = "xpbd" ,
230- expected_output = ["Inertia validation corrected" ],
231233)
232234add_example_test (
233235 TestBasicExamples ,
@@ -237,7 +239,6 @@ class TestBasicExamples(unittest.TestCase):
237239 test_options_cpu = {"world_count" : 16 },
238240 test_options_cuda = {"world_count" : 64 },
239241 test_suffix = "vbd" ,
240- expected_output = ["Inertia validation corrected" ],
241242)
242243
243244add_example_test (TestBasicExamples , name = "basic.example_basic_viewer" , devices = test_devices )
@@ -270,7 +271,6 @@ class TestCableExamples(unittest.TestCase):
270271 name = "cable.example_cable_y_junction" ,
271272 devices = test_devices ,
272273 test_options = {"num-frames" : 20 },
273- expected_output = ["Inertia validation corrected" ],
274274)
275275add_example_test (
276276 TestCableExamples ,
@@ -331,7 +331,6 @@ class TestClothExamples(unittest.TestCase):
331331 test_options = {},
332332 test_options_cuda = {"num-frames" : 32 },
333333 expected_output = [
334- "Inertia validation corrected" ,
335334 "texture inputs are not yet supported" ,
336335 "2-dimensional vectors are deprecated" ,
337336 "SolverStyle3D::precompute" ,
@@ -373,15 +372,13 @@ class TestRobotExamples(unittest.TestCase):
373372 name = "robot.example_robot_anymal_c_walk" ,
374373 devices = cuda_test_devices ,
375374 test_options = {"usd_required" : True , "num-frames" : 500 , "torch_required" : True },
376- expected_output = ["Inertia validation corrected" ],
377375)
378376add_example_test (
379377 TestRobotExamples ,
380378 name = "robot.example_robot_anymal_d" ,
381379 devices = test_devices ,
382380 test_options = {"usd_required" : True , "num-frames" : 500 },
383381 test_options_cpu = {"num-frames" : 10 },
384- expected_output = ["Inertia validation corrected" ],
385382 expected_output_cpu = [
386383 "mesh-mesh contacts will be skipped" ,
387384 ],
@@ -391,22 +388,19 @@ class TestRobotExamples(unittest.TestCase):
391388 name = "robot.example_robot_g1" ,
392389 devices = cuda_test_devices ,
393390 test_options = {"usd_required" : True , "num-frames" : 500 },
394- expected_output = ["Inertia validation corrected" ],
395391)
396392add_example_test (
397393 TestRobotExamples ,
398394 name = "robot.example_robot_h1" ,
399395 devices = cuda_test_devices ,
400396 test_options = {"usd_required" : True , "num-frames" : 500 },
401- expected_output = ["Inertia validation corrected" ],
402397)
403398add_example_test (
404399 TestRobotExamples ,
405400 name = "robot.example_robot_ur10" ,
406401 devices = test_devices ,
407402 test_options = {"usd_required" : True , "num-frames" : 500 },
408403 test_options_cpu = {"num-frames" : 10 },
409- expected_output = ["Inertia validation corrected" ],
410404)
411405add_example_test (
412406 TestRobotExamples ,
@@ -422,7 +416,6 @@ class TestRobotExamples(unittest.TestCase):
422416 name = "robot.example_robot_panda_hydro" ,
423417 devices = cuda_test_devices ,
424418 test_options = {"usd_required" : True , "num-frames" : 720 },
425- expected_output = ["Inertia validation corrected" ],
426419)
427420
428421
@@ -437,39 +430,39 @@ class TestRobotPolicyExamples(unittest.TestCase):
437430 test_options = {"num-frames" : 500 , "torch_required" : True , "robot" : "g1_29dof" },
438431 test_options_cpu = {"num-frames" : 10 },
439432 test_suffix = "G1_29dof" ,
440- expected_output = ["Inertia validation corrected" , " \\ [INFO\\ ]|Cloning|downloaded" ],
433+ expected_output = ["\\ [INFO\\ ]|Cloning|downloaded" ],
441434)
442435add_example_test (
443436 TestRobotPolicyExamples ,
444437 name = "robot.example_robot_policy" ,
445438 devices = cuda_test_devices ,
446439 test_options = {"num-frames" : 500 , "torch_required" : True , "robot" : "g1_23dof" },
447440 test_suffix = "G1_23dof" ,
448- expected_output = ["Inertia validation corrected" , " \\ [INFO\\ ]|Cloning|downloaded" ],
441+ expected_output = ["\\ [INFO\\ ]|Cloning|downloaded" ],
449442)
450443add_example_test (
451444 TestRobotPolicyExamples ,
452445 name = "robot.example_robot_policy" ,
453446 devices = cuda_test_devices ,
454447 test_options = {"num-frames" : 500 , "torch_required" : True , "robot" : "g1_23dof" , "physx" : True },
455448 test_suffix = "G1_23dof_Physx" ,
456- expected_output = ["Inertia validation corrected" , " \\ [INFO\\ ]|Cloning|downloaded" ],
449+ expected_output = ["\\ [INFO\\ ]|Cloning|downloaded" ],
457450)
458451add_example_test (
459452 TestRobotPolicyExamples ,
460453 name = "robot.example_robot_policy" ,
461454 devices = cuda_test_devices ,
462455 test_options = {"num-frames" : 500 , "torch_required" : True , "robot" : "anymal" },
463456 test_suffix = "Anymal" ,
464- expected_output = ["Inertia validation corrected" , " \\ [INFO\\ ]|Cloning|downloaded" ],
457+ expected_output = ["\\ [INFO\\ ]|Cloning|downloaded" ],
465458)
466459add_example_test (
467460 TestRobotPolicyExamples ,
468461 name = "robot.example_robot_policy" ,
469462 devices = cuda_test_devices ,
470463 test_options = {"num-frames" : 500 , "torch_required" : True , "robot" : "anymal" , "physx" : True },
471464 test_suffix = "Anymal_Physx" ,
472- expected_output = ["Inertia validation corrected" , " \\ [INFO\\ ]|Cloning|downloaded" ],
465+ expected_output = ["\\ [INFO\\ ]|Cloning|downloaded" ],
473466)
474467add_example_test (
475468 TestRobotPolicyExamples ,
@@ -478,7 +471,7 @@ class TestRobotPolicyExamples(unittest.TestCase):
478471 test_options = {"torch_required" : True },
479472 test_options_cuda = {"num-frames" : 500 , "robot" : "go2" },
480473 test_suffix = "Go2" ,
481- expected_output = ["Inertia validation corrected" , " \\ [INFO\\ ]|Cloning|downloaded" ],
474+ expected_output = ["\\ [INFO\\ ]|Cloning|downloaded" ],
482475)
483476add_example_test (
484477 TestRobotPolicyExamples ,
@@ -487,7 +480,7 @@ class TestRobotPolicyExamples(unittest.TestCase):
487480 test_options = {"torch_required" : True },
488481 test_options_cuda = {"num-frames" : 500 , "robot" : "go2" , "physx" : True },
489482 test_suffix = "Go2_Physx" ,
490- expected_output = ["Inertia validation corrected" , " \\ [INFO\\ ]|Cloning|downloaded" ],
483+ expected_output = ["\\ [INFO\\ ]|Cloning|downloaded" ],
491484)
492485
493486
@@ -500,7 +493,6 @@ class TestAdvancedRobotExamples(unittest.TestCase):
500493 name = "mpm.example_mpm_anymal" ,
501494 devices = cuda_test_devices ,
502495 test_options = {"num-frames" : 100 , "torch_required" : True },
503- expected_output = ["Inertia validation corrected" ],
504496)
505497
506498
@@ -512,29 +504,26 @@ class TestIKExamples(unittest.TestCase):
512504 TestIKExamples ,
513505 name = "ik.example_ik_franka" ,
514506 devices = test_devices ,
515- expected_output = ["Inertia validation corrected" ],
516507)
517508
518509add_example_test (
519510 TestIKExamples ,
520511 name = "ik.example_ik_h1" ,
521512 devices = test_devices ,
522- expected_output = ["Inertia validation corrected" ],
523513)
524514
525515add_example_test (
526516 TestIKExamples ,
527517 name = "ik.example_ik_custom" ,
528518 devices = cuda_test_devices ,
529- expected_output = ["Inertia validation corrected" ],
530519)
531520
532521add_example_test (
533522 TestIKExamples ,
534523 name = "ik.example_ik_cube_stacking" ,
535524 test_options_cuda = {"world-count" : 16 , "num-frames" : 2000 },
536525 devices = cuda_test_devices ,
537- expected_output = ["Inertia validation corrected" , " World success rate" ],
526+ expected_output = ["World success rate" ],
538527)
539528
540529
@@ -548,7 +537,7 @@ class TestSelectionAPIExamples(unittest.TestCase):
548537 devices = test_devices ,
549538 test_options = {"num-frames" : 100 },
550539 test_options_cpu = {"num-frames" : 10 },
551- expected_output = ["Inertia validation corrected" , " Articulation|Link|Joint|Shape|Fixed|Floating|DOF|\\ [" ],
540+ expected_output = ["Articulation|Link|Joint|Shape|Fixed|Floating|DOF|\\ [" ],
552541)
553542add_example_test (
554543 TestSelectionAPIExamples ,
@@ -564,15 +553,15 @@ class TestSelectionAPIExamples(unittest.TestCase):
564553 devices = test_devices ,
565554 test_options = {"num-frames" : 100 },
566555 test_options_cpu = {"num-frames" : 10 },
567- expected_output = ["Inertia validation corrected" , " Articulation|Link|Joint|Shape|Fixed|Floating|DOF|\\ [" ],
556+ expected_output = ["Articulation|Link|Joint|Shape|Fixed|Floating|DOF|\\ [" ],
568557)
569558add_example_test (
570559 TestSelectionAPIExamples ,
571560 name = "selection.example_selection_multiple" ,
572561 devices = test_devices ,
573562 test_options = {"num-frames" : 100 },
574563 test_options_cpu = {"num-frames" : 10 },
575- expected_output = ["Inertia validation corrected" , " Articulation|Link|Joint|Shape|Fixed|Floating|DOF|\\ [" ],
564+ expected_output = ["Articulation|Link|Joint|Shape|Fixed|Floating|DOF|\\ [" ],
576565)
577566
578567
@@ -653,7 +642,6 @@ class TestSensorExamples(unittest.TestCase):
653642 name = "sensors.example_sensor_tiled_camera" ,
654643 devices = cuda_test_devices ,
655644 test_options = {"num-frames" : 4 * 36 }, # train_iters * sim_steps
656- expected_output = ["Inertia validation corrected" ],
657645)
658646
659647add_example_test (
@@ -725,7 +713,7 @@ class TestMPMExamples(unittest.TestCase):
725713 name = "basic.example_basic_plotting" ,
726714 devices = test_devices ,
727715 test_options = {"num-frames" : 200 },
728- expected_output = ["Inertia validation corrected" , " Diagnostics plot saved to" ],
716+ expected_output = ["Diagnostics plot saved to" ],
729717)
730718
731719
@@ -752,7 +740,6 @@ class TestContactsExamples(unittest.TestCase):
752740 name = "contacts.example_brick_stacking" ,
753741 devices = cuda_test_devices ,
754742 test_options = {"num-frames" : 1200 },
755- expected_output = ["Inertia validation corrected" ],
756743)
757744add_example_test (
758745 TestContactsExamples ,
0 commit comments