aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChristophe Milard <christophe.milard@linaro.org>2015-07-31 21:56:44 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-09-07 13:05:05 +0300
commitb509038bf26d661a01cf7bf6d0fd483a7935254b (patch)
tree2537e9fa3e6f530e453b0ac204e1c9e4de758a67 /test
parent3afd410eaa2e55f47b42508ac0b86390a7b4c711 (diff)
validation: update README files
Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test')
-rw-r--r--test/README8
-rw-r--r--test/validation/README50
2 files changed, 51 insertions, 7 deletions
diff --git a/test/README b/test/README
index 64bf03b0c..857c36627 100644
--- a/test/README
+++ b/test/README
@@ -6,8 +6,7 @@ SPDX-License-Identifier: BSD-3-Clause
Files in test/validation directory are intended to be terse checks that help
ensure that the ODP API Implementations all perform identically and to
specification. Tests inside the validation directory shall be platform
-independent. However, they may need platform dependent environment
-configuration.
+independent.
To run valgrind on the executables do:
$ ./bootstrap
@@ -15,8 +14,3 @@ $ ./configure --enable-test-vald --enable-valgrind
$ cd test/validation
$ make check-valgrind
-Some tests scripts, like pktio require ODP_PLATFORM variable to be exported to load
-platform specific env files. 'make check' defines that variable automatically,
-and package will put all required files at the same place as tests binaries. But if
-you run tests manually from odp source code then you need it to be defined, like:
-export ODP_PLATFROM=linux-generic.
diff --git a/test/validation/README b/test/validation/README
new file mode 100644
index 000000000..2d0c258a1
--- /dev/null
+++ b/test/validation/README
@@ -0,0 +1,50 @@
+Copyright (c) 2015, Linaro Limited
+All rights reserved.
+
+SPDX-License-Identifier: BSD-3-Clause
+
+
+To add tests in here, please observe the following rules:
+
+1. Tests should be placed in the directory of the module they belong to.
+
+
+2. Test under test/validation/... should be platform agnostic, i.e.
+ -they should be written in plain C only
+ -they may only used Clib functions, C_UNIT functions and of course ODP
+ functions.
+ -they should be expected to pass on all ODP implementation
+
+ Tests that do not follow these rules should be placed in the platform
+ specific test area (currently platform/<platform>/test*)
+
+
+3. If a new ODP API module is created, please update the Makefile.am and
+ the odptest.h file
+
+
+4. Respect the following name convention for the names exported in the library:
+
+ * Tests, i.e. functions which are used in CUNIT test suites are named:
+ *<Module>_test_*
+
+ * Test arrays, i.e. arrays of CU_TestInfo, listing the test functions
+ belonging to a suite, are called:
+ <Module>_suite[_*]
+ where the possible suffix can be used if many suites are declared.
+
+ * CUNIT suite init and termination functions are called:
+ <Module>_suite[_*]_init() and <Module>_suite[_*]_term()
+ respectively.
+
+ * Suite arrays, i.e. arrays of CU_SuiteInfo used in executables are called:
+ <Module>_suites[_*]
+ where the possible suffix identifies the executable using it, if many.
+
+ * Main executable function(s), are called:
+ <Module>_main[_*]*
+ where the possible suffix identifies the executable using it
+
+ * Init/term function for the whole executable are called:
+ <Module>_init
+ <Module>_term