From dbbf8503981ed303faa92d734e8dd63bc80713ab Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Wed, 26 Jan 2022 21:10:11 -0600 Subject: [PATCH] Add infrastructure for testsuite coverage analysis --- testsuite/lib/upload.exp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/testsuite/lib/upload.exp b/testsuite/lib/upload.exp index 6f7e376..8eb582e 100644 --- a/testsuite/lib/upload.exp +++ b/testsuite/lib/upload.exp @@ -18,6 +18,8 @@ # along with this program. If not, see . set UPLOAD_TOOL [file join $srcdir upload-ftp-v1.2.pl] +if { ! [info exists PERL] } { set PERL perl } +if { ! [info exists CHECK_COVERAGE] } { set CHECK_COVERAGE no } # Format versions accepted by the script. set DIRECTIVE_FORMAT_VERSIONS { 1.1 1.2 } @@ -282,10 +284,15 @@ proc stop_test_services {} { proc run_upload_batch_test {} { global spawn_id - global UPLOAD_TOOL + global UPLOAD_TOOL PERL CHECK_COVERAGE # run test case - spawn $UPLOAD_TOOL --testing-this-script -s ftp + set runcmd [list spawn] + if { $CHECK_COVERAGE } { + lappend runcmd $PERL -T -MDevel::Cover=-silent,1 + } + lappend runcmd $UPLOAD_TOOL --testing-this-script -s ftp + eval $runcmd wait } -- 2.25.1