add test support routines and reporting
This commit was SVN r2077.
Этот коммит содержится в:
родитель
dbcc99365e
Коммит
fa8e8887a2
@ -4,8 +4,8 @@
|
||||
#
|
||||
|
||||
include $(top_srcdir)/config/Makefile.options
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/test/support \
|
||||
-DLAM_PREFIX="\"$(prefix)\"" \
|
||||
-DLAM_BINDIR="\"$(bindir)\"" \
|
||||
-DLAM_LIBDIR="\"$(libdir)\"" \
|
||||
@ -24,6 +24,7 @@ openmpi_SOURCES = \
|
||||
|
||||
openmpi_LDADD = \
|
||||
$(top_builddir)/src/mca/pcm/base/pcm_base_open.lo \
|
||||
$(top_builddir)/test/support/libsupport.la \
|
||||
$(top_builddir)/src/libmpi.la
|
||||
|
||||
openmpi_DFLAGS = $(LIBMPI_EXTRA_LDFLAGS) $(LIBLAM_EXTRA_LDFLAGS)
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "support.h"
|
||||
#include "include/constants.h"
|
||||
#include "util/sys_info.h"
|
||||
#include "util/os_path.h"
|
||||
@ -26,50 +27,55 @@ static bool test6(void); /* no prefix given, nothing set, one good and one bad
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
bool test1f, test2f, test3f, test4f, test5f, test6f;
|
||||
|
||||
test1f = test2f = test3f = test4f = test5f = test6f = false;
|
||||
ompi_sys_info(); /* initialize system */
|
||||
|
||||
/* All done */
|
||||
/* Perform overall test initialization */
|
||||
test_init("ompi_bitmap_t");
|
||||
|
||||
if (test1()) {
|
||||
printf("test1 passed\n");
|
||||
test1f = true;
|
||||
test_success();
|
||||
}
|
||||
else {
|
||||
test_failure("ompi_session_dir_t test1 failed");
|
||||
}
|
||||
|
||||
if (test2()) {
|
||||
printf("test2 passed\n");
|
||||
test2f = true;
|
||||
test_success();
|
||||
}
|
||||
else {
|
||||
test_failure("ompi_session_dir_t test2 failed");
|
||||
}
|
||||
|
||||
if (test3()) {
|
||||
printf("test3 passed\n");
|
||||
test3f = true;
|
||||
test_success();
|
||||
}
|
||||
else {
|
||||
test_failure("ompi_session_dir_t test3 failed");
|
||||
}
|
||||
|
||||
if (test4()) {
|
||||
printf("test4 passed\n");
|
||||
test4f = true;
|
||||
test_success();
|
||||
}
|
||||
else {
|
||||
test_failure("ompi_session_dir_t test4 failed");
|
||||
}
|
||||
|
||||
if (test5()) {
|
||||
printf("test5 passed\n");
|
||||
test5f = true;
|
||||
test_success();
|
||||
}
|
||||
else {
|
||||
test_failure("ompi_session_dir_t test5 failed");
|
||||
}
|
||||
|
||||
if (test6()) {
|
||||
printf("test6 passed\n");
|
||||
test6f = true;
|
||||
test_success();
|
||||
}
|
||||
else {
|
||||
test_failure("ompi_session_dir_t test6 failed");
|
||||
}
|
||||
|
||||
if (test1f && test2f && test3f && test4f && test5f && test6f) {
|
||||
printf("test succeeded\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
printf("test failed\n");
|
||||
return -1;
|
||||
test_finalize();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user