From 9c5ef235cc595d0f51b0810786c2b512bef7c69f Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 7 Jan 2013 13:05:37 -0500 Subject: tests: Add support for skipping tests, skip EIO tests if not enabled The EIO tests depend on the EIO support from the "encumbered" repository, which means that they are not normally built with gem5. This causes all EIO related tests to fail, which is both annoying and confusing. This patch addresses this by adding support for skipping tests if certain conditions (e.g., the presence of a SimObject) can not be met. It introduces the following Python functions that can be called from within a test case: * skip_test -- Skip a test and optionally print why the test was skipped. * has_sim_object -- Test if a SimObject exists. * require_sim_object -- Test if a SimObject exists and skip, or optionally fail, the test if not. Additionally, this patch updates the EIO tests to check for the presence of EioProcess. --- tests/quick/se/30.eio-mp/test.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/quick/se/30.eio-mp') diff --git a/tests/quick/se/30.eio-mp/test.py b/tests/quick/se/30.eio-mp/test.py index 3dbb7614a..dcf6fb007 100644 --- a/tests/quick/se/30.eio-mp/test.py +++ b/tests/quick/se/30.eio-mp/test.py @@ -26,6 +26,8 @@ # # Authors: Lisa Hsu +require_sim_object("EioProcess") + process = EioProcess(file = binpath('anagram', 'anagram-vshort.eio.gz')) for i in xrange(nb_cores): -- cgit v1.2.3