satisfy danvet's OC
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Tue, 14 Aug 2012 16:25:50 +0000 (18:25 +0200)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Tue, 14 Aug 2012 16:25:50 +0000 (18:25 +0200)
and add skip codes, but mostly satisfy danvet's OCD

tests/.gitignore
tests/Makefile.am
tests/prime_nv_api.c [moved from tests/prime_api.c with 99% similarity]
tests/prime_nv_pcopy.c [moved from tests/prime_pcopy.c with 99% similarity]
tests/prime_nv_test.c [moved from tests/prime_test.c with 99% similarity]

index 2eebd5b..1f51784 100644 (file)
@@ -69,10 +69,10 @@ gen3_render_tiledy_blits
 getclient
 getstats
 getversion
-prime_api
-prime_pcopy
+prime_nv_api
+prime_nv_pcopy
+prime_nv_test
 prime_self_import
-prime_test
 testdisplay
 sysfs_rc6_residency
 # Please keep sorted alphabetically
index 5ecd3ae..2978602 100644 (file)
@@ -70,9 +70,9 @@ TESTS_progs = \
        gem_ctx_bad_exec \
        gem_ctx_basic \
        gem_reg_read \
-       prime_api  \
-       prime_pcopy \
-       prime_test \
+       prime_nv_api  \
+       prime_nv_pcopy \
+       prime_nv_test \
        prime_self_import \
        $(NULL)
 
@@ -134,9 +134,9 @@ gem_wait_render_timeout_LDADD = $(LDADD) -lrt
 
 gem_ctx_basic_LDADD = $(LDADD) -lpthread
 
-prime_test_CFLAGS = $(AM_CFLAGS) $(DRM_NOUVEAU_CFLAGS)
-prime_test_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS)
-prime_api_CFLAGS = $(AM_CFLAGS) $(DRM_NOUVEAU_CFLAGS)
-prime_api_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS)
-prime_pcopy_CFLAGS = $(AM_CFLAGS) $(DRM_NOUVEAU_CFLAGS)
-prime_pcopy_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS)
+prime_nv_test_CFLAGS = $(AM_CFLAGS) $(DRM_NOUVEAU_CFLAGS)
+prime_nv_test_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS)
+prime_nv_api_CFLAGS = $(AM_CFLAGS) $(DRM_NOUVEAU_CFLAGS)
+prime_nv_api_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS)
+prime_nv_pcopy_CFLAGS = $(AM_CFLAGS) $(DRM_NOUVEAU_CFLAGS)
+prime_nv_pcopy_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS)
similarity index 99%
rename from tests/prime_api.c
rename to tests/prime_nv_api.c
index 385c8ab..7267e93 100644 (file)
@@ -319,7 +319,7 @@ int main(int argc, char **argv)
 
        if (nouveau_fd == -1 || intel_fd == -1 || nouveau_fd2 == -1 || intel_fd2 == -1) {
                fprintf(stderr,"failed to find intel and nouveau GPU\n");
-               return -1;
+               return 77;
        }
 
        /* set up intel bufmgr */
@@ -333,7 +333,7 @@ int main(int argc, char **argv)
        ret = nouveau_device_wrap(nouveau_fd, 0, &ndev);
        if (ret < 0) {
                fprintf(stderr,"failed to wrap nouveau device\n");
-               return -1;
+               return 77;
        }
 
        ret = nouveau_client_new(ndev, &nclient);
@@ -346,7 +346,7 @@ int main(int argc, char **argv)
        ret = nouveau_device_wrap(nouveau_fd2, 0, &ndev2);
        if (ret < 0) {
                fprintf(stderr,"failed to wrap nouveau device\n");
-               return -1;
+               return 77;
        }
 
        ret = nouveau_client_new(ndev2, &nclient2);
similarity index 99%
rename from tests/prime_pcopy.c
rename to tests/prime_nv_pcopy.c
index 83a66d2..650ea24 100644 (file)
@@ -1278,9 +1278,9 @@ int main(int argc, char **argv)
        if (ret < 0)
                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");
-               return -1;
+               return 77;
        }
 
        /* set up intel bufmgr */
@@ -1290,7 +1290,7 @@ int main(int argc, char **argv)
        /* set up nouveau bufmgr */
        ret = init_nouveau();
        if (ret < 0)
-               return ret;
+               return 77;
 
        /* set up an intel batch buffer */
        devid = intel_get_drm_devid(intel_fd);
similarity index 99%
rename from tests/prime_test.c
rename to tests/prime_nv_test.c
index 0e85796..2e48db5 100644 (file)
@@ -508,9 +508,9 @@ int main(int argc, char **argv)
        if (ret < 0)
                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");
-               return -1;
+               return 77;
        }
 
        /* set up intel bufmgr */
@@ -521,7 +521,7 @@ int main(int argc, char **argv)
        ret = nouveau_device_wrap(nouveau_fd, 0, &ndev);
        if (ret < 0) {
                fprintf(stderr,"failed to wrap nouveau device\n");
-               return -1;
+               return 77;
        }
 
        ret = nouveau_client_new(ndev, &nclient);