aboutsummaryrefslogtreecommitdiffstats
path: root/qtest
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-12-17 17:30:03 +0100
committerJay Berkenbilt <ejb@ql.org>2019-12-17 17:30:03 +0100
commit18e558e7216a50e153348c99e088f83d2901fa7b (patch)
treee49b3288d1ebbab3613cc7ac48538ef772283dfb /qtest
parente35e4099a23912b2b336b5241e048319ec2cd6c0 (diff)
downloadqpdf-18e558e7216a50e153348c99e088f83d2901fa7b.tar.zst
Update qtest version to 1.6
Diffstat (limited to 'qtest')
-rwxr-xr-xqtest/bin/qtest-driver2
-rw-r--r--qtest/module/TestDriver.pm17
2 files changed, 15 insertions, 4 deletions
diff --git a/qtest/bin/qtest-driver b/qtest/bin/qtest-driver
index 1519882a..b0b27ad3 100755
--- a/qtest/bin/qtest-driver
+++ b/qtest/bin/qtest-driver
@@ -33,7 +33,7 @@ require TestDriver;
if ((@ARGV == 1) && ($ARGV[0] eq '--version'))
{
- print "$whoami version 1.5\n";
+ print "$whoami version 1.6\n";
exit 0;
}
if ((@ARGV == 1) && ($ARGV[0] eq '--print-path'))
diff --git a/qtest/module/TestDriver.pm b/qtest/module/TestDriver.pm
index bc1cdb1c..c07707c9 100644
--- a/qtest/module/TestDriver.pm
+++ b/qtest/module/TestDriver.pm
@@ -711,9 +711,20 @@ sub runtest
elsif (defined $in_file)
{
&QTC::TC("testdriver", "TestDriver input file");
- open($in, '<', $in_file) or
- croak +(+__PACKAGE__,
- "->runtest: unable to read from input file $in_file: $!\n");
+ if (! open($in, '<', $in_file))
+ {
+ # If the input file is not found, generate a string to use
+ # as input, and make the string different each run to
+ # prevent sloppy commiting of the string as the expected
+ # output. This prevents complete failure in cases when the
+ # input file is not found, such as when one test's input
+ # file is generated by something that may have failed
+ # earlier.
+ my $not_found = "qtest, pid=$$: input file $in_file not found\n";
+ open($in, '<', \$not_found) or
+ croak +(+__PACKAGE__,
+ "->runtest: unable to read from input file $in_file: $!\n");
+ }
}
elsif (defined $in_command)
{