unit-test: Exercise all of the repository's supported build systems
If a repository supports multiple build systems (e.g. libmctp with
autotools and cmake), attempt to build and test the code with each build
system in turn. This helps ensure the build systems don't bitrot.
Change-Id: Iec46f858beca43f0f8598132f816933ea6c8e6d1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/scripts/unit-test.py b/scripts/unit-test.py
index c6dc14c..ca0868d 100755
--- a/scripts/unit-test.py
+++ b/scripts/unit-test.py
@@ -944,14 +944,17 @@
system.build()
system.install()
- def test(self):
- system = self.build_system()
+ def _test_one(self, system):
system.configure(True)
system.build()
system.install()
system.test()
system.analyze()
+ def test(self):
+ for system in self.build_systems():
+ self._test_one(system)
+
def find_file(filename, basedir):
"""