test613.pl: integrate mtime check for test 1445, 1446
No binary (build failed)
—
(log yok)
| @@ -3,7 +3,6 @@ | |
| <keywords> | |
| FILE | |
| --remote-time | |
| - | notxml |
| </keywords> | |
| </info> | |
| @@ -29,8 +28,7 @@ file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.dir/plainfile.txt --remote-tim | |
| # Verify data after the test has been "shot" | |
| <verify> | |
| <postcheck> | |
| - | %PERL %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir && \ |
| - | %PERL -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 946728000)' |
| + | %PERL %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir %LOGDIR/curl%TESTNUMBER.out 946728000 |
| </postcheck> | |
| </verify> | |
| </testcase> | |
| @@ -3,16 +3,13 @@ | |
| <keywords> | |
| SFTP | |
| --remote-time | |
| - | notxml |
| </keywords> | |
| </info> | |
| - | # |
| # Server-side | |
| <reply> | |
| </reply> | |
| - | # |
| # Client-side | |
| <client> | |
| <server> | |
| @@ -29,12 +26,10 @@ SFTP with --remote-time | |
| </command> | |
| </client> | |
| - | # |
| # Verify data after the test has been "shot" | |
| <verify> | |
| <postcheck> | |
| - | %PERL %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir && \ |
| - | %PERL -e 'exit((stat("%LOGDIR/curl%TESTNUMBER.out"))[9] != 978264000)' |
| + | %PERL %SRCDIR/libtest/test613.pl postprocess %PWD/%LOGDIR/test%TESTNUMBER.dir %LOGDIR/curl%TESTNUMBER.out 978264000 |
| </postcheck> | |
| </verify> | |
| </testcase> | |
| @@ -83,7 +83,6 @@ if($ARGV[0] eq "prepare") { | |
| } | |
| elsif($ARGV[0] eq "postprocess") { | |
| my $dirname = $ARGV[1]; | |
| - | my $logfile = $ARGV[2]; |
| # Clean up the test directory | |
| if($^O eq 'cygwin') { | |
| @@ -97,6 +96,14 @@ elsif($ARGV[0] eq "postprocess") { | |
| rmdir $dirname || die "$!"; | |
| + | if($#ARGV >= 3) { # Verify mtime if requested |
| + | my $checkfile = $ARGV[2]; |
| + | my $expected_mtime = int($ARGV[3]); |
| + | my $mtime = (stat($checkfile))[9]; |
| + | exit ($mtime != $expected_mtime); |
| + | } |
| + | |
| + | my $logfile = $ARGV[2]; |
| if($logfile && -s $logfile) { | |
| # Process the directory file to remove all information that | |
| # could be inconsistent from one test run to the next (e.g. | |