commit 814c6c55a38a388287bc79ef4e2d120ceb13a394
parent a268a04dea61a1e99645238a07d1306f049d7aa3
Author: Kyle Milz <kyle@0x30.net>
Date: Tue, 19 Sep 2017 01:43:48 -0600
bin: rename citrun_check to citrun_report
Diffstat:
8 files changed, 31 insertions(+), 30 deletions(-)
diff --git a/bin/Jamfile b/bin/Jamfile
@@ -7,11 +7,11 @@ actions ShellReplace {
}
#
-# citrun_check
+# citrun_report
#
SHELLHEADER = "#!/usr/bin/awk -f" ;
-MakeLocate citrun_check : bin ;
-Shell citrun_check : check.awk ;
+MakeLocate citrun_report : bin ;
+Shell citrun_report : report.awk ;
#
# citrun_wrap
@@ -77,7 +77,7 @@ LINK on citrun_inst citrun_gl citrun_gltest = $(C++) ;
#
# install
#
-InstallShell $(PREFIX)/bin : citrun_check citrun_wrap ;
+InstallShell $(PREFIX)/bin : citrun_report citrun_wrap ;
InstallBin $(PREFIX)/bin : citrun_gl citrun_inst ;
SubInclude TOP bin glyphy ;
diff --git a/bin/check.awk b/bin/report.awk
diff --git a/man/Jamfile b/man/Jamfile
@@ -4,5 +4,5 @@ InstallMan $(PREFIX)/man :
citrun_gl.1
citrun_inst.1
citrun_wrap.1
- citrun_check.1
+ citrun_report.1
;
diff --git a/man/citrun_check.1 b/man/citrun_report.1
diff --git a/t/inst_log.t b/t/inst_log.t
@@ -1,6 +1,6 @@
#
# Check that a raw citrun.log file is in good shape.
-# citrun_check relies on this output, and citrun_check is used quite a bit.
+# citrun_report relies on this output, and citrun_report is used quite a bit.
#
use Modern::Perl;
use t::utils;
diff --git a/t/report.t b/t/report.t
@@ -5,31 +5,31 @@ use Modern::Perl;
use Test::Cmd;
use Test::More;
-plan skip_all => 'citrun_check missing on win32' if ($^O eq "MSWin32");
+plan skip_all => 'citrun_report missing on win32' if ($^O eq "MSWin32");
plan tests => 12;
-my $check = Test::Cmd->new( prog => 'bin/citrun_check', workdir => '' );
+my $report = Test::Cmd->new( prog => 'bin/citrun_report', workdir => '' );
#
# Test when a nonexistent file argument is given.
#
my $error_good = "awk: can't open file _nonexistent_";
-$check->run( args => '_nonexistent_', chdir => $check->curdir );
+$report->run( args => '_nonexistent_', chdir => $report->curdir );
-is( $check->stdout, '', 'is nonexistent file stdout silent' );
-like( $check->stderr, qr/$error_good/, 'is nonexistent file stderr identical' );
+is( $report->stdout, '', 'is nonexistent file stdout silent' );
+like( $report->stderr, qr/$error_good/, 'is nonexistent file stderr identical' );
is( $? >> 8, 2, 'is nonexistent file exit code nonzero' );
#
# Verify output when an empty file is processed.
#
my $output_good = "No signs of rewrite activity.";
-$check->write( 'empty_file.log', '' );
-$check->run( args => 'empty_file.log', chdir => $check->curdir );
+$report->write( 'empty_file.log', '' );
+$report->run( args => 'empty_file.log', chdir => $report->curdir );
-like( $check->stdout, qr/$output_good/, 'is empty file stdout expected' );
-is( $check->stderr, '', 'is empty file stderr silent' );
+like( $report->stdout, qr/$output_good/, 'is empty file stdout expected' );
+is( $report->stderr, '', 'is empty file stderr silent' );
is( $? >> 8, 1, 'is empty file exit code nonzero' );
#
@@ -37,11 +37,11 @@ is( $? >> 8, 1, 'is empty file exit code nonzero' );
#
$output_good = 'Summary:
1 Rewrite tool runs';
-$check->write( 'header_only.log', '>> citrun_inst');
-$check->run( args => 'header_only.log', chdir => $check->curdir );
+$report->write( 'header_only.log', '>> citrun_inst');
+$report->run( args => 'header_only.log', chdir => $report->curdir );
-like( $check->stdout, qr/$output_good/, 'is header only stdout expected' );
-is( $check->stderr, '', 'is header only stderr silent' );
+like( $report->stdout, qr/$output_good/, 'is header only stdout expected' );
+is( $report->stderr, '', 'is header only stderr silent' );
is( $? >> 8, 0, 'is header only exit code zero' );
#
@@ -49,10 +49,10 @@ is( $? >> 8, 0, 'is header only exit code zero' );
#
$output_good = "No signs of rewrite activity.";
-mkdir File::Spec->catdir( $check->workdir, 'dir a' );
-$check->write( [ 'dir a', 'citrun.log' ], '' );
+mkdir File::Spec->catdir( $report->workdir, 'dir a' );
+$report->write( [ 'dir a', 'citrun.log' ], '' );
-$check->run( args => 'dir\ a/citrun.log', chdir => $check->curdir );
-like( $check->stdout, qr/$output_good/, 'is path with spaces stdout identical' );
-is( $check->stderr, '', 'is path with spaces stderr silent' );
+$report->run( args => 'dir\ a/citrun.log', chdir => $report->curdir );
+like( $report->stdout, qr/$output_good/, 'is path with spaces stdout identical' );
+is( $report->stderr, '', 'is path with spaces stderr silent' );
is( $? >> 8, 1, 'is path with spaces exit code nonzero' );
diff --git a/t/wrap_parallel.t b/t/wrap_parallel.t
@@ -34,7 +34,7 @@ print $wrap->stdout;
is( $wrap->stderr, '', 'is citrun_wrap make stderr silent' );
is( $? >> 8, 0, 'is citrun_wrap make exit code 0' );
-my $check_good = <<EOF;
+my $report_good = <<EOF;
Summary:
8 Rewrite tool runs
4 Source files used as input
@@ -48,10 +48,11 @@ Totals:
12 Total statements
EOF
-$wrap->run( prog => 'bin/citrun_check', args => 'citrun.log', chdir => $wrap->curdir );
-my $check_out = $wrap->stdout;
-$check_out =~ s/^.*Milliseconds spent rewriting.*\n//gm;
-eq_or_diff( $check_out, $check_good, 'is citrun_check stdout identical', { context => 3 } );
+$wrap->run( prog => 'bin/citrun_report', args => 'citrun.log',
+ chdir => $wrap->curdir );
+my $report_out = $wrap->stdout;
+$report_out =~ s/^.*Milliseconds spent rewriting.*\n//gm;
+eq_or_diff( $report_out, $report_good, 'is citrun_report stdout identical', { context => 3 } );
$ENV{CITRUN_PROCDIR} = $wrap->workdir;
for (1..4) {
diff --git a/www/index.html b/www/index.html
@@ -43,7 +43,7 @@
</p>
<ul>
<li><a href="man/citrun_wrap.1.html">citrun_wrap(1)</a>
- <li><a href="man/citrun_check.1.html">citrun_check(1)</a>
+ <li><a href="man/citrun_report.1.html">citrun_report(1)</a>
<li><a href="man/citrun_gl.1.html">citrun_gl(1)</a>
<li><a href="man/citrun_inst.1.html">citrun_inst(1)</a>
</ul>