AI 144501: am: CL 144500 Added support for some extra make arguments for some testsuite.
For instance the libstdc++ testsuite requires BIONIC_TESTS=1 to
actually build the tests.
* development/testrunner/test_defs.py:
Parse the new extra_make_args attribute.
* development/testrunner/runtest.py:
Added support for extra make arguments. Some testsuite requires this to actually be built.
Changed the log statement to log what is actually being done.
* development/testrunner/test_defs.xml:
Added extra make argument to enable the libstdc++ tests.
Original author: niko
Automated import of CL 144501
diff --git a/testrunner/test_defs.py b/testrunner/test_defs.py
index f7a435e..2cdcfa8 100644
--- a/testrunner/test_defs.py
+++ b/testrunner/test_defs.py
@@ -158,6 +158,7 @@
_BUILD_ATTR = "build_path"
_CONTINUOUS_ATTR = "continuous"
_DESCRIPTION_ATTR = "description"
+ _EXTRA_MAKE_ARGS_ATTR = "extra_make_args"
_DEFAULT_RUNNER = "android.test.InstrumentationTestRunner"
@@ -202,6 +203,11 @@
self._description = suite_element.getAttribute(self._DESCRIPTION_ATTR)
else:
self._description = ""
+ if suite_element.hasAttribute(self._EXTRA_MAKE_ARGS_ATTR):
+ self._extra_make_args = suite_element.getAttribute(
+ self._EXTRA_MAKE_ARGS_ATTR)
+ else:
+ self._extra_make_args = ""
def GetName(self):
return self._name
@@ -235,8 +241,13 @@
return self._native
def GetDescription(self):
+ """Returns a description if available, an empty string otherwise."""
return self._description
+ def GetExtraMakeArgs(self):
+ """Returns the extra make args if available, an empty string otherwise."""
+ return self._extra_make_args
+
def Parse(file_path):
"""Parses out a TestDefinitions from given path to xml file.