|
From: <jgr...@us...> - 2003-07-12 05:59:05
|
Update of /cvsroot/popfile/engine/Devel
In directory sc8-pr-cvs1:/tmp/cvs-serv19533/Devel
Modified Files:
TestCoverage.pm
Log Message:
Test suite now has 100% coverage for Configuration meaning that all the POPFile/ modules have 100% coverage... moving on to other modules now
Index: TestCoverage.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Devel/TestCoverage.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TestCoverage.pm 12 Jul 2003 00:43:20 -0000 1.3
--- TestCoverage.pm 12 Jul 2003 05:59:02 -0000 1.4
***************
*** 21,24 ****
--- 21,25 ----
# We want to look inside subroutines so tell the debugger to trace into
# them
+
$DB::trace = 1;
}
***************
*** 46,50 ****
{
if ( ( $file =~ /^[^\/]/ ) && ( $file ne 'tests.pl' ) && !( $file =~ /^Test\// ) ) {
! my $current_line = 0;
open SOURCE_FILE, "<$file";
--- 47,52 ----
{
if ( ( $file =~ /^[^\/]/ ) && ( $file ne 'tests.pl' ) && !( $file =~ /^Test\// ) ) {
! my $current_line = 0;
! my $block_executed = 0;
open SOURCE_FILE, "<$file";
***************
*** 63,82 ****
# comments or just have braces on them or
# just an else or just a subroutine definition
! if ( ( /^\s*\#/ == 0 ) &&
! ( /^\s*$/ == 0 ) &&
! ( /^\s*(\{|\}|else|\s)+\s*$/ == 0 ) &&
! ( /^\s*sub \w+( \{)?\s*$/ == 0 ) &&
! ( /^\s*package / == 0 ) )
! {
! $count{$file}{total_executable_lines} += 1;
! # If this line was executed then keep count of
! # that fact
! if ( $count{$file}{$current_line} > 0 ) {
! $count{$file}{total_executed} += 1;
! } else {
! print "$file $_\n" if ( $file =~/Module/);
! }
}
}
--- 65,97 ----
# comments or just have braces on them or
# just an else or just a subroutine definition
! if ( ( ( /^\s*\#/ == 0 ) &&
! ( /^\s*$/ == 0 ) &&
! ( /^\s*(\{|\}|else|\s)+\s*$/ == 0 ) &&
! ( /^\s*sub \w+( \{)?\s*$/ == 0 ) &&
! ( /^\s*package / == 0 ) ) || ( $block_executed ) ) {
! $count{$file}{total_executable_lines} += 1;
! # If this line was executed then keep count of
! # that fact
!
! if ( ( $count{$file}{$current_line} > 0 ) || ( $block_executed ) ) {
! $count{$file}{total_executed} += 1;
!
! # Check to see if the special comment PROFILE BLOCK START is on the line
! # and if so set the block mode where we count lines as being executed
! # in the block if the first line was
!
! if ( /\# PROFILE BLOCK START/ ) {
! $block_executed = 1;
! }
!
! if ( /\# PROFILE BLOCK STOP/ ) {
! $block_executed = 0;
! }
! } else {
! print "$file $_\n" if ( $file =~/Configuration/);
! }
}
+
}
|