mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 02:16:17 +00:00
tests/prime_nv_pcopy: convert to subtests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
cc4eeb990f
commit
c2e05af353
@ -7,10 +7,10 @@ noinst_PROGRAMS = \
|
|||||||
|
|
||||||
if HAVE_NOUVEAU
|
if HAVE_NOUVEAU
|
||||||
NOUVEAU_TESTS_M = \
|
NOUVEAU_TESTS_M = \
|
||||||
prime_nv_test
|
prime_nv_test \
|
||||||
NOUVEAU_TESTS = \
|
|
||||||
prime_nv_api \
|
|
||||||
prime_nv_pcopy
|
prime_nv_pcopy
|
||||||
|
NOUVEAU_TESTS = \
|
||||||
|
prime_nv_api
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TESTS_progs_M = \
|
TESTS_progs_M = \
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "nouveau.h"
|
#include "nouveau.h"
|
||||||
#include "intel_gpu_tools.h"
|
#include "intel_gpu_tools.h"
|
||||||
#include "intel_batchbuffer.h"
|
#include "intel_batchbuffer.h"
|
||||||
|
#include "drmtest.h"
|
||||||
|
|
||||||
static int intel_fd = -1, nouveau_fd = -1;
|
static int intel_fd = -1, nouveau_fd = -1;
|
||||||
static drm_intel_bufmgr *bufmgr;
|
static drm_intel_bufmgr *bufmgr;
|
||||||
@ -1266,13 +1267,16 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
int ret, failed = 0, run = 0;
|
int ret, failed = 0, run = 0;
|
||||||
|
|
||||||
|
drmtest_subtest_init(argc, argv);
|
||||||
|
|
||||||
ret = find_and_open_devices();
|
ret = find_and_open_devices();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (nouveau_fd == -1 || intel_fd == -1) {
|
if (nouveau_fd == -1 || intel_fd == -1) {
|
||||||
fprintf(stderr,"failed to find intel and nouveau GPU\n");
|
fprintf(stderr,"failed to find intel and nouveau GPU\n");
|
||||||
return 77;
|
if (!drmtest_only_list_subtests())
|
||||||
|
return 77;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set up intel bufmgr */
|
/* set up intel bufmgr */
|
||||||
@ -1292,6 +1296,7 @@ int main(int argc, char **argv)
|
|||||||
batch = intel_batchbuffer_alloc(bufmgr, devid);
|
batch = intel_batchbuffer_alloc(bufmgr, devid);
|
||||||
|
|
||||||
#define xtest(x, args...) do { \
|
#define xtest(x, args...) do { \
|
||||||
|
if (!drmtest_run_subtest( #x )) break; \
|
||||||
ret = ((x)(args)); \
|
ret = ((x)(args)); \
|
||||||
++run; \
|
++run; \
|
||||||
if (ret) { \
|
if (ret) { \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user