summaryrefslogtreecommitdiff
path: root/docs/howto
diff options
context:
space:
mode:
authorLuo Xionghu <xionghu.luo@intel.com>2016-05-06 00:11:28 +0800
committerYang Rong <rong.r.yang@intel.com>2016-05-23 17:41:47 +0800
commit52d8e6c1cf306af51d46b1151331f2263af6395a (patch)
tree4503931b44aac091ad8791b4813d57dc912e113d /docs/howto
parentbd8524f197a2faf0586d9abe97d42ea5a07cc62a (diff)
add howto for stand alone utest.
Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'docs/howto')
-rw-r--r--docs/howto/stand-alone-utest-howto.mdwn45
1 files changed, 45 insertions, 0 deletions
diff --git a/docs/howto/stand-alone-utest-howto.mdwn b/docs/howto/stand-alone-utest-howto.mdwn
new file mode 100644
index 00000000..bca23d30
--- /dev/null
+++ b/docs/howto/stand-alone-utest-howto.mdwn
@@ -0,0 +1,45 @@
+Stand Alone Unit Test HowTo
+====================
+
+Beignet provides an independent unit test suite covered most OpenCL language feautures,
+including more than 800 cases which could run in a few minutes, it should be useful for
+testing and comparing different OpenCL implementations.
+
+Prerequisite
+------------
+
+OpenCL ICD. Please check your OpenCL ICD existance by command
+`pkg-config --libs OpenCL`.
+
+Build Stand Alone Unit Test
+-----------------------------------
+The project uses CMake with three profiles:
+
+1. Debug (-g)
+2. RelWithDebInfo (-g with optimizations)
+3. Release (only optimizations)
+
+Basically, from the root directory of the project
+
+`> cd utest`
+
+`> cmake . # to configure`
+
+`> make`
+
+Once built, the 'utest_run' is generated in currenty directory.
+
+How to run
+----------
+
+You need to call setenv.sh in the utests/ directory to set some environment variables
+firstly as below:
+
+`> . setenv.sh`
+
+Then in `utests/`:
+
+`> ./utest_run`
+
+if the utest_run fail to run, please check /etc/vendors/OpenCL to confirm it calls the expected
+OpenCL driver, or export LD_LIBRARAY_PATH to establish the correct link.