summaryrefslogtreecommitdiffstats
path: root/test/README
blob: f950199a80ccf07c6220b7d56e392f2f9703f11e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
This test script uses shunit2 :
http://code.google.com/p/shunit2/

uci-static binary is used during tests.


How to add a test
=================

* Test files are located in './test/tests.d'

* These files contain shell functions beginning with 'test' :
"
test_get_option ()
{
...
}
...
"

* shunit2 functions can be used in these functions :
http://shunit2.googlecode.com/svn/trunk/source/2.1/doc/shunit2.html

* Additional environment variables are available :
	- ${CONFIG_DIR} : uci search path for config files. This directory is
	  reset after each test.
	- ${CHANGES_DIR} : uci search path for config change files. This directory is
	  reset after each test.
	- ${TMP_DIR} : path to a directory where can be stored temporary files
	  during tests. This directory is reset after each test.
	- ${UCI} : uci static binary called with above config and changes
	  directories as parameters.
	- ${REF_DIR} : path to a directory where can be stored reference files
	  or data.