summaryrefslogtreecommitdiff
path: root/tests/gem_mmap_gtt.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-03-25 20:06:20 +0000
committerDamien Lespiau <damien.lespiau@intel.com>2013-07-18 15:56:35 +0100
commitd1e862324b747a0ab5d985eaa6830076817231c5 (patch)
tree785a192f9b79be28c5ead01f50cf1ba40dc281b2 /tests/gem_mmap_gtt.c
parent5fa15f79d00ba4f51f35cb83cf2e82a9460b60b2 (diff)
tests: Instrument tests run in simulation to run quickly
We tweak the tests marked as runnable in simulation to run more quickly, more often then not at the expense of stress testing (which is of an arguable interest for the initial bring up in simulation). Hopefully the values chosen still test something, which is not always straightforward. It does run quickly, the number on an IVB machines are: $ time sudo IGT_SIMULATION=0 ./piglit-run.py tests/igt.tests foo [...] real 2m0.141s user 0m16.365s sys 1m33.382s Vs. $ time sudo IGT_SIMULATION=1 ./piglit-run.py tests/igt.tests foo [...] real 0m0.448s user 0m0.226s sys 0m0.183s Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'tests/gem_mmap_gtt.c')
-rw-r--r--tests/gem_mmap_gtt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c
index d759340d..e53a942a 100644
--- a/tests/gem_mmap_gtt.c
+++ b/tests/gem_mmap_gtt.c
@@ -40,7 +40,7 @@
#include "i915_drm.h"
#include "drmtest.h"
-#define OBJECT_SIZE (16*1024*1024)
+static int OBJECT_SIZE = 16*1024*1024;
static void set_domain(int fd, uint32_t handle)
{
@@ -148,6 +148,9 @@ int main(int argc, char **argv)
{
int fd;
+ if (drmtest_run_in_simulation())
+ OBJECT_SIZE = 1 * 1024 * 1024;
+
drmtest_subtest_init(argc, argv);
fd = drm_open_any();