From 4e54c6b7451c9a1369dd428e005688a9f7c225f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Fri, 8 Nov 2024 15:38:35 +0100 Subject: [PATCH] Drop extra dashes in front of compiler flags in tests --- test/framework/toolchain.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/framework/toolchain.py b/test/framework/toolchain.py index 981e64a280..4c069749e9 100644 --- a/test/framework/toolchain.py +++ b/test/framework/toolchain.py @@ -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() @@ -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() @@ -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): @@ -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: @@ -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)] @@ -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: