diff options
| author | Henrik Rydberg <rydberg@euromail.se> | 2011-03-15 12:47:54 +0100 |
|---|---|---|
| committer | Henrik Rydberg <rydberg@euromail.se> | 2011-04-04 19:46:29 +0200 |
| commit | d55a299efd74431e98c8a4f24cffd07c95d419d6 (patch) | |
| tree | 2dd5a3d3459308081a0da0fb0d01736fa3c700c7 /test/check-grail.c | |
| parent | 30800843fd45fd582d16b0a39f57e6d8a98e79bc (diff) | |
Introduce check test framework
Add the check test framework, and add a simple test to check
point to point mappings.
The tests use the device files as input.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'test/check-grail.c')
| -rw-r--r-- | test/check-grail.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/check-grail.c b/test/check-grail.c new file mode 100644 index 0000000..f3da133 --- /dev/null +++ b/test/check-grail.c | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #include <check.h> | ||
| 2 | |||
| 3 | #define LOGFILE_PREFIX "" | ||
| 4 | |||
| 5 | extern Suite *make_mapping_suite(); | ||
| 6 | |||
| 7 | int main(int argc CK_ATTRIBUTE_UNUSED, char* argv[] CK_ATTRIBUTE_UNUSED) | ||
| 8 | { | ||
| 9 | Suite *s = suite_create("grail-test-suite"); | ||
| 10 | SRunner *sr = srunner_create(s); | ||
| 11 | int num_failed; | ||
| 12 | |||
| 13 | srunner_add_suite(sr, make_mapping_suite()); | ||
| 14 | |||
| 15 | srunner_set_log(sr, "check_grail.log"); | ||
| 16 | srunner_set_xml(sr, "check_grail.xml"); | ||
| 17 | srunner_run_all(sr, CK_NORMAL); | ||
| 18 | num_failed = srunner_ntests_failed(sr); | ||
| 19 | |||
| 20 | srunner_free(sr); | ||
| 21 | |||
| 22 | return num_failed; | ||
| 23 | } | ||
