print $result, BRIGHT_RED."FAILED".RESET." for test file:". RESET WHITE.$self->{test_file}."\n". RESET;
print $self->{test_cnt}."|FAILED|".$self->{test_file},"\n"
}else{
- print $result, BRIGHT_GREEN."PASSED".RESET." for test file: ". RESET WHITE.$self->{test_file}."\n". RESET;
+ print $result, BRIGHT_GREEN."PASSED".RESET." for test file: ". RESET WHITE.$self->{test_file}.RESET."\n";
+ # NOTICE! - Following print is test result footer it is very important not to change.
print $self->{test_cnt}."|SUCCESS|".$self->{test_file},"\n"
}
}
# "/home/will/dev_new/PerlCNF/tests",
# "/home/will/dev_new/PerlCNF/system/modules"
# ]
-#
+#
###
\ No newline at end of file
use Term::ANSIColor qw(:constants);
use IPC::Run qw( run timeout );
use File::Spec;
+use Cwd qw(getcwd);
+my $CWD = getcwd;
use lib "./local";
use lib "./tests";
my @files = grep { !/^\./ && /^test.*?\.pl$/ && $0 !~ m/$_$/ && -f "./tests/$_" } readdir($dh);
closedir $dh;
- my ($test_pass, $test_fail, $test_cases, @OUT, %WARN);
+ my ($test_pass, $test_fail, $test_cases, @OUT, %WARN)=(0,0,0,(),());
foreach my $file(sort @files) {
- $file = "./tests/$file";
+ $file = "tests/$file";
my ($in,$output, $warnings);
my @perl = ('/usr/bin/env','perl',$file);
print "Running->$file\n";
###
run (\@perl, \$in, \$output, '2>>', \$warnings);
###
- my @test_ret = $output=~m/(\d*)\|(.*)\|($file)$/g;
+ my @test_ret = $output=~m/(\d*)\|(\w*)\|($CWD\/$file)$/g;
$output=~s/\d*\|.*\|$file\s$//g;
push @OUT, $output;
if ($warnings){