diff --git a/util/m5/README.md b/util/m5/README.md index f1d9bece3c..cfa2fbd8f7 100644 --- a/util/m5/README.md +++ b/util/m5/README.md @@ -175,6 +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. ## External dependency detection diff --git a/util/m5/SConstruct b/util/m5/SConstruct index 3a96103aea..64bb543e41 100644 --- a/util/m5/SConstruct +++ b/util/m5/SConstruct @@ -44,6 +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.') # Universal settings. if GetOption('debug_build'): @@ -85,7 +87,8 @@ 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']: + if (not need_qemu_to_run or env['HAVE_QEMU']) \ + and not GetOption('no_tests'): # 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.