Skip to content

Commit a7c9434

Browse files
committed
Switch to gengetopt generated command line parser
Replaces the getopt based command line parser code with auto generated code from GNU gengetopt. The getopt based command line parser was limited to single character options and would have required to switch to getopt_long in the future. Also the usage message was not up to date with the parser code.
1 parent f8dd4a7 commit a7c9434

File tree

3 files changed

+229
-314
lines changed

3 files changed

+229
-314
lines changed

Makefile.am

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
bin_PROGRAMS = mpi_test_suite
44

5+
cmdline.c cmdline.h: cmdline.ggo
6+
gengetopt < $<
7+
58
mpi_test_suite_SOURCES = \
9+
cmdline.c \
10+
cmdline.h \
611
coll/tst_coll_allgather.c \
712
coll/tst_coll_allgather_in_place.c \
813
coll/tst_coll_allreduce.c \

cmdline.ggo

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
args "--default-optional"
2+
3+
option "test" t "tests or test-classes" string default="all"
4+
option "comm" c "communicators or commicator-classes" string default="all"
5+
option "datatype" d "datatypes of datatype-classes" string default="all"
6+
option "num-values" n "number of values to communicate in tests" string default="1000"
7+
text "\n"
8+
text "All multiple test-/comm-/datatype-names and num-values must be comma-separated. \
9+
Names are not case-sensitive, due to spaces in names, propper quoting should be used. \
10+
The special name 'all' can be used to select all tests/comms/datatypes. To exclude a \
11+
test/comm/datatype prefix it with '^' but be aware, that the selection will happen \
12+
in order, so use 'all,^exclude'."
13+
text "\n"
14+
option "atomic-io" a "enable atomicity for files in I/O for all tests that support it"
15+
option "num-threads" j "number of additional threads to execute the tests" int default="0"
16+
option "report" r "level of detail for test report" values="summary","run","full" default="summary"
17+
option "execution-mode" x "level of correctness testing" values="disabled","strict","relaxed" default="relaxed"
18+
19+
option "verbose" v "enable verbose output for debugging purpose"
20+
option "list" l "list all available tests, communicators, datatypes and corresponding classes"

0 commit comments

Comments
 (0)