diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2015-09-16 22:27:49 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2015-09-16 22:27:49 (GMT) |
commit | ee7612be44b3797a903e21433558a52331515ce1 (patch) | |
tree | cce28a3a6e169f1668ad1a0356e907f0dddbfde6 /test/testframe.c | |
parent | 222e7186ea78e49b387284cbb9997677c933c368 (diff) | |
download | hdf5-ee7612be44b3797a903e21433558a52331515ce1.zip hdf5-ee7612be44b3797a903e21433558a52331515ce1.tar.gz hdf5-ee7612be44b3797a903e21433558a52331515ce1.tar.bz2 |
[svn-r27811] Description:
Refactor property list code to "deep copy" properties in the correct way,
retraining the rest of the library to copy & release things correctly. This
cleans up another batch of memory leaks, etc. within the library.
Tested on:
MacOSX/64 10.10.5 (amazon) w/serial & parallel
Linux/32 2.6.x (jam) w/serial & parallel
(h5committest forthcoming)
Diffstat (limited to 'test/testframe.c')
-rw-r--r-- | test/testframe.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/test/testframe.c b/test/testframe.c index 2dd181b..daa27c5 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -213,6 +213,7 @@ void TestInfo(const char *ProgName) */ void TestParseCmdLine(int argc, char *argv[]) { + hbool_t skipped_all = FALSE; int ret_code; while (argv++, --argc > 0){ @@ -248,14 +249,20 @@ void TestParseCmdLine(int argc, char *argv[]) } else if (((HDstrcmp(*argv, "-only") == 0) || (HDstrcmp(*argv, "-o") == 0))) { - if (argc > 0){ + if(argc > 0) { int Loop; + --argc; ++argv; + /* Skip all tests, then activate only one. */ - for (Loop = 0; Loop < Index; Loop++) - Test[Loop].SkipFlag = 1; + if(!skipped_all) { + for(Loop = 0; Loop < Index; Loop++) + Test[Loop].SkipFlag = 1; + skipped_all = TRUE; + } /* end if */ SetTest(*argv, ONLYTEST); - }else{ + } /* end if */ + else { TestUsage(); exit(EXIT_FAILURE); } @@ -548,6 +555,7 @@ TestErrPrintf(const char *format, ...) void SetTest(const char *testname, int action) { int Loop; + switch (action){ case SKIPTEST: for (Loop = 0; Loop < Index; Loop++) @@ -569,17 +577,12 @@ void SetTest(const char *testname, int action) break; case ONLYTEST: for (Loop = 0; Loop < Index; Loop++) { - if (HDstrcmp(testname, Test[Loop].Name) != 0) - Test[Loop].SkipFlag = 1; - else { + if (HDstrcmp(testname, Test[Loop].Name) == 0) { /* Found it. Set it to run. Break to skip the rest. */ Test[Loop].SkipFlag = 0; break; } } - /* skip the rest */ - while (++Loop < Index) - Test[Loop].SkipFlag = 1; break; default: /* error */ |