|author||Anand Avati <firstname.lastname@example.org>||2012-10-17 15:51:18 -0700|
|committer||Anand Avati <email@example.com>||2012-10-18 14:17:25 -0700|
tests: pre-commit regression tests
Framework for writing test cases to be submitted with patches. This framework and the test cases get exercised by Jenkins in the pre-commit regression test. Jenkins is configured to give a +1 verified vote only if the regression test passes without failures (which includes test cases added/changed by the patch being tested) Every patch should include a test case (either extensions/changes to existing test cases or add new ones, as appropriate). The test case should be part of the same commit so that both code and test case get reviewed together. Test cases added are cumulative. Every new patch gets tested against its own test case and every test case previously added. A lot of new commits in the near future will be pure test cases (with no code change) which will get added in "catch up" mode. The tool used for implementing test cases is 'prove', and the framework itself is modeled similar to the POSIX compliance filesystem test suite. Under the top level directory, a new directory named 'tests/' is added. This contains top level classifier directories and framework files/scripts. Functionality tests should be created under a classifier directory below 'tests/'. For e.g: tests/basic/mount.t tests/performance/write-behind.t Bugs which get fixed should include a test case script named by the bug id, so that we are guaranteed any new change will not bring the issue back. For e.g: tests/bugs/bug-123456.t Triggering of regression tests in Jenkins is manual at this point as we do not want the entire test suite to run against every revision of a patch while it is still in the review/resubmit cycle. Signed-off-by: Anand Avati <firstname.lastname@example.org> Change-Id: I8078244619135ccaba38e068925f8ca85141055a BUG: 764966 Signed-off-by: Anand Avati <email@example.com> Reviewed-on: http://review.gluster.org/4101 Tested-by: Gluster Build System <firstname.lastname@example.org>
Diffstat (limited to 'tests/README')
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/README b/tests/README
new file mode 100644
@@ -0,0 +1,20 @@
+How to use use
+- Build and install the version of glusterfs with your changes. Make
+ sure the installed version is accessible from $PATH.
+- (optional) Set environment variables to specify location of
+ export directories and mount points. Unless you have special
+ requirements, the defaults should just work. The variables
+ themselves can be found at the top of tests/include.rc. All
+ of them can be overriden with environment variables.
+- Execute run-tests.sh in the top level directory as root.
+- If some test cases fail, you can execute the failed test case script
+ directly bypassing run-tests.sh. At this time it might be
+ useful to set the envrionment variable DEBUG=1 before running
+ the individual test script directly by hand.
+- BE WARNED THAT THE TEST CASES DELETE /var/lib/glusterd/* !!!