commit e08c0b84d3e032fc6fc0906417cbcdbb8ecd8c5a
parent 51913a505c2ac6fc73db2c100d6fbb61275c48a8
Author: Kyle Milz <kyle@0x30.net>
Date: Sat, 20 Aug 2016 15:02:03 -0600
src: remove more logging
Diffstat:
19 files changed, 15 insertions(+), 26 deletions(-)
diff --git a/src/inst_frontend.cc b/src/inst_frontend.cc
@@ -156,7 +156,10 @@ InstrumentFrontend::process_cmdline()
if (m_source_files.size() != 0)
return;
- *m_log << "No source files found. Executing command line.\n";
+ *m_log << "No source files found on command line.\n";
+ if (m_is_citruninst)
+ exit(0);
+
exec_compiler();
}
diff --git a/src/inst_main.cc b/src/inst_main.cc
@@ -104,15 +104,17 @@ main(int argc, char *argv[])
InstrumentLogger llog(is_citruninst);
print_toolinfo(llog);
- llog << "Tool called as '" << argv[0] << "'";
- if (std::strcmp(base_name, argv[0]) != 0) {
- llog << ", changing to '" << base_name << "'";
- argv[0] = base_name;
- }
- llog << ".\n";
-
- if (!is_citruninst) {
+ if (is_citruninst) {
+ llog << ">> Welcome to C It Run! Have a nice day.\n";
+ } else {
// There's extra work to do if we're not running as citrun-inst.
+ llog << "Tool called as '" << argv[0] << "'";
+ if (std::strcmp(base_name, argv[0]) != 0) {
+ llog << ", changing to '" << base_name << "'";
+ argv[0] = base_name;
+ }
+ llog << ".\n";
+
setprogname("citrun-inst");
if (clean_PATH(llog) != 0)
// PATH cleaning failed, exiting is advisable.
diff --git a/t/inst_basic_link.sh b/t/inst_basic_link.sh
@@ -14,7 +14,6 @@ echo "ok 3 - source compiled"
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
1 Source files used as input
1 Application link commands
1 Rewrite successes
diff --git a/t/inst_binop.sh b/t/inst_binop.sh
@@ -46,7 +46,6 @@ EOF
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
1 Source files used as input
1 Rewrite successes
diff --git a/t/inst_correct.sh b/t/inst_correct.sh
@@ -29,7 +29,6 @@ EOF
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
1 Source files used as input
1 Application link commands
1 Rewrite successes
diff --git a/t/inst_dowhile.sh b/t/inst_dowhile.sh
@@ -24,7 +24,6 @@ EOF
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
1 Source files used as input
1 Rewrite successes
diff --git a/t/inst_fail.sh b/t/inst_fail.sh
@@ -13,7 +13,6 @@ grep -q "error: expected" err.out && echo ok 3
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
1 Source files used as input
1 Rewrite parse errors
1 Rewrite failures
diff --git a/t/inst_for.sh b/t/inst_for.sh
@@ -24,7 +24,6 @@ EOF
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
1 Source files used as input
1 Rewrite successes
diff --git a/t/inst_funcdef.sh b/t/inst_funcdef.sh
@@ -28,7 +28,6 @@ EOF
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
1 Source files used as input
1 Rewrite successes
diff --git a/t/inst_if.sh b/t/inst_if.sh
@@ -34,7 +34,6 @@ EOF
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
1 Source files used as input
1 Rewrite successes
diff --git a/t/inst_link_multiple.sh b/t/inst_link_multiple.sh
@@ -37,7 +37,6 @@ $TEST_TOOLS/citrun-check > check.out && echo ok
cat <<EOF > check.good
Summary:
- 4 Calls to the rewrite tool
3 Source files used as input
1 Application link commands
3 Rewrite successes
diff --git a/t/inst_log.sh b/t/inst_log.sh
@@ -70,7 +70,7 @@ Tool called as ''.
PATH=''
Command line is ''.
Link detected, adding '' to command line.
-No source files found. Executing command line.
+No source files found on command line.
EOF
diff -u citrun.log.good citrun.log.proc && echo "ok 6 - citrun.log diff"
diff --git a/t/inst_macro.sh b/t/inst_macro.sh
@@ -25,7 +25,6 @@ EOF
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
1 Source files used as input
1 Rewrite successes
diff --git a/t/inst_return.sh b/t/inst_return.sh
@@ -34,7 +34,6 @@ EOF
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
1 Source files used as input
1 Rewrite successes
diff --git a/t/inst_src_ext.sh b/t/inst_src_ext.sh
@@ -14,7 +14,6 @@ $TEST_TOOLS/citrun-wrap cc -c main.C
cat <<EOF > check.good
Summary:
- 5 Calls to the rewrite tool
4 Source files used as input
4 Rewrite successes
4 Rewritten source compile successes
diff --git a/t/inst_stdout.sh b/t/inst_stdout.sh
@@ -15,7 +15,6 @@ EOF
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
1 Source files used as input
1 Application link commands
1 Rewrite successes
diff --git a/t/inst_switch.sh b/t/inst_switch.sh
@@ -36,7 +36,6 @@ EOF
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
1 Source files used as input
1 Rewrite successes
diff --git a/t/inst_two_src.sh b/t/inst_two_src.sh
@@ -19,7 +19,6 @@ EOF
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
2 Source files used as input
1 Application link commands
1 Rewrite successes
diff --git a/t/inst_while.sh b/t/inst_while.sh
@@ -26,7 +26,6 @@ EOF
cat <<EOF > check.good
Summary:
- 1 Calls to the rewrite tool
1 Source files used as input
1 Rewrite successes