1
1

add test support routines and reporting

This commit was SVN r2077.
Этот коммит содержится в:
Laura Casswell 2004-08-11 22:15:02 +00:00
родитель dbcc99365e
Коммит fa8e8887a2
2 изменённых файлов: 31 добавлений и 24 удалений

Просмотреть файл

@ -4,8 +4,8 @@
# #
include $(top_srcdir)/config/Makefile.options include $(top_srcdir)/config/Makefile.options
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-I$(top_srcdir)/test/support \
-DLAM_PREFIX="\"$(prefix)\"" \ -DLAM_PREFIX="\"$(prefix)\"" \
-DLAM_BINDIR="\"$(bindir)\"" \ -DLAM_BINDIR="\"$(bindir)\"" \
-DLAM_LIBDIR="\"$(libdir)\"" \ -DLAM_LIBDIR="\"$(libdir)\"" \
@ -24,6 +24,7 @@ openmpi_SOURCES = \
openmpi_LDADD = \ openmpi_LDADD = \
$(top_builddir)/src/mca/pcm/base/pcm_base_open.lo \ $(top_builddir)/src/mca/pcm/base/pcm_base_open.lo \
$(top_builddir)/test/support/libsupport.la \
$(top_builddir)/src/libmpi.la $(top_builddir)/src/libmpi.la
openmpi_DFLAGS = $(LIBMPI_EXTRA_LDFLAGS) $(LIBLAM_EXTRA_LDFLAGS) openmpi_DFLAGS = $(LIBMPI_EXTRA_LDFLAGS) $(LIBLAM_EXTRA_LDFLAGS)

Просмотреть файл

@ -11,6 +11,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include "ompi_config.h" #include "ompi_config.h"
#include "support.h"
#include "include/constants.h" #include "include/constants.h"
#include "util/sys_info.h" #include "util/sys_info.h"
#include "util/os_path.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[]) 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 */ ompi_sys_info(); /* initialize system */
/* All done */ /* Perform overall test initialization */
test_init("ompi_bitmap_t");
if (test1()) { if (test1()) {
printf("test1 passed\n"); test_success();
test1f = true; }
else {
test_failure("ompi_session_dir_t test1 failed");
} }
if (test2()) { if (test2()) {
printf("test2 passed\n"); test_success();
test2f = true; }
else {
test_failure("ompi_session_dir_t test2 failed");
} }
if (test3()) { if (test3()) {
printf("test3 passed\n"); test_success();
test3f = true; }
else {
test_failure("ompi_session_dir_t test3 failed");
} }
if (test4()) { if (test4()) {
printf("test4 passed\n"); test_success();
test4f = true; }
else {
test_failure("ompi_session_dir_t test4 failed");
} }
if (test5()) { if (test5()) {
printf("test5 passed\n"); test_success();
test5f = true; }
else {
test_failure("ompi_session_dir_t test5 failed");
} }
if (test6()) { if (test6()) {
printf("test6 passed\n"); test_success();
test6f = true; }
else {
test_failure("ompi_session_dir_t test6 failed");
} }
if (test1f && test2f && test3f && test4f && test5f && test6f) { test_finalize();
printf("test succeeded\n"); return 0;
return 0;
}
printf("test failed\n");
return -1;
} }