Skip to content

Commit

Permalink
Environment reset is not needed at the end of the test, each one star…
Browse files Browse the repository at this point in the history
…ts with clean env. The real problem was that the template_constant_dict has changed, so the expected output is now different - and should include sysroot and its value
  • Loading branch information
Caspar van Leeuwen committed Oct 25, 2023
1 parent ea000b2 commit e6bc403
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/framework/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -1367,17 +1367,13 @@ def test_sysroot_template(self):

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

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

# Restore original value for sysroot build option
update_build_option('sysroot', old_sysroot)

def test_constant_doc(self):
"""test constant documentation"""
doc = avail_easyconfig_constants()
Expand Down Expand Up @@ -3266,6 +3262,7 @@ def test_template_constant_dict(self):
'nameletter': 'g',
'nameletterlower': 'g',
'parallel': None,
'sysroot': '',
'toolchain_name': 'foss',
'toolchain_version': '2018a',
'version': '1.5',
Expand Down

0 comments on commit e6bc403

Please sign in to comment.