diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2015-01-09 08:16:26 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2015-01-09 08:16:26 +0800 |
commit | 98643e04266702e03b86d4d11f8f688b865c0853 (patch) | |
tree | a3b36d84ec536385e894a82d4b3290bc787de437 /utests/runtime_climage_from_boname.cpp | |
parent | 4277b49776c92342f8cebf7d5ce2d3ea23d0d3ce (diff) | |
download | beignet-98643e04266702e03b86d4d11f8f688b865c0853.tar.gz |
utests: skip one test when it fail to open XDisplay.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Diffstat (limited to 'utests/runtime_climage_from_boname.cpp')
-rw-r--r-- | utests/runtime_climage_from_boname.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/utests/runtime_climage_from_boname.cpp b/utests/runtime_climage_from_boname.cpp index 30bbdbd3..4e7f06a6 100644 --- a/utests/runtime_climage_from_boname.cpp +++ b/utests/runtime_climage_from_boname.cpp @@ -116,6 +116,10 @@ void runtime_climage_from_boname(void) drmGetMagic(fd, &magic); Display* dpy = XOpenDisplay(NULL); + if (dpy == NULL) { + fprintf(stderr, " Can't open Display, skipping.\n"); + return; + } XID root = RootWindow(dpy, DefaultScreen(dpy)); Bool auth = VA_DRI2Authenticate(dpy, root, magic); |