+static const struct option options[] = {
+ { "verbose", no_argument, 0, 'v' },
+ { "fail-first", no_argument, 0, 'F' },
+ { "help", no_argument, 0, 'h' },
+ { "version", no_argument, 0, 'V' },
+};
+
+/* display usage message and terminate */
+static void help(void) {
+ xprintf("Usage:\n"
+ " %s [OPTIONS]\n"
+ "Options:\n"
+ " --help, -h Display usage message\n"
+ " --version, -V Display version number\n"
+ " --verbose, -v Verbose output\n"
+ " --fail-first, -F Stop on first failure\n",
+ progname);
+ xfclose(stdout);
+ exit(0);
+}
+
+void test_init(int argc, char **argv) {
+ int n;
+
+ set_progname(argv);