Skip to content

Commit 9b7b675

Browse files
committed
fix(tests): skip native-image execution on macOS CI without skipping JVM tests
1 parent 27cf520 commit 9b7b675

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

integration-tests/test_jbang_integration.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ def test_graalpy_template_native(self):
210210
self.assertIn("Successfully installed termcolor", out)
211211
self.assertIn("hello java", out)
212212

213-
@util.skip_on_macos("JBang native-image is unstable on macOS CI")
214213
def test_hello_example(self):
215214
work_dir = self.tmpdir
216215
hello_java_file = self.prepare_hello_example(work_dir)

integration-tests/test_maven_plugin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ def check_generated_app(self, use_default_vfs_path):
279279

280280

281281
@util.skip_on_windows("ujson installation broken on Windows")
282-
@util.skip_on_macos("native-image execution exceeds CI time limits on macOS")
283282
def test_generated_app(self):
284283
self.check_generated_app(use_default_vfs_path=False)
285284

integration-tests/util.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,17 @@
6060
native_image_mode = "all"
6161
extra_maven_repos = []
6262

63+
def _native_image_allowed_on_platform():
64+
return sys.platform != "darwin"
65+
6366
def native_image_all():
67+
if not _native_image_allowed_on_platform():
68+
return False
6469
return native_image_mode == "all"
6570

6671
def native_image_smoke():
72+
if not _native_image_allowed_on_platform():
73+
return False
6774
return native_image_mode in ("all", "smoke")
6875

6976
gradle_java_home = os.environ['JAVA_HOME']
@@ -74,9 +81,6 @@ def long_running_test(func):
7481
def skip_on_windows(justification):
7582
return unittest.skipIf(sys.platform.startswith("win"), "skipped on Windows: " + justification)
7683

77-
def skip_on_macos(justification):
78-
return unittest.skipIf(sys.platform == "darwin", "skipped on macOS: " + justification)
79-
8084
class TemporaryTestDirectory():
8185
def __init__(self):
8286
if no_clean:

0 commit comments

Comments
 (0)