@@ -41,25 +41,21 @@ def setUp(self):
41
41
self .oid_source_dir = os .path .dirname (
42
42
os .path .dirname (os .path .abspath (__file__ ))
43
43
)
44
+ # Assume we started in the CMake build directory
45
+ self .build_dir = self .original_working_directory
44
46
45
47
# This needs to be a class variable, otherwise it won't be referenced
46
48
# by any object alive by the end of this class method's execution and
47
49
# and the directory will be automatically removed before executing the
48
50
# tests themselves.
49
- self .temp = tempfile .TemporaryDirectory (
50
- dir = os .path .join (self .oid_source_dir , "build/" )
51
- )
51
+ self .temp = tempfile .TemporaryDirectory (dir = self .build_dir )
52
52
os .chdir (self .temp .name )
53
53
54
- self .oid = os .path . join ( self . oid_source_dir , "build/oid " )
55
- self .oid_conf = os .path .join (self .oid_source_dir , "build/ testing.oid.toml" )
54
+ self .oid = os .getenv ( "OID " )
55
+ self .oid_conf = os .path .join (self .build_dir , ".." , " testing.oid.toml" )
56
56
57
- self .binary_path = os .path .join (
58
- self .oid_source_dir , "test" , "integration_mttest"
59
- )
60
- self .sleepy_binary_path = os .path .join (
61
- self .oid_source_dir , "test" , "integration_sleepy"
62
- )
57
+ self .binary_path = os .path .join (self .build_dir , "integration_mttest" )
58
+ self .sleepy_binary_path = os .path .join (self .build_dir , "integration_sleepy" )
63
59
64
60
self .custom_generated_code_file = os .path .join (
65
61
self .temp .name , "custom_oid_output.cpp"
@@ -150,6 +146,9 @@ def test_attach_more_than_once_works(self):
150
146
self .assertEqual (output [0 ]["dynamicSize" ], 76 )
151
147
self .assertEqual (len (output [0 ]["members" ]), 25 )
152
148
149
+ @unittest .skip (
150
+ "https://github.com/facebookexperimental/object-introspection/issues/53"
151
+ )
153
152
def test_data_segment_size_change (self ):
154
153
with subprocess .Popen (
155
154
f"{ self .binary_path } 1000" ,
0 commit comments