diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2013-03-25 20:06:20 +0000 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2013-07-18 15:56:35 +0100 |
commit | d1e862324b747a0ab5d985eaa6830076817231c5 (patch) | |
tree | 785a192f9b79be28c5ead01f50cf1ba40dc281b2 /tests/gem_ctx_basic.c | |
parent | 5fa15f79d00ba4f51f35cb83cf2e82a9460b60b2 (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_ctx_basic.c')
-rw-r--r-- | tests/gem_ctx_basic.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/gem_ctx_basic.c b/tests/gem_ctx_basic.c index 3757d847..729c79c0 100644 --- a/tests/gem_ctx_basic.c +++ b/tests/gem_ctx_basic.c @@ -143,6 +143,11 @@ int main(int argc, char *argv[]) fd = drm_open_any(); devid = intel_get_drm_devid(fd); + if (drmtest_run_in_simulation()) { + num_contexts = 2; + iter = 4; + } + parse(argc, argv); threads = calloc(num_contexts, sizeof(*threads)); |