Skip to content

Commit

Permalink
Only run the new test on Linux
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
  • Loading branch information
JeanChristopheMorinPerso committed Jul 21, 2024
1 parent ba17e02 commit 20d7ec2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/rez/tests/test_utils_elf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"""
unit tests for 'rez.utils.elf' module
"""
from rez.tests.util import TestBase
import platform
import unittest

from rez.tests.util import TestBase, program_dependent
from rez.utils.elf import get_rpaths, patch_rpaths


Expand All @@ -22,6 +25,8 @@ def setUpClass(cls):
def tearDownClass(cls):
super().tearDownClass()

@unittest.skipUnless(platform.system() == "Linux", "Linux only")
@program_dependent("readelf")
def test_get_rpaths_raises_runtime_exception(self):
"""Tests that no TypeError from elf functions are raised."""
self.assertRaises(
Expand All @@ -32,4 +37,4 @@ def test_get_rpaths_raises_runtime_exception(self):
self.assertRaises(
RuntimeError,
patch_rpaths("/path/to/elfpath", ["$ORIGIN", "$ORIGINTEST"])
)
)

0 comments on commit 20d7ec2

Please sign in to comment.