From b9e1f3848314030556891c4a1934af6172c52396 Mon Sep 17 00:00:00 2001 From: Laura Casswell Date: Mon, 9 Aug 2004 21:47:27 +0000 Subject: [PATCH] add test support calls and reporting This commit was SVN r1987. --- test/util/ompi_sys_info.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/test/util/ompi_sys_info.c b/test/util/ompi_sys_info.c index c6051670d9..479cfa7f0b 100644 --- a/test/util/ompi_sys_info.c +++ b/test/util/ompi_sys_info.c @@ -9,6 +9,7 @@ #include "ompi_config.h" #include "util/sys_info.h" +#include "support.h" static bool test1(void); /* verify it returns info */ static bool test2(void); /* test second time through */ @@ -16,29 +17,25 @@ static bool test2(void); /* test second time through */ int main(int argc, char* argv[]) { - bool test1f, test2f; - test1f = test2f = false; - - /* All done */ + test_init("ompi_sys_info_t"); if (test1()) { - printf("test1 passed\n"); - test1f = true; + test_success(); + } + else { + test_failure("ompi_sys_info_t test1 failed"); } if (test2()) { - printf("test2 passed\n"); - test2f = true; + test_success(); + } + else { + test_failure("ompi_sys_info_t test2 failed"); } - if (test1f && test2f) { - printf("test succeeded\n"); - return 0; - } - - printf("test failed\n"); - return -1; + test_finalize(); + return 0; }