From: Gabe Black Date: Fri, 23 Oct 2020 03:01:00 +0000 (-0700) Subject: util: Make running m5 util unit tests opt-in. X-Git-Tag: develop-gem5-snapshot~384 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ac80f9f55bef0d04f636258f2bf2abd1e3db776;p=gem5.git util: Make running m5 util unit tests opt-in. These tests don't run reliably right now for a few reasons, including problems with QEMU, and apparently inaccurate information from g++-s --print-sysroot option. This may be revisited in the future if those problems can be sorted out. For now, avoid tripping up new people who won't know to (or how to) work around those sorts of errors. Change-Id: Ide42e6c6b27159ff146b8495ae568d1fd377f4f4 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28179 Reviewed-by: Gabe Black Maintainer: Gabe Black Tested-by: kokoro --- diff --git a/util/m5/README.md b/util/m5/README.md index 691347816..941c499f6 100644 --- a/util/m5/README.md +++ b/util/m5/README.md @@ -175,7 +175,7 @@ some other prefix corresponding to that host. ### SCons command line flags --debug-build: Compile with the -g option, and -O0. ---no-test-xml: Exclude the test result XML files from the build. +--run-tests: Allow the test result XML files to be build targets. --verbose: Show build command lines and full command output. ## External dependency detection diff --git a/util/m5/SConstruct b/util/m5/SConstruct index 79fb1fa2f..6f1ca9fad 100644 --- a/util/m5/SConstruct +++ b/util/m5/SConstruct @@ -44,8 +44,8 @@ def abspath(d): AddOption('--debug-build', dest='debug_build', action='store_true', help='Build with debug info, and disable optimizations.') -AddOption('--no-test-xml', dest='no_tests', action='store_true', - help='Omit test output xml files from the build.') +AddOption('--run-tests', dest='run_tests', action='store_true', + help='Enable test output xml files as build targets.') AddOption('--verbose', dest='verbose', action='store_true') # Universal settings. @@ -118,8 +118,7 @@ def GTest(env, name, *srcs, **kwargs): need_qemu_to_run = 'HAVE_QEMU' in env; # If we can run this test... - if (not need_qemu_to_run or env['HAVE_QEMU']) \ - and not GetOption('no_tests'): + if GetOption('run_tests') and (not need_qemu_to_run or env['HAVE_QEMU']): # An XML file which holds the results of the test. xml = Dir('test').Dir('result').File('%s.xml' % name) # The basic command line for the test.