From: Jacob Bachmeyer Date: Thu, 27 Jan 2022 03:10:11 +0000 (-0600) Subject: Add infrastructure for testsuite coverage analysis X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=dbbf8503981ed303faa92d734e8dd63bc80713ab;p=gatekeeper.git Add infrastructure for testsuite coverage analysis --- 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 }