unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 438f8ef1831575ae577d93023939b84003a4ae52 3565 bytes (raw)
name: packages/patches/python-angr-check-exec-deps.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
 
The angr test suite performs analysis on several pre-compiled binaries
to ensure its binary analysis capabilities are working as intended.
Some of these binaries are also executed as part of the test suite to
test if the simulation engine provided by angr results in the same
output as native execution of the binary.

For Guix, this files as the glibc shared objects cannot be found.
Additionally, we don't really want to execute pre-compiled binaries
on Guix, hence we disable those tests.

diff --git a/tests/test_ctype_locale.py b/tests/test_ctype_locale.py
index 08cb89836..2b9233558 100644
--- a/tests/test_ctype_locale.py
+++ b/tests/test_ctype_locale.py
@@ -14,7 +14,7 @@ test_location = os.path.dirname(os.path.abspath(__file__))
 
 
 class TestCtypeLocale(unittest.TestCase):
-    @skip_if_not_linux
+    @unittest.skip("test executes pre-compiled binaries")
     def test_ctype_b_loc(self):
         """
         test_ctype_locale.test_ctype_b_loc
@@ -60,7 +60,7 @@ class TestCtypeLocale(unittest.TestCase):
         output = subprocess.check_output(bin_path, shell=True)
         assert result == output
 
-    @skip_if_not_linux
+    @unittest.skip("test executes pre-compiled binaries")
     def test_ctype_tolower_loc(self):
         """
         test_ctype_locale.test_ctype_tolower_loc
@@ -109,7 +109,7 @@ class TestCtypeLocale(unittest.TestCase):
         output = subprocess.check_output(bin_path, shell=True)
         assert result == output
 
-    @skip_if_not_linux
+    @unittest.skip("test executes pre-compiled binaries")
     def test_ctype_toupper_loc(self):
         """
         test_ctype_locale.test_ctype_toupper_loc
diff --git a/tests/test_signed_div.py b/tests/test_signed_div.py
index 59cb9b8d1..994ed9c65 100644
--- a/tests/test_signed_div.py
+++ b/tests/test_signed_div.py
@@ -1,6 +1,7 @@
 import angr
 import subprocess
 import sys
+import pytest
 
 import logging
 
@@ -13,7 +14,7 @@ import os
 test_location = os.path.dirname(os.path.realpath(__file__))
 
 
-@skipUnless(sys.platform.startswith("linux"), "linux only")
+@pytest.mark.skip(reason="test executes pre-compiled binaries")
 def test_signed_div():
     test_bin = os.path.join(test_location, "..", "..", "binaries", "tests", "x86_64", "test_signed_div")
     b = angr.Project(test_bin, auto_load_libs=False)
diff --git a/tests/test_sscanf.py b/tests/test_sscanf.py
index 29d2c8403..ea799b310 100644
--- a/tests/test_sscanf.py
+++ b/tests/test_sscanf.py
@@ -1,3 +1,4 @@
+import pytest
 import angr
 import subprocess
 import sys
@@ -14,7 +15,7 @@ test_location = os.path.dirname(os.path.realpath(__file__))
 
 
 class TestSscanf(unittest.TestCase):
-    @unittest.skipUnless(sys.platform.startswith("linux"), "linux only")
+    @unittest.skip("test executes pre-compiled binaries")
     def test_sscanf(self):
         test_bin = os.path.join(test_location, "..", "..", "binaries", "tests", "x86_64", "sscanf_test")
         b = angr.Project(test_bin, auto_load_libs=False)
diff --git a/tests/test_strtol.py b/tests/test_strtol.py
index 6c29cab22..f36181407 100644
--- a/tests/test_strtol.py
+++ b/tests/test_strtol.py
@@ -11,7 +11,7 @@ class TestStrtol(unittest.TestCase):
     # pylint: disable=no-self-use
 
     @slow_test
-    @unittest.skipUnless(sys.platform.startswith("linux"), "linux-only")
+    @unittest.skip("test executes pre-compiled binaries")
     def test_strtol(self, threads=None):
         test_bin = os.path.join(bin_location, "tests", "x86_64", "strtol_test")
         # disabling auto_load_libs increases the execution time of the test case.

debug log:

solving 438f8ef1831575ae577d93023939b84003a4ae52 ...
found 438f8ef1831575ae577d93023939b84003a4ae52 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).