[rtems commit] wscript: Apply test state expectations correctly

Joel Sherrill joel at rtems.org
Tue Nov 24 14:01:26 UTC 2020


Module:    rtems
Branch:    master
Commit:    b2ea2bc33309596f864fad131e4799993b53ec46
Changeset: http://git.rtems.org/rtems/commit/?id=b2ea2bc33309596f864fad131e4799993b53ec46

Author:    Kinsey Moore <kinsey.moore at oarcorp.com>
Date:      Thu Nov 19 12:58:54 2020 -0600

wscript: Apply test state expectations correctly

The variety of expected test states are not currently applied to tests
with names containing '-' correctly due to a failure to replace '-' with
'_' before adding the CPPFLAGS to the environment for that test. This
ensures that all additions of CPPFLAGS have that replacement performed
so that the CPPFLAGS are applied properly during compilation.

---

 wscript | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wscript b/wscript
index 5ad93de..f5b7629 100755
--- a/wscript
+++ b/wscript
@@ -723,7 +723,7 @@ class OptionItem(Item):
         print("{} = {}".format(self.data["name"], value))
 
     def _do_append_test_cppflags(self, conf, name, state):
-        conf.env.append_value("TEST_" + name.upper() + "_CPPFLAGS", state)
+        conf.env.append_value("TEST_" + name.upper().replace("-", "_") + "_CPPFLAGS", state)
 
     def _append_test_cppflags(self, conf, cic, value, arg):
         self._do_append_test_cppflags(conf, arg, value)



More information about the vc mailing list