Skip to content

Commit ea000b2

Browse files
author
Caspar van Leeuwen
committed
Restore original sysroot at the end of test
1 parent 0076677 commit ea000b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/framework/easyconfig.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,13 +1367,17 @@ def test_sysroot_template(self):
13671367

13681368
# Validate the value of the sysroot template if sysroot is unset (i.e. the build option is None)
13691369
# As a test, we'll set the sysroot to self.test_prefix, as it has to be a directory that is guaranteed to exist
1370+
old_sysroot = build_option('sysroot')
13701371
update_build_option('sysroot', self.test_prefix)
13711372

13721373
ec = EasyConfig(test_ec)
13731374
self.assertEqual(ec['configopts'], "--some-opt=%s/" % self.test_prefix)
13741375
self.assertEqual(ec['buildopts'], "--some-opt=%s/" % self.test_prefix)
13751376
self.assertEqual(ec['installopts'], "--some-opt=%s/" % self.test_prefix)
13761377

1378+
# Restore original value for sysroot build option
1379+
update_build_option('sysroot', old_sysroot)
1380+
13771381
def test_constant_doc(self):
13781382
"""test constant documentation"""
13791383
doc = avail_easyconfig_constants()

0 commit comments

Comments
 (0)