tests: print "mode=standard", "mode=paranoia" progress

We run through everything in normal.t.pl two times, once
in "standard" mode and once in "paranoia" mode. Print some
context. Also, bail out if file creation fails.

Output now looks like this:

$ ./test.sh
tests/normal.t.pl ...
runTests: mode=standard
tests/normal.t.pl ... 54/116
runTests: mode=paranoia
tests/normal.t.pl ... ok
tests/reverse.t.pl .. ok
All tests successful.
Files=2, Tests=141, 21 wallclock secs ( 0.04 usr  0.00 sys + 20.03 cusr  0.36 csys = 20.43 CPU)
Result: PASS
This commit is contained in:
Jakob Unterwurzacher 2017-07-22 19:04:45 +02:00
parent 282df21a49
commit d2ee96d2bd

View File

@ -22,6 +22,7 @@ my $tempDir = $ENV{'TMPDIR'} || "/tmp";
sub runTests sub runTests
{ {
my $mode = shift; my $mode = shift;
print STDERR "\nrunTests: mode=$mode\n";
&newWorkingDir; &newWorkingDir;
@ -191,8 +192,8 @@ sub truncate
sub fileCreation sub fileCreation
{ {
# create a file # create a file
qx(df -ah > "$crypt/df.txt" 2> /dev/null); qx(date > "$crypt/df.txt");
ok( -f "$crypt/df.txt", "file created" ); ok( -f "$crypt/df.txt", "file created" ) || BAIL_OUT("file create failed");
# ensure there is an encrypted version. # ensure there is an encrypted version.
my $c = encName("df.txt"); my $c = encName("df.txt");