Skip to content

Commit

Permalink
Drop extra dashes in front of compiler flags in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Micket committed Nov 8, 2024
1 parent 3b29f79 commit 4e54c6b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/framework/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def test_optimization_flags_combos(self):
tc.prepare()
for var in flag_vars:
flags = tc.get_variable(var)
flag = '-%s' % tc.COMPILER_SHARED_OPTION_MAP['lowopt']
flag = tc.COMPILER_SHARED_OPTION_MAP['lowopt']
self.assertIn(flag, flags)
self.modtool.purge()

Expand All @@ -593,7 +593,7 @@ def test_optimization_flags_combos(self):
tc.prepare()
for var in flag_vars:
flags = tc.get_variable(var)
flag = '-%s' % tc.COMPILER_SHARED_OPTION_MAP['noopt']
flag = tc.COMPILER_SHARED_OPTION_MAP['noopt']
self.assertIn(flag, flags)
self.modtool.purge()

Expand All @@ -603,7 +603,7 @@ def test_optimization_flags_combos(self):
tc.prepare()
for var in flag_vars:
flags = tc.get_variable(var)
flag = '-%s' % tc.COMPILER_SHARED_OPTION_MAP['noopt']
flag = tc.COMPILER_SHARED_OPTION_MAP['noopt']
self.assertIn(flag, flags)

def test_misc_flags_shared(self):
Expand All @@ -619,7 +619,7 @@ def test_misc_flags_shared(self):
with self.mocked_stdout_stderr():
tc.prepare()
# we need to make sure we check for flags, not letter (e.g. 'v' vs '-v')
flag = '-%s' % tc.COMPILER_SHARED_OPTION_MAP[opt]
flag = tc.COMPILER_SHARED_OPTION_MAP[opt]
for var in flag_vars:
flags = tc.get_variable(var).split()
if enable:
Expand Down Expand Up @@ -692,7 +692,7 @@ def test_override_optarch(self):
tc.prepare()
flag = None
if optarch_var is not None:
flag = '-%s' % optarch_var
flag = optarch_var
else:
# default optarch flag
flag = tc.COMPILER_OPTIMAL_ARCHITECTURE_OPTION[(tc.arch, tc.cpu_family)]
Expand Down Expand Up @@ -907,9 +907,9 @@ def test_misc_flags_unique_fortran(self):
tc.prepare()
flag = tc.COMPILER_UNIQUE_OPTION_MAP[opt]
if isinstance(flag, list):
flag = ' '.join('-%s' % x for x in flag)
flag = ' '.join(flag)
else:
flag = '-%s' % flag
flag = flag
for var in flag_vars:
flags = tc.get_variable(var)
if enable:
Expand Down

0 comments on commit 4e54c6b

Please sign in to comment.