summaryrefslogtreecommitdiff
path: root/utests/get_cl_info.cpp
diff options
context:
space:
mode:
authorGuo Yejun <yejun.guo@intel.com>2016-08-03 03:12:51 +0800
committerYang Rong <rong.r.yang@intel.com>2016-08-03 18:23:56 +0800
commit44f130d75c030788ea6f60948f5dfc6e1632672d (patch)
treecf743363233f85de6b7dda1d807615c2e8f8ce4c /utests/get_cl_info.cpp
parent218221cc58955612214e134df1bc88d8c3f0831a (diff)
downloadbeignet-44f130d75c030788ea6f60948f5dfc6e1632672d.tar.gz
only check beignet special test cases on beignet
with other implementation, do not check the result for the beignet special test cases Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'utests/get_cl_info.cpp')
-rw-r--r--utests/get_cl_info.cpp85
1 files changed, 47 insertions, 38 deletions
diff --git a/utests/get_cl_info.cpp b/utests/get_cl_info.cpp
index 801d0c29..42edf1a6 100644
--- a/utests/get_cl_info.cpp
+++ b/utests/get_cl_info.cpp
@@ -413,13 +413,15 @@ void get_build_llvm_info(void)
}
}
- //Test is successful if the backend created the file
- if( (fp = fopen(llvm_file, "r")) == NULL) {
- std::cout << "LLVM file creation.. FAILED";
- OCL_ASSERT(0);
- } else {
- fclose(fp);
- std::cout << "LLVM file created.. SUCCESS";
+ if (cl_check_beignet()) {
+ //Test is successful if the backend created the file
+ if( (fp = fopen(llvm_file, "r")) == NULL) {
+ std::cout << "LLVM file creation.. FAILED";
+ OCL_ASSERT(0);
+ } else {
+ fclose(fp);
+ std::cout << "LLVM file created.. SUCCESS";
+ }
}
}
@@ -466,8 +468,8 @@ void compile_spir_binary(void)
}
}
- //Test is successful if the backend created the file
if (cl_check_beignet()) {
+ //Test is successful if the backend created the file
if( (fp = fopen(spir_file, "r")) == NULL) {
std::cout << "SPIR file creation.. FAILED";
OCL_ASSERT(0);
@@ -517,13 +519,15 @@ void build_spir_binary(void)
}
}
- //Test is successful if the backend created the file
- if( (fp = fopen(spir_file, "r")) == NULL) {
- std::cout << "SPIR file creation.. FAILED";
- OCL_ASSERT(0);
- } else {
- fclose(fp);
- std::cout << "SPIR file created.. SUCCESS";
+ if (cl_check_beignet()) {
+ //Test is successful if the backend created the file
+ if( (fp = fopen(spir_file, "r")) == NULL) {
+ std::cout << "SPIR file creation.. FAILED";
+ OCL_ASSERT(0);
+ } else {
+ fclose(fp);
+ std::cout << "SPIR file created.. SUCCESS";
+ }
}
}
MAKE_UTEST_FROM_FUNCTION(build_spir_binary);
@@ -567,13 +571,15 @@ void get_build_asm_info(void)
}
}
- //Test is successful if the backend created the file
- if( (fp = fopen(asm_file, "r")) == NULL) {
- std::cout << "ASM file creation.. FAILED";
- OCL_ASSERT(0);
- } else {
- fclose(fp);
- std::cout << "ASM file created.. SUCCESS";
+ if (cl_check_beignet()) {
+ //Test is successful if the backend created the file
+ if( (fp = fopen(asm_file, "r")) == NULL) {
+ std::cout << "ASM file creation.. FAILED";
+ OCL_ASSERT(0);
+ } else {
+ fclose(fp);
+ std::cout << "ASM file created.. SUCCESS";
+ }
}
}
@@ -614,15 +620,16 @@ void get_compile_llvm_info(void)
}
}
- //Test is successful if the backend created the file
- if( (fp = fopen(llvm_file, "r")) == NULL) {
- std::cout << "LLVM file creation.. FAILED";
- OCL_ASSERT(0);
- } else {
- fclose(fp);
- std::cout << "LLVM file created.. SUCCESS";
+ if (cl_check_beignet()) {
+ //Test is successful if the backend created the file
+ if( (fp = fopen(llvm_file, "r")) == NULL) {
+ std::cout << "LLVM file creation.. FAILED";
+ OCL_ASSERT(0);
+ } else {
+ fclose(fp);
+ std::cout << "LLVM file created.. SUCCESS";
+ }
}
-
}
MAKE_UTEST_FROM_FUNCTION(get_compile_llvm_info);
@@ -662,14 +669,16 @@ void get_link_asm_info(void)
}
}
- //Test is successful if the backend created the file
- if( (fp = fopen(asm_file, "r")) == NULL) {
- std::cout << "ASM file creation.. FAILED";
- OCL_ASSERT(0);
- } else {
- fclose(fp);
- std::cout << "ASM file created.. SUCCESS";
- }
+ if (cl_check_beignet()) {
+ //Test is successful if the backend created the file
+ if( (fp = fopen(asm_file, "r")) == NULL) {
+ std::cout << "ASM file creation.. FAILED";
+ OCL_ASSERT(0);
+ } else {
+ fclose(fp);
+ std::cout << "ASM file created.. SUCCESS";
+ }
+ }
}
MAKE_UTEST_FROM_FUNCTION(get_link_asm_info);