add test support calls and reporting
This commit was SVN r1987.
Этот коммит содержится в:
родитель
e09987b940
Коммит
b9e1f38483
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include "ompi_config.h"
|
#include "ompi_config.h"
|
||||||
#include "util/sys_info.h"
|
#include "util/sys_info.h"
|
||||||
|
#include "support.h"
|
||||||
|
|
||||||
static bool test1(void); /* verify it returns info */
|
static bool test1(void); /* verify it returns info */
|
||||||
static bool test2(void); /* test second time through */
|
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[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
bool test1f, test2f;
|
|
||||||
|
|
||||||
test1f = test2f = false;
|
test_init("ompi_sys_info_t");
|
||||||
|
|
||||||
/* All done */
|
|
||||||
|
|
||||||
if (test1()) {
|
if (test1()) {
|
||||||
printf("test1 passed\n");
|
test_success();
|
||||||
test1f = true;
|
}
|
||||||
|
else {
|
||||||
|
test_failure("ompi_sys_info_t test1 failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (test2()) {
|
if (test2()) {
|
||||||
printf("test2 passed\n");
|
test_success();
|
||||||
test2f = true;
|
}
|
||||||
|
else {
|
||||||
|
test_failure("ompi_sys_info_t test2 failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (test1f && test2f) {
|
test_finalize();
|
||||||
printf("test succeeded\n");
|
return 0;
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("test failed\n");
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user