+
+ /*
+ * Command line option parsing commences now We only need to support
+ * a few things in the test suite.
+ */
+ while (argc > 1) {
+ ++argv;
+ --argc;
+
+ if (argv[0][0] == '-') {
+ if (parsecmd("redirout", &argc, &argv, &redirout, 1, false))
+ continue;
+ if (parsecmd("redirerr", &argc, &argv, &redirerr, 1, false))
+ continue;
+
+ con_change(redirout, redirerr);
+
+ if (!strcmp(argv[0]+1, "debug")) {
+ opts_debug = true;
+ continue;
+ }
+ if (!strcmp(argv[0]+1, "memchk")) {
+ opts_memchk = true;
+ continue;
+ }
+ if (!strcmp(argv[0]+1, "nocolor")) {
+ con_color(0);
+ continue;
+ }
+
+ con_err("invalid argument %s\n", argv[0]+1);
+ return -1;
+ }
+ }
+ con_change(redirout, redirerr);