From 0fdd354551d4445a080fd0c4704205ba3a91b7c4 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: Sun, 23 Feb 2020 00:00:02 +0000 Subject: [PATCH] gem5: gem-regression downloads test binaries to a fixed location outside of source tree with the newly added --bin-path option Otherwise each --gem5-worktree would download its own copy of the test binaries into its own source tree. --- README.adoc | 8 +++++--- common.py | 1 + gem5-regression | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.adoc b/README.adoc index 9a8e1bc..fc0b728 100644 --- a/README.adoc +++ b/README.adoc @@ -12220,6 +12220,8 @@ Note that the command and it's corresponding results don't need to show consecut ==== gem5 regression tests +This section is about running the gem5 in-tree tests. + https://stackoverflow.com/questions/52279971/how-to-run-the-gem5-unit-tests Running the larger 2019 regression tests is exposed for example with: @@ -12229,13 +12231,13 @@ Running the larger 2019 regression tests is exposed for example with: ./gem5-regression --arch aarch64 -- --length quick --length long .... -After the first run has downloaded the test binaries for you, you can speed up the process a little bit by skipping an useless scons call: +After the first run has downloaded the test binaries for you, you can speed up the process a little bit by skipping an useless SCons call: .... ./gem5-regression --arch aarch64 -- --length quick --length long --skip-build .... -Note however that `--skip-build` is required at least once per branch to download the test binaries, because the test interface is bad. +Note however that running without `--skip-build` is required at least once to download the test binaries, because the test interface is bad. List available instead of running them: @@ -12243,7 +12245,7 @@ List available instead of running them: ./gem5-regression --gem5-worktree master --arch aarch64 --cmd list .... -You can then pick one suite from the list (not tests) and run just it e.g. with: +You can then pick one suite (has to be a suite, not an "individual test") from the list and run just it e.g. with: .... ./gem5-regression --arch aarch64 -- --uid SuiteUID:tests/gem5/cpu_tests/test.py:cpu_test_AtomicSimpleCPU_Bubblesort-ARM-opt diff --git a/common.py b/common.py index 2610273..80eea84 100644 --- a/common.py +++ b/common.py @@ -844,6 +844,7 @@ Incompatible archs are skipped. # gem5 if not env['_args_given']['gem5_build_dir']: env['gem5_build_dir'] = join(env['gem5_out_dir'], env['gem5_build_id']) + env['gem5_test_binaries_dir'] = join(env['gem5_out_dir'], 'test_binaries') env['gem5_m5term'] = join(env['gem5_build_dir'], 'm5term') env['gem5_build_build_dir'] = join(env['gem5_build_dir'], 'build') env['gem5_executable_dir'] = join(env['gem5_build_build_dir'], env['gem5_arch']) diff --git a/gem5-regression b/gem5-regression index f3930ba..af31775 100755 --- a/gem5-regression +++ b/gem5-regression @@ -33,6 +33,7 @@ List tests instead of running them. if self.env['cmd'] == 'run': extra_args = [ '--base-dir', self.env['gem5_source_dir'], LF, + '--bin-path', self.env['gem5_test_binaries_dir'], LF, '--build-dir', self.env['gem5_build_build_dir'], LF, '-j', str(self.env['nproc']), LF, '-t', str(self.env['nproc']), LF,