utests: only check -dump-spir-binary on beignet implementation

Submitted by Guo Yejun on July 27, 2016, 11:05 p.m.

Details

Message ID 1469660739-3089-1-git-send-email-yejun.guo@intel.com
State New
Headers show
Series "utests: only check -dump-spir-binary on beignet implementation" ( rev: 1 ) in Beignet

Not browsing as part of any series.

Commit Message

Guo Yejun July 27, 2016, 11:05 p.m.
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
---
 utests/get_cl_info.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/utests/get_cl_info.cpp b/utests/get_cl_info.cpp
index bdd7e0c..bd557c3 100644
--- a/utests/get_cl_info.cpp
+++ b/utests/get_cl_info.cpp
@@ -465,12 +465,14 @@  void compile_spir_binary(void)
     }
 
     //Test is successful if the backend created the file
-    if( (fp = fopen(spir_file, "r")) == NULL) {
+    if (cl_check_beignet()) {
+      if( (fp = fopen(spir_file, "r")) == NULL) {
         std::cout << "SPIR file creation.. FAILED";
         OCL_ASSERT(0);
-    } else {
+      } else {
         fclose(fp);
         std::cout << "SPIR file created.. SUCCESS";
+      }
     }
 }
 MAKE_UTEST_FROM_FUNCTION(compile_spir_binary);