aboutsummaryrefslogtreecommitdiff
path: root/test/run_tests.pl
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-06-20 17:20:20 +0200
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-06-22 16:41:24 +0200
commit93a7d24179ee5f61a2350b547dfcd522f6a4b9b0 (patch)
treed04a917a6f6a3af8ef356fce3729ae7a846eaaa8 /test/run_tests.pl
parent6bb74ecb87f496faa777b609a03a2ce422b60197 (diff)
downloadopenssl-93a7d24179ee5f61a2350b547dfcd522f6a4b9b0.zip
openssl-93a7d24179ee5f61a2350b547dfcd522f6a4b9b0.tar.gz
openssl-93a7d24179ee5f61a2350b547dfcd522f6a4b9b0.tar.bz2
test/run_tests.pl: Improve indentation parsing workaround for VFO and VFP mode
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/12175)
Diffstat (limited to 'test/run_tests.pl')
-rw-r--r--test/run_tests.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/run_tests.pl b/test/run_tests.pl
index 8a4e770..8306c60 100644
--- a/test/run_tests.pl
+++ b/test/run_tests.pl
@@ -157,13 +157,18 @@ $eres = eval {
my $tests_planned = $is_plan && $self->tests_planned;
my $is_test = $self->is_test;
my $is_ok = $is_test && $self->is_ok;
- # workaround in case parser not coping with indentation:
+
+ # workaround for parser not coping with sub-test indentation
if ($self->is_unknown) {
+ my $level = $#plans;
+ my $indent = $level < 0 ? "" : " " x ($level * 4);
+
($is_plan, $tests_planned) = (1, $1)
- if ($self->as_string =~ m/^\s+1\.\.(\d+)/);
+ if ($self->as_string =~ m/^$indent 1\.\.(\d+)/);
($is_test, $is_ok) = (1, !$1)
- if ($self->as_string =~ m/^\s+(not )?ok /);
+ if ($self->as_string =~ m/^$indent(not )?ok /);
}
+
if ($is_plan) {
push @plans, $tests_planned;
$output_buffer = ""; # ignore comments etc. until plan