util: Teach the m5 utility's scons how to run unit tests.
authorGabe Black <gabe.black@gmail.com>
Fri, 23 Oct 2020 03:00:45 +0000 (20:00 -0700)
committerGabe Black <gabe.black@gmail.com>
Fri, 4 Dec 2020 01:39:34 +0000 (01:39 +0000)
commit77869b05b8c03a05b4bc3539daaa32d754ffa8a3
tree9344a1cfbfc8e0ed2ab743625f49a18748926536
parent5ad1fcf3ca26d4d0df8ea54401c590bbd0dbd251
util: Teach the m5 utility's scons how to run unit tests.

This may be directly in the case of native tests, or through a user
level QEMU binary for non-native tests. scons is smart enough to expect
to be able to run native tests always, and non-native tests only if a
qemu binary has been found.

To tell scons to run tests in a particular category, you can use a
command of this form:

scons build/[category]/test/

where category is either an "abi" like sparc or x86, or "native" for
tests which don't do anything target specific and so can be run on the
host.

There will be two directories under .../tests, "bin" and "result". "bin"
is where the test binaries themselves will be built, and "result" is for
the results of running those binaries.

Change-Id: I6450ab4a97169f8a01292d946bfac18008b0430c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27752
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
util/m5/SConstruct
util/m5/src/abi/aarch64/SConsopts
util/m5/src/abi/arm/SConsopts
util/m5/src/abi/sparc/SConsopts
util/m5/src/abi/thumb/SConsopts
util/m5/src/abi/x86/SConsopts