~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to unittest/README.txt

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
Unit tests directory structure
 
3
------------------------------
 
4
 
 
5
This is the current structure of the unit tests.  More directories
 
6
will be added over time.
 
7
 
 
8
mytap                 Source for the MyTAP library
 
9
mysys                 Tests for mysys components
 
10
  base64-t.c          Unit test for base64 encoding functions
 
11
examples              Example unit tests.
 
12
  core-t.c            Example of raising a signal in the middle of the test
 
13
                      THIS TEST WILL STOP ALL FURTHER TESTING!
 
14
  simple-t.c          Example of a standard TAP unit test
 
15
  skip-t.c            Example where some test points are skipped
 
16
  skip_all-t.c        Example of a test where the entire test is skipped
 
17
  todo-t.c            Example where test contain test points that are TODO
 
18
  no_plan-t.c         Example of a test with no plan (avoid this)
 
19
 
 
20
 
 
21
Executing unit tests
 
22
--------------------
 
23
 
 
24
To make and execute all unit tests in the directory:
 
25
 
 
26
   make test
 
27
 
 
28
Observe that the tests in the examples/ directory are just various
 
29
examples of tests and are not expected to pass.
 
30
 
 
31
 
 
32
Adding unit tests
 
33
-----------------
 
34
 
 
35
Add a file with a name of the format "foo-t.c" to the appropriate
 
36
directory and add the following to the Makefile.am in that directory
 
37
(where ... denotes stuff already there):
 
38
 
 
39
  noinst_PROGRAMS = ... foo-t
 
40
 
 
41
Note, it's important to have "-t" at the end of the filename, otherwise the
 
42
test won't be executed by 'make test' !
 
43
 
 
44
 
 
45
Documentation
 
46
-------------
 
47
 
 
48
The generated documentation is temporarily placed at:
 
49
 
 
50
      http://www.kindahl.net/mytap/doc/
 
51
 
 
52
I will move it to a better place once I figure out where and how.