From: Luo Xionghu <[email protected]>

Signed-off-by: Luo Xionghu <[email protected]>
---
 docs/Beignet.mdwn                       |  1 +
 docs/howto/stand-alone-utest-howto.mdwn | 51 +++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 docs/howto/stand-alone-utest-howto.mdwn

diff --git a/docs/Beignet.mdwn b/docs/Beignet.mdwn
index 363add0..0a6a4cf 100644
--- a/docs/Beignet.mdwn
+++ b/docs/Beignet.mdwn
@@ -307,6 +307,7 @@ Documents for OpenCL application developers
 - [[Libva Buffer Sharing|Beignet/howto/libva-buffer-sharing-howto]]
 - [[V4l2 Buffer Sharing|Beignet/howto/v4l2-buffer-sharing-howto]]
 - [[Video Motion Estimation|Beignet/howto/video-motion-estimation-howto]]
+- [[Stand Alone Unit Test|Beignet/howto/stand-alone-utest-howto]]
 
 The wiki URL is as below:
 
[http://www.freedesktop.org/wiki/Software/Beignet/](http://www.freedesktop.org/wiki/Software/Beignet/)
diff --git a/docs/howto/stand-alone-utest-howto.mdwn 
b/docs/howto/stand-alone-utest-howto.mdwn
new file mode 100644
index 0000000..9532940
--- /dev/null
+++ b/docs/howto/stand-alone-utest-howto.mdwn
@@ -0,0 +1,51 @@
+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`
+
+will run all the unit tests one after the others
+
+`> ./utest_run some_unit_test0 some_unit_test1`
+
+will only run `some_unit_test0` and `some_unit_test1` tests
+
+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.
-- 
2.1.4

_______________________________________________
Beignet mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to