Skip to content

Commit

Permalink
units: an alternative script for test.units target of testing.mak
Browse files Browse the repository at this point in the history
test.units target is too complex.
The test cases are run sequentially. So I rewrite it as a shell script.

Some features not in the test.units are implemented.

1. It can run tests under timeout command.
   Under timeout command all test cases classed to .i(entering infinite
   loop) are run.

2. It can run tests under valgrind.
   all test cases classed to .v are run but the results are ignored.

3. It checks exit status of each running of test cases.
   If the status is not 0, the test is treated as "FAILED".
   If expected.tags file is not prepared in a test, units command checks
   only the exit status.

4. It deals a sub-directory as a category.
   It is proposed by @ffes in #88.
   A directory ended with .r is recognized as a category.
   This feature isn't tested yet.

5. It reports "FIXED".

   If a .b class test(known bug) is passed, it is reported as FIXED.
   If a .i class test(infinite loop) is passed with --with-timeout option,
   it is reported as FIXED.

You can run units with

    $ make -f testing.mak units

UNIT_LANGUAGE and UNIT macros can be used like

    $ make -f testing.mak units UNIT_LANGUAGE=C UNIT=local.c

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
  • Loading branch information
masatake committed Nov 9, 2014
1 parent 41392ff commit 2b81e1e
Show file tree
Hide file tree
Showing 3 changed files with 599 additions and 3 deletions.
2 changes: 0 additions & 2 deletions Units/ada-function.i/expected.tags

This file was deleted.

Loading

0 comments on commit 2b81e1e

Please sign in to comment.