From: Damien Lespiau <damien.lespiau@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 08/10] lib: Introduce drmtest_skip_on_simulation()
Date: Mon, 29 Apr 2013 19:15:35 +0100 [thread overview]
Message-ID: <1367259337-14586-9-git-send-email-damien.lespiau@intel.com> (raw)
In-Reply-To: <1367259337-14586-1-git-send-email-damien.lespiau@intel.com>
This will allow us to explicitely blacklist tests we don't want to run
on simulation.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
lib/drmtest.c | 12 ++++++++++++
lib/drmtest.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 6e5b636..cafc8bc 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -38,6 +38,7 @@
#include <math.h>
#include <getopt.h>
#include <stdlib.h>
+#include <unistd.h>
#include "drmtest.h"
#include "i915_drm.h"
@@ -612,6 +613,17 @@ bool drmtest_run_in_simulation(void)
return simulation;
}
+/* Skip the test when running on simulation (and that's relevant only when
+ * we're not in the mode where we list the subtests) */
+void drmtest_skip_on_simulation(void)
+{
+ if (drmtest_only_list_subtests())
+ return;
+
+ if (drmtest_run_in_simulation())
+ exit(77);
+}
+
/* other helpers */
void drmtest_exchange_int(void *array, unsigned i, unsigned j)
{
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 71d68c4..96dddda 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -91,6 +91,7 @@ bool drmtest_only_list_subtests(void);
bool drmtest_run_in_simulation(void);
#define SLOW_QUICK(slow,quick) (drmtest_run_in_simulation() ? (quick) : (slow))
+void drmtest_skip_on_simulation(void);
/* helpers based upon the libdrm buffer manager */
void drmtest_init_aperture_trashers(drm_intel_bufmgr *bufmgr);
--
1.8.1.4
next prev parent reply other threads:[~2013-04-29 18:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-29 18:15 Provide a simulation friendly test environment v2 Damien Lespiau
2013-04-29 18:15 ` [PATCH 01/10] README: Reword a few sentences Damien Lespiau
2013-04-29 18:15 ` [PATCH 02/10] build: Make grep silent when running make test Damien Lespiau
2013-04-29 18:15 ` [PATCH 03/10] lib: Remove the execution bit of intel_chipset.h Damien Lespiau
2013-04-29 18:15 ` [PATCH 04/10] Update .gitignore files with the new tests and tools Damien Lespiau
2013-04-29 18:15 ` [PATCH 05/10] lib: Add the declaration of intel_register_access_needs_fakewake() Damien Lespiau
2013-04-29 18:15 ` [PATCH 06/10] reg_dumper: Shut a warning down Damien Lespiau
2013-05-08 12:41 ` Damien Lespiau
2013-04-29 18:15 ` [PATCH 07/10] lib: Rename IGT_QUICK to INTEL_SIMULATION Damien Lespiau
2013-04-29 18:15 ` Damien Lespiau [this message]
2013-04-29 23:00 ` [PATCH 08/10] lib: Introduce drmtest_skip_on_simulation() Jesse Barnes
2013-04-29 18:15 ` [PATCH 09/10] tests: Black list tests we don't want to run on simulation Damien Lespiau
2013-04-29 21:04 ` Daniel Vetter
2013-04-29 18:15 ` [PATCH 10/10] tests: Instrument tests run in simulation to run quickly Damien Lespiau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1367259337-14586-9-git-send-email-damien.lespiau@intel.com \
--to=damien.lespiau@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox