From 17dd3f76f022a9860477bbab5a69246bdbcc8fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Fri, 25 Jan 2019 00:00:04 +0000 Subject: [PATCH] build-gem5: --regression-test --- README.adoc | 8 ++++++++ build-gem5 | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/README.adoc b/README.adoc index 52c8f53..a6c8a8f 100644 --- a/README.adoc +++ b/README.adoc @@ -10182,6 +10182,14 @@ This does not run the test however. Note that the command and it's corresponding results don't need to show consecutively on stdout because tests are run in parallel. You just have to match them based on the class name `CircleBufTest` to the file `circlebuf.test.cpp`. +Running the larger regression tests is exposed with: + +.... +./build-gem5 --regression-test quick/fs +.... + +but TODO: those require magic blobs on `M5_PATH` that we don't currently automate. + === gem5 clang build TODO test properly, benchmark vs GCC. diff --git a/build-gem5 b/build-gem5 index d052c29..720c497 100755 --- a/build-gem5 +++ b/build-gem5 @@ -13,6 +13,15 @@ class Main(common.BuildCliFunction): description='''\ Build gem5. https://github.com/cirosantilli/linux-kernel-module-cheat-regression#gem5-buildroot-setup +''' + ) + self.add_argument( + '--regression-test', + action='append', + default=[], + help='''\ +Build and run the given gem5 regression test. +https://github.com/cirosantilli/linux-kernel-module-cheat-regression#gem5-unit-tests ''' ) self.add_argument( @@ -111,6 +120,17 @@ https://github.com/cirosantilli/linux-kernel-module-cheat-regression#gem5-unit-t self.sh.cp(m5term_build, self.env['gem5_m5term']) if self.env['unit_test']: targets = [self.get_gem5_target_path(self.env, test) for test in self.env['unit_test']] + elif self.env['regression_test']: + targets = [ + os.path.join( + self.env['gem5_executable_dir'], + 'tests', + self.env['gem5_build_type'], + test + ) + for test + in self.env['regression_test'] + ] elif self.env['unit_tests']: targets = [self.env['gem5_unit_test_target']] else: