Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275174
b: refs/heads/master
c: 0050b6b
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Oct 17, 2011
1 parent f822311 commit dc45383
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 41 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2ed3b16128e93309758e62937e7f137ac9844227
refs/heads/master: 0050b6bbef01d871a34a77685047190aa428b210
61 changes: 21 additions & 40 deletions trunk/tools/testing/ktest/ktest.pl
Original file line number Diff line number Diff line change
Expand Up @@ -436,20 +436,29 @@ sub __read_config {
# ignore blank lines and comments
next if (/^\s*$/ || /\s*\#/);

if (/^\s*TEST_START(.*)/) {
if (/^\s*(TEST_START|DEFAULTS)\b(.*)/) {

$rest = $1;
my $type = $1;
$rest = $2;

if ($num_tests_set) {
die "$name: $.: Can not specify both NUM_TESTS and TEST_START\n";
}
my $old_test_num;
my $old_repeat;

if ($type eq "TEST_START") {

my $old_test_num = $test_num;
my $old_repeat = $repeat;
if ($num_tests_set) {
die "$name: $.: Can not specify both NUM_TESTS and TEST_START\n";
}

$test_num += $repeat;
$default = 0;
$repeat = 1;
$old_test_num = $test_num;
$old_repeat = $repeat;

$test_num += $repeat;
$default = 0;
$repeat = 1;
} else {
$default = 1;
}

if ($rest =~ /\s+SKIP\b(.*)/) {
$rest = $1;
Expand Down Expand Up @@ -478,42 +487,14 @@ sub __read_config {
}

if ($rest !~ /^\s*$/) {
die "$name: $.: Gargbage found after TEST_START\n$_";
die "$name: $.: Gargbage found after $type\n$_";
}

if ($skip) {
if ($skip && $type eq "TEST_START") {
$test_num = $old_test_num;
$repeat = $old_repeat;
}

} elsif (/^\s*DEFAULTS(.*)$/) {
$default = 1;

$rest = $1;

if ($rest =~ /\s+SKIP(.*)/) {
$rest = $1;
$skip = 1;
} else {
$skip = 0;
}

if ($rest =~ /\sIF\s+(.*)/) {
$if = 1;
if (process_if($name, $1)) {
$if_set = 1;
} else {
$skip = 1;
}
$rest = "";
} else {
$if = 0;
}

if ($rest !~ /^\s*$/) {
die "$name: $.: Gargbage found after DEFAULTS\n$_";
}

} elsif (/^\s*ELSE\b(.*)$/) {
if (!$if) {
die "$name: $.: ELSE found with out matching IF section\n$_";
Expand Down

0 comments on commit dc45383

Please sign in to comment.