From 93493d2a97921cbbde5f26ea097eeebcf8307dba Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 27 Oct 1998 12:05:37 -0500 Subject: [svn-r806] Set it to exit with non-zero code when errors encountered or when test table overflows. Tested Platform: Irix 6.2 --- test/testhdf5.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/testhdf5.c b/test/testhdf5.c index 612a4ac..85b22a2 100644 --- a/test/testhdf5.c +++ b/test/testhdf5.c @@ -52,7 +52,7 @@ static char RcsId[] = "@(#)$Revision$"; static int Index = 0; /* Global variables */ -int num_errs; +int num_errs = 0; int Verbosity; /* ANY new test needs to have a prototype in tproto.h */ @@ -75,7 +75,7 @@ InitTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), co { if (Index >= MAXNUMOFTESTS) { print_func("Uh-oh, too many tests added, increase MAXNUMOFTEST!\n"); - exit(0); + exit(-1); } /* end if */ HDstrcpy(Test[Index].Description, TheDescr); HDstrcpy(Test[Index].Name, TheName); @@ -294,6 +294,5 @@ main(int argc, char *argv[]) if (!Test[Loop].SkipFlag && Test[Loop].Cleanup!=NULL) (*Test[Loop].Cleanup) (); } - exit(0); - return (0); + return (num_errs); } /* end main() */ -- cgit v0.12