our ($test);
our ($action);
-parse_cmd_line ();
+parse_cmd_line qw (sm-create sm-full sm-seq-block sm-seq-random sm-random
-# Default set of tests.
-@TESTS = qw (sm-create sm-full sm-seq-block sm-seq-random sm-random
+ lg-create lg-full lg-seq-block lg-seq-random lg-random
- lg-create lg-full lg-seq-block lg-seq-random lg-random
+ grow-create grow-seq-sm grow-seq-lg grow-file-size grow-tell
+ grow-sparse grow-too-big grow-root-sm grow-root-lg
+ grow-dir-lg grow-two-files
- grow-create grow-seq-sm grow-seq-lg grow-file-size grow-tell
- grow-sparse grow-too-big grow-root-sm grow-root-lg grow-dir-lg
- grow-two-files
+ dir-mkdir dir-rmdir dir-mk-vine dir-rm-vine dir-mk-tree
+ dir-rm-tree dir-lsdir dir-rm-cwd dir-rm-cwd-cd
+ dir-rm-parent dir-rm-root dir-over-file dir-under-file
+ dir-empty-name dir-open
- dir-mkdir dir-rmdir dir-mk-vine dir-rm-vine dir-mk-tree
- dir-rm-tree dir-lsdir dir-rm-cwd dir-rm-cwd-cd
- dir-rm-parent dir-rm-root dir-over-file dir-under-file
- dir-empty-name dir-open
-
- syn-remove syn-read syn-write syn-rw
- ) unless @TESTS > 0;
+ syn-remove syn-read syn-write syn-rw);
clean_dir (), exit if $action eq 'clean';
our $hw;
use POSIX;
-use Getopt::Long;
+use Getopt::Long qw(:config no_ignore_case);
use Algorithm::Diff;
\f
sub parse_cmd_line {
+ my ($do_regex, $no_regex);
GetOptions ("v|verbose+" => \$verbose,
"h|help" => sub { usage (0) },
- "tests=s" => \@TESTS,
+ "d|do-tests=s" => \$do_regex,
+ "n|no-tests=s" => \$no_regex,
"c|clean" => sub { set_action ('clean'); },
"x|extract" => sub { set_action ('extract'); },
"b|build" => sub { set_action ('build'); },
if (!defined $action) {
$action = -e 'review.txt' ? 'assemble' : 'test';
}
+
+ my (@default_tests) = @_;
+ @TESTS = @default_tests;
+ @TESTS = grep (/$do_regex/, @TESTS) if defined $do_regex;
+ @TESTS = grep (!/$no_regex/, @TESTS) if defined $no_regex;
}
sub set_action {
Options:
-c, --clean Delete test results and temporary files, then exit.
- --tests=TESTS Run only the specified comma-separated tests.
+ -d, --do-tests=RE Run only tests that match the given regular expression.
+ -n, --no-tests=RE Do not run tests that match the given regular expression.
-x, --extract Stop after step 1.
-b, --build Stop after step 2.
-t, --test Stop after step 3 (default if "review.txt" not present).
our (%result);
our ($action);
-parse_cmd_line ();
-
-# Default set of tests.
-@TESTS = ("alarm-single", "alarm-multiple", "alarm-zero", "alarm-negative",
- "join-simple",
- "join-quick", "join-multiple", "join-nested",
- "join-dummy", "join-invalid", "join-no",
- "priority-preempt", "priority-fifo", "priority-donate-one",
- "priority-donate-multiple", "priority-donate-nest",
- "mlfqs-on", "mlfqs-off")
- unless @TESTS > 0;
+parse_cmd_line qw (alarm-single alarm-multiple alarm-zero alarm-negative
+ join-simple
+ join-quick join-multiple join-nested
+ join-dummy join-invalid join-no
+ priority-preempt priority-fifo priority-donate-one
+ priority-donate-multiple priority-donate-nest
+ mlfqs-on mlfqs-off);
clean_dir (), exit if $action eq 'clean';
our (%extra);
our ($action);
-parse_cmd_line ();
+parse_cmd_line qw (args-argc args-argv0 args-argvn args-single args-multiple
+ args-dbl-space
+ sc-bad-sp sc-bad-arg sc-boundary
+ halt exit
+ create-normal create-empty create-null create-bad-ptr
+ create-long create-exists create-bound
+ open-normal open-missing open-boundary open-empty open-null
+ open-bad-ptr open-twice
+ close-normal close-twice close-stdin close-stdout
+ close-bad-fd
+ read-normal read-bad-ptr read-boundary read-zero read-stdout
+ read-bad-fd
+ write-normal write-bad-ptr write-boundary write-zero
+ write-stdin write-bad-fd
+ exec-once exec-arg exec-multiple exec-missing exec-bad-ptr
+ join-simple join-twice join-killed join-bad-pid
+ multi-recurse multi-oom multi-child-fd);
# Default set of tests.
-@TESTS = qw (args-argc args-argv0 args-argvn args-single args-multiple
- args-dbl-space
- sc-bad-sp sc-bad-arg sc-boundary
- halt exit
- create-normal create-empty create-null create-bad-ptr
- create-long create-exists create-bound
- open-normal open-missing open-boundary open-empty open-null
- open-bad-ptr open-twice
- close-normal close-twice close-stdin close-stdout close-bad-fd
- read-normal read-bad-ptr read-boundary read-zero read-stdout
- read-bad-fd
- write-normal write-bad-ptr write-boundary write-zero write-stdin
- write-bad-fd
- exec-once exec-arg exec-multiple exec-missing exec-bad-ptr
- join-simple join-twice join-killed join-bad-pid
- multi-recurse multi-oom multi-child-fd
- ) unless @TESTS > 0;
+@TESTS = unless @TESTS > 0;
clean_dir (), exit if $action eq 'clean';
our ($test);
our ($action);
-parse_cmd_line ();
+parse_cmd_line qw (pt-grow-stack pt-big-stk-obj pt-bad-addr pt-write-code
+ page-linear page-parallel page-merge-seq page-merge-par
+ page-shuffle mmap-read mmap-close mmap-unmap mmap-overlap
+ mmap-twice mmap-write mmap-exit mmap-shuffle);
# Default set of tests.
-@TESTS = qw (pt-grow-stack pt-big-stk-obj pt-bad-addr pt-write-code
- page-linear page-parallel page-merge-seq page-merge-par
- page-shuffle mmap-read mmap-close mmap-unmap mmap-overlap
- mmap-twice mmap-write mmap-exit mmap-shuffle
- ) unless @TESTS > 0;
+@TESTS = unless @TESTS > 0;
clean_dir (), exit if $action eq 'clean';