File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ def setUp(self):
5656 super ().setUp ()
5757 if TEST_WITH_ROCM or IS_SANDCASTLE or IS_WINDOWS or IS_MACOS :
5858 raise unittest .SkipTest ("non-portable load_library call used in test" )
59+ if not torch ._C ._jit_has_cpp_tests ():
60+ raise unittest .SkipTest ("Tests were not built, use BUILD_TEST=1" )
5961 torch_root = Path (__file__ ).resolve ().parent .parent .parent
6062 p = torch_root / 'build' / 'lib' / 'libjitbackend_test.so'
6163 torch .ops .load_library (str (p ))
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ class TestTorchbind(JitTestCase):
2626 def setUp (self ):
2727 if TEST_WITH_ROCM or IS_SANDCASTLE or IS_WINDOWS or IS_MACOS :
2828 raise unittest .SkipTest ("non-portable load_library call used in test" )
29+ if not torch ._C ._jit_has_cpp_tests ():
30+ raise unittest .SkipTest ("Tests were not built, use BUILD_TEST=1" )
2931 torch_root = Path (__file__ ).resolve ().parent .parent .parent
3032 p = torch_root / 'build' / 'lib' / 'libtorchbind_test.so'
3133 torch .ops .load_library (str (p ))
You can’t perform that action at this time.
0 commit comments