citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 58232c00bf6c96ab64e33a05c1264f121f76a235
parent e6e287a3a694b6bfdc7bc3faebf80e924ec725aa
Author: Kyle Milz <kyle@0x30.net>
Date:   Sun, 25 Dec 2016 14:11:22 -0700

citrun- -> citrun_

Diffstat:
MJamrules.tail | 4++--
Mconfigure | 4++--
Msrc/Jamfile | 42+++++++++++++++++++++---------------------
Msrc/c++ | 4++--
Msrc/cc | 4++--
Msrc/eg++ | 4++--
Msrc/gcc | 4++--
Msrc/gl_transunit.cc | 2+-
Msrc/inst_frontend.cc | 18+++++++++---------
Msrc/lib.c | 2+-
Msrc/wrap.sh | 2+-
Mt/check_baddir.sh | 4++--
Mt/check_empty.sh | 2+-
Mt/check_spaces.sh | 6+++---
Mt/e2e_ansi.sh | 6+++---
Mt/e2e_basic.sh | 6+++---
Mt/e2e_stdout.sh | 6+++---
Mt/inst_basic_link.sh | 6+++---
Mt/inst_binop.sh | 6+++---
Mt/inst_dowhile.sh | 6+++---
Mt/inst_fail.sh | 8++++----
Mt/inst_for.sh | 6+++---
Mt/inst_funcdef.sh | 6+++---
Mt/inst_if.sh | 6+++---
Mt/inst_link_multiple.sh | 6+++---
Mt/inst_log.sh | 12+++++-------
Mt/inst_macro.sh | 6+++---
Mt/inst_path.sh | 8++++----
Mt/inst_preamble.sh | 2+-
Mt/inst_preprocess.sh | 10++++------
Mt/inst_return.sh | 6+++---
Mt/inst_src_ext.sh | 14+++++++-------
Mt/inst_switch.sh | 8++++----
Mt/inst_two_src.sh | 6+++---
Mt/inst_while.sh | 8++++----
Mt/lib_badver.sh | 2+-
Mt/term_basic.t | 2+-
Mt/utils.pm | 2+-
Mt/wrap_badarg.sh | 6+++---
Mt/wrap_badsrc.sh | 8++++----
Mt/wrap_cmake.sh | 8++++----
Mt/wrap_exitcode.sh | 4++--
Mt/wrap_jam.sh | 6+++---
Mt/wrap_make.sh | 6+++---
Mt/wrap_ninja.sh | 6+++---
Mt/wrap_parallel.sh | 6+++---
46 files changed, 151 insertions(+), 155 deletions(-)

diff --git a/Jamrules.tail b/Jamrules.tail @@ -18,7 +18,7 @@ actions Stringize rm $(<).bak } -# Create installation directories and setup quirky ../../citrun-inst links. +# Create installation directories and setup quirky ../../citrun_inst links. rule InstallSyms { Depends install : $(PREFIX)/share/citrun/$(>) ; @@ -33,5 +33,5 @@ rule InstallSyms # Used by InstallSyms actions SymLink { - $(RM) $(<) && $(LN) -s ../../bin/citrun-inst $(<) ; + $(RM) $(<) && $(LN) -s ../../bin/citrun_inst $(<) ; } diff --git a/configure b/configure @@ -18,7 +18,7 @@ echo # C++11 required. ${CXX-c++} -x c++ -std=c++11 -E - < /dev/null > /dev/null -# citrun-gltest needs osmesa and both it and citrun-gl need the rest. +# citrun_gltest needs osmesa and both it and citrun_gl need the rest. gl_pkgs="osmesa glfw3 glew freetype2" for pkg in $gl_pkgs; do printf "%10s = " $pkg @@ -44,7 +44,7 @@ else echo fi -# Write top of Jamrules. Note any errors inside backticks will be ignored. +# Write Jamrules. Note any errors inside backticks will be ignored. cat <<EOF > Jamrules CC = ${CC-cc} ; C++ = ${CXX-c++} ; diff --git a/src/Jamfile b/src/Jamfile @@ -28,22 +28,22 @@ ObjectCcFlags lib.c : -fPIC -ansi ; Library libcitrun : lib.c ; # -# citrun-wrap, citrun-check +# citrun_wrap, citrun_check # -MakeLocate citrun-check citrun-wrap : $(LOCATE_SOURCE) ; -Shell citrun-check : check.sh ; -Shell citrun-wrap : wrap.sh ; +MakeLocate citrun_check citrun_wrap : $(LOCATE_SOURCE) ; +Shell citrun_check : check.sh ; +Shell citrun_wrap : wrap.sh ; -ReplaceTokens citrun-wrap ; +ReplaceTokens citrun_wrap ; # -# citrun-term +# citrun_term # -#LINKLIBS on citrun-term += -lcurses ; -#Main citrun-term : term_main.cc ; +#LINKLIBS on citrun_term += -lcurses ; +#Main citrun_term : term_main.cc ; # -# citrun-gl & citrun-gltest +# citrun_gl & citrun_gltest # GL_SRCS = gl_procfile.cc @@ -66,16 +66,16 @@ Stringize demo_fshader_glsl.h : demo_fshader.glsl ; ObjectDefines gl_font.cc : FONT_PATH=\\\"$(FONT_PATH)\\\" ; ObjectC++Flags gl_main.cc gl_testmain.cc $(GL_SRCS) : $(GL_CFLAGS) ; -LINKLIBS on citrun-gl citrun-gltest += -lm $(GL_LIBS) ; -LinkLibraries citrun-gl citrun-gltest : gl_common libglyphy ; +LINKLIBS on citrun_gl citrun_gltest += -lm $(GL_LIBS) ; +LinkLibraries citrun_gl citrun_gltest : gl_common libglyphy ; -Main citrun-gl : gl_main.cc ; +Main citrun_gl : gl_main.cc ; -LINKLIBS on citrun-gltest += $(GLTEST_LIBS) ; -Main citrun-gltest : gl_testmain.cc ; +LINKLIBS on citrun_gltest += $(GLTEST_LIBS) ; +Main citrun_gltest : gl_testmain.cc ; # -# citrun-inst +# citrun_inst # INST_SRCS = inst_main.cc @@ -88,21 +88,21 @@ Stringize lib_h.h : lib.h ; ObjectC++Flags $(INST_SRCS) : $(INST_CFLAGS) ; ObjectDefines $(INST_SRCS) : CITRUN_SHARE=\\\"$(CITRUN_SHARE)\\\" ; -LINKFLAGS on citrun-inst = $(LINKFLAGS) $(INST_LDFLAGS) ; -LINKLIBS on citrun-inst += $(INST_LIBS) ; +LINKFLAGS on citrun_inst = $(LINKFLAGS) $(INST_LDFLAGS) ; +LINKLIBS on citrun_inst += $(INST_LIBS) ; -Main citrun-inst : $(INST_SRCS) ; +Main citrun_inst : $(INST_SRCS) ; # Link with the c++ compiler so that the matching c++ runtime library gets added # automatically. -LINK on citrun-inst citrun-gl citrun-gltest = $(C++) ; +LINK on citrun_inst citrun_gl citrun_gltest = $(C++) ; # # install # InstallLib $(PREFIX)/share/citrun : libcitrun.a ; -InstallShell $(PREFIX)/bin : citrun-wrap citrun-check ; -InstallBin $(PREFIX)/bin : citrun-gl citrun-inst ; +InstallShell $(PREFIX)/bin : citrun_wrap citrun_check ; +InstallBin $(PREFIX)/bin : citrun_gl citrun_inst ; InstallSyms $(PREFIX)/share/citrun : cc gcc clang clang++ g++ c++ egcc eg++ ; SubInclude TOP src glyphy ; diff --git a/src/c++ b/src/c++ @@ -1 +1 @@ -citrun-inst -\ No newline at end of file +citrun_inst +\ No newline at end of file diff --git a/src/cc b/src/cc @@ -1 +1 @@ -citrun-inst -\ No newline at end of file +citrun_inst +\ No newline at end of file diff --git a/src/eg++ b/src/eg++ @@ -1 +1 @@ -citrun-inst -\ No newline at end of file +citrun_inst +\ No newline at end of file diff --git a/src/gcc b/src/gcc @@ -1 +1 @@ -citrun-inst -\ No newline at end of file +citrun_inst +\ No newline at end of file diff --git a/src/gl_transunit.cc b/src/gl_transunit.cc @@ -71,7 +71,7 @@ GlTranslationUnit::GlTranslationUnit(void* &mem, demo_font_t *font, } // -// Returns number of lines that citrun-inst processed (whole source file +// Returns number of lines that citrun_inst processed (whole source file // ideally) // unsigned int diff --git a/src/inst_frontend.cc b/src/inst_frontend.cc @@ -33,7 +33,7 @@ #include <unistd.h> // execvp, fork, getpid, unlink -static llvm::cl::OptionCategory ToolingCategory("citrun-inst options"); +static llvm::cl::OptionCategory ToolingCategory("citrun_inst options"); InstFrontend::InstFrontend(int argc, char *argv[]) : m_args(argv, argv + argc), @@ -47,14 +47,14 @@ InstFrontend::InstFrontend(int argc, char *argv[]) : if ((base_name = basename(m_args[0])) == NULL) err(1, "basename"); - // Switch tool mode if we're called as 'citrun-inst'. - if (std::strcmp(base_name, "citrun-inst") == 0) { + // Switch tool mode if we're called as 'citrun_inst'. + if (std::strcmp(base_name, "citrun_inst") == 0) { m_is_citruninst = true; // Enable logging to stdout. m_log.set_citruninst(); } - m_log << ">> citrun-inst v" << citrun_major << "." << citrun_minor; + m_log << ">> citrun_inst v" << citrun_major << "." << citrun_minor; if (uname(&utsname) == -1) m_log << " Unknown OS" << std::endl; else @@ -68,8 +68,8 @@ InstFrontend::InstFrontend(int argc, char *argv[]) : << "'" << std::endl; m_args[0] = base_name; - // Sometimes we're not called as citrun-inst so force that here. - setprogname("citrun-inst"); + // Sometimes we're not called as citrun_inst so force that here. + setprogname("citrun_inst"); if (m_is_citruninst == false) clean_PATH(); @@ -299,13 +299,13 @@ InstFrontend::instrument() int ret = Tool.run(f.get()); m_log << "Rewriting " << (ret ? "failed." : "successful.") << std::endl; - // All of the time until now is the overhead citrun-inst adds. + // All of the time until now is the overhead citrun_inst adds. std::chrono::high_resolution_clock::time_point now = std::chrono::high_resolution_clock::now(); m_log << std::chrono::duration_cast<std::chrono::milliseconds>(now - m_start_time).count() << " Milliseconds spent rewriting source." << std::endl; - // This is as far as we go in citrun-inst mode. + // This is as far as we go in citrun_inst mode. if (m_is_citruninst) exit(ret); @@ -338,7 +338,7 @@ void InstFrontend::exec_compiler() { if (m_is_citruninst) { - m_log << "Running as citrun-inst, not calling exec()" << std::endl; + m_log << "Running as citrun_inst, not calling exec()" << std::endl; exit(0); } diff --git a/src/lib.c b/src/lib.c @@ -137,7 +137,7 @@ citrun_node_add(unsigned int major, unsigned int minor, struct citrun_node *n) /* Binary compatibility between versions not guaranteed. */ if (major != citrun_major || minor != citrun_minor) - errx(1, "libcitrun-%i.%i: incompatible version %i.%i, " + errx(1, "libcitrun %i.%i: incompatible version %i.%i, " "try cleaning and rebuilding your project", citrun_major, citrun_minor, major, minor); diff --git a/src/wrap.sh b/src/wrap.sh @@ -1,6 +1,6 @@ if [[ ${1} = -* ]]; then - echo "usage: citrun-wrap <build cmd>" + echo "usage: citrun_wrap <build cmd>" exit 1 fi diff --git a/t/check_baddir.sh b/t/check_baddir.sh @@ -1,6 +1,6 @@ #!/bin/sh -u # -# Verify that passing a bad directory to citrun-check errors out. +# Verify that passing a bad directory to citrun_check errors out. # . t/utils.subr plan 1 @@ -9,4 +9,4 @@ plan 1 output_good="find: _nonexistent_dir_: No such file or directory Summary: 0 Source files used as input" -ok_program "error on bad dir" 123 "$output_good" citrun-check _nonexistent_dir_ +ok_program "error on bad dir" 123 "$output_good" citrun_check _nonexistent_dir_ diff --git a/t/check_empty.sh b/t/check_empty.sh @@ -8,4 +8,4 @@ plan 1 output_good="Summary: 0 Source files used as input" -ok_program "is no logs found message printed" 123 "$output_good" citrun-check . +ok_program "is no logs found message printed" 123 "$output_good" citrun_check diff --git a/t/check_spaces.sh b/t/check_spaces.sh @@ -1,6 +1,6 @@ #!/bin/sh -u # -# Verify citrun-check can handle paths with spaces when counting log file. +# Verify citrun_check can handle paths with spaces when counting log file. # . t/utils.subr plan 2 @@ -9,5 +9,5 @@ plan 2 ok "are dirs with spaces in name created" mkdir dir\ a dir\ b echo "Found source file" > dir\ a/citrun.log echo "Found source file" > dir\ b/citrun.log -ok "is citrun-check successful" citrun-check -#ok "is citrun-check with path successful" citrun-check dir\ a/ +ok "is citrun_check successful" citrun_check +#ok "is citrun_check with path successful" citrun_check dir\ a/ diff --git a/t/e2e_ansi.sh b/t/e2e_ansi.sh @@ -28,8 +28,8 @@ Totals: 3 Total statements EOF -ok "is compile successful" citrun-wrap cc -ansi -o main main.c -ok "is citrun-check exit 0" citrun-check -o check.out +ok "is compile successful" citrun_wrap cc -ansi -o main main.c +ok "is citrun_check exit 0" citrun_check -o check.out strip_millis check.out -ok "is citrun-check output different" diff -u check.good check.out +ok "is citrun_check output different" diff -u check.good check.out diff --git a/t/e2e_basic.sh b/t/e2e_basic.sh @@ -49,11 +49,11 @@ Totals: 7 Binary operators EOF -ok "wrapped source compile" citrun-wrap cc -o fib fib.c -ok "running citrun-check" citrun-check -o check.out +ok "wrapped source compile" citrun_wrap cc -o fib fib.c +ok "running citrun_check" citrun_check -o check.out strip_millis check.out -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out ok_program "fib with no args" 1 "" ./fib ok_program "fib of 10" 0 "55" ./fib 10 diff --git a/t/e2e_stdout.sh b/t/e2e_stdout.sh @@ -30,10 +30,10 @@ Totals: 9 Total statements EOF -ok "wrapped compile" citrun-wrap cc -o hello hello.c +ok "wrapped compile" citrun_wrap cc -o hello hello.c -ok "citrun-check" citrun-check -o check.out +ok "citrun_check" citrun_check -o check.out strip_millis check.out -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out ok_program "stdout compare" 0 "hello, world!" ./hello diff --git a/t/inst_basic_link.sh b/t/inst_basic_link.sh @@ -10,7 +10,7 @@ cat <<EOF > main.c int main(void) { return 0; } EOF -ok "wrapping simple build command" citrun-wrap cc main.c +ok "wrapping simple build command" citrun_wrap cc main.c cat <<EOF > check.good Summary: @@ -26,6 +26,6 @@ Totals: 3 Total statements EOF -ok "running citrun-check" citrun-check -o check.out +ok "running citrun_check" citrun_check -o check.out strip_millis check.out -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/inst_binop.sh b/t/inst_binop.sh @@ -60,11 +60,11 @@ Totals: 1 Binary operators EOF -ok "running citrun-inst" citrun-inst -c enum.c -ok "running citrun-check" citrun-check -o check.out +ok "running citrun_inst" citrun_inst -c enum.c +ok "running citrun_check" citrun_check -o check.out strip_preamble enum.c strip_millis check.out ok "instrumented src file diff" diff -u enum.c.inst_good enum.c.citrun_nohdr -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/inst_dowhile.sh b/t/inst_dowhile.sh @@ -38,11 +38,11 @@ Totals: 1 Binary operators EOF -ok "citrun-inst rewrite" citrun-inst -c while.c -ok "running citrun-check" citrun-check -o check.out +ok "citrun_inst rewrite" citrun_inst -c while.c +ok "running citrun_check" citrun_check -o check.out strip_preamble while.c strip_millis check.out ok "instrumented source diff" diff -u while.c.inst_good while.c.citrun_nohdr -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/inst_fail.sh b/t/inst_fail.sh @@ -8,8 +8,8 @@ plan 4 echo "int main(void) { return 0; " > bad.c -citrun-wrap cc -c bad.c 2> /dev/null -ok "is citrun-wrap exit code 1" test $? -eq 1 +citrun_wrap cc -c bad.c 2> /dev/null +ok "is citrun_wrap exit code 1" test $? -eq 1 cat <<EOF > check.good Summary: @@ -23,6 +23,6 @@ Totals: 3 Total statements EOF -ok "running citrun-check" citrun-check -o check.out +ok "running citrun_check" citrun_check -o check.out strip_millis check.out -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/inst_for.sh b/t/inst_for.sh @@ -37,11 +37,11 @@ Totals: 2 Binary operators EOF -ok "running citrun-inst" citrun-inst -c for.c -ok "running citrun-check" citrun-check -o check.out +ok "running citrun_inst" citrun_inst -c for.c +ok "running citrun_check" citrun_check -o check.out strip_preamble for.c strip_millis check.out ok "known good instrumented diff" diff -u for.c.inst_good for.c.citrun_nohdr -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/inst_funcdef.sh b/t/inst_funcdef.sh @@ -39,11 +39,11 @@ Totals: 1 Total statements EOF -ok "running citrun-inst" citrun-inst -c funcdef.c -ok "running citrun-check" citrun-check -o check.out +ok "running citrun_inst" citrun_inst -c funcdef.c +ok "running citrun_check" citrun_check -o check.out strip_preamble funcdef.c strip_millis check.out ok "known good instrumented diff" diff -u funcdef.c.inst_good funcdef.c.citrun_nohdr -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/inst_if.sh b/t/inst_if.sh @@ -48,11 +48,11 @@ Totals: 2 Binary operators EOF -ok "running citrun-inst" citrun-inst -c if.c -ok "running citrun-check" citrun-check -o check.out +ok "running citrun_inst" citrun_inst -c if.c +ok "running citrun_check" citrun_check -o check.out strip_preamble if.c strip_millis check.out ok "known good instrumented diff" diff -u if.c.inst_good if.c.citrun_nohdr -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/inst_link_multiple.sh b/t/inst_link_multiple.sh @@ -30,8 +30,8 @@ void third_func(void) { } EOF -ok "is compile ok" citrun-wrap cc -o main one.c two.c three.c -ok "running citrun-check" citrun-check -o check.out +ok "is compile ok" citrun_wrap cc -o main one.c two.c three.c +ok "running citrun_check" citrun_check -o check.out cat <<EOF > check.good Summary: @@ -49,4 +49,4 @@ Totals: EOF strip_millis check.out -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/inst_log.sh b/t/inst_log.sh @@ -1,7 +1,7 @@ #!/bin/sh -u # # 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_check relies on this output, and citrun_check is used quite a bit. # . t/utils.subr plan 3 @@ -31,15 +31,14 @@ main(int argc, char *argv[]) } EOF -ok "is compile ok" citrun-wrap cc -c main.c -ok "is link ok" citrun-wrap cc -o main main.o +ok "is compile ok" citrun_wrap cc -c main.c +ok "is link ok" citrun_wrap cc -o main main.o strip_log citrun.log cat <<EOF > citrun.log.good ->> citrun-inst v0.0 () +>> citrun_inst v0.0 () CITRUN_SHARE = '' -Switching argv[0] '' PATH='' Found source file '' Modified command line is '' @@ -57,9 +56,8 @@ Rewriting successful. Forked compiler '' Rewritten source compile successful Restored '' ->> citrun-inst v0.0 () +>> citrun_inst v0.0 () CITRUN_SHARE = '' -Switching argv[0] '' PATH='' Link detected, adding '' to command line. Modified command line is '' diff --git a/t/inst_macro.sh b/t/inst_macro.sh @@ -37,11 +37,11 @@ Totals: 7 Total statements EOF -ok "running citrun-inst" citrun-inst -c macro.c -ok "running citrun-check" citrun-check -o check.out +ok "running citrun_inst" citrun_inst -c macro.c +ok "running citrun_check" citrun_check -o check.out strip_preamble macro.c strip_millis check.out ok "known good instrumented diff" diff -u macro.c.inst_good macro.c.citrun_nohdr -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/inst_path.sh b/t/inst_path.sh @@ -12,11 +12,11 @@ alias expr=`which expr` alias rm=`which rm` unset PATH -output_good='citrun-inst: Error: PATH is not set.' -ok_program "run citrun-inst as cc with no PATH" 1 "$output_good" \ +output_good='citrun_inst: Error: PATH is not set.' +ok_program "run citrun_inst as cc with no PATH" 1 "$output_good" \ $treedir/src/cc -c nomatter.c export PATH="" -output_good="citrun-inst: Error: CITRUN_SHARE not in PATH." -ok_program "run citrun-inst as cc with empty PATH" 1 "$output_good" \ +output_good="citrun_inst: Error: CITRUN_SHARE not in PATH." +ok_program "run citrun_inst as cc with empty PATH" 1 "$output_good" \ $treedir/src/cc -c nomatter.c 2> /dev/null diff --git a/t/inst_preamble.sh b/t/inst_preamble.sh @@ -7,7 +7,7 @@ plan 3 touch preamble.c -ok "running citrun-inst" citrun-inst -c preamble.c +ok "running citrun_inst" citrun_inst -c preamble.c cat <<EOF > preamble.c.good #ifdef __cplusplus diff --git a/t/inst_preprocess.sh b/t/inst_preprocess.sh @@ -8,18 +8,16 @@ plan 3 echo "int main(void) { return 0; }" > prepro.c -ok "wrapping compile w/ preprocessor arg -E" citrun-wrap cc -E prepro.c -ok "wrapping compile w/ preprocessor arg -MM" citrun-wrap cc -E prepro.c +ok "wrapping compile w/ preprocessor arg -E" citrun_wrap cc -E prepro.c +ok "wrapping compile w/ preprocessor arg -MM" citrun_wrap cc -E prepro.c cat <<EOF > citrun.log.good ->> citrun-inst v0.0 () +>> citrun_inst v0.0 () CITRUN_SHARE = '' -Switching argv[0] '' PATH='' Preprocessor argument found ->> citrun-inst v0.0 () +>> citrun_inst v0.0 () CITRUN_SHARE = '' -Switching argv[0] '' PATH='' Preprocessor argument found EOF diff --git a/t/inst_return.sh b/t/inst_return.sh @@ -48,11 +48,11 @@ Totals: 1 Binary operators EOF -ok "running citrun-inst" citrun-inst -c return.c -ok "running citrun-check" citrun-check -o check.out +ok "running citrun_inst" citrun_inst -c return.c +ok "running citrun_check" citrun_check -o check.out strip_preamble return.c strip_millis check.out ok "instrumented src diff" diff -u return.c.inst_good return.c.citrun_nohdr -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/inst_src_ext.sh b/t/inst_src_ext.sh @@ -7,11 +7,11 @@ plan 8 touch main.{c,cc,cxx,cpp,C} -ok "extension .c" citrun-wrap cc -c main.c -ok "extension .cc" citrun-wrap c++ -c main.cc -ok "extension .cxx" citrun-wrap c++ -c main.cxx -ok "extension .cpp" citrun-wrap c++ -c main.cpp -ok "extension .C (not supported)" citrun-wrap c++ -c main.C +ok "extension .c" citrun_wrap cc -c main.c +ok "extension .cc" citrun_wrap c++ -c main.cc +ok "extension .cxx" citrun_wrap c++ -c main.cxx +ok "extension .cpp" citrun_wrap c++ -c main.cpp +ok "extension .C (not supported)" citrun_wrap c++ -c main.C cat <<EOF > check.good Summary: @@ -23,6 +23,6 @@ Totals: 4 Lines of source code EOF -ok "citrun-check" citrun-check -o check.out +ok "citrun_check" citrun_check -o check.out strip_millis check.out -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/inst_switch.sh b/t/inst_switch.sh @@ -49,11 +49,11 @@ Totals: 14 Total statements EOF -ok "citrun-inst" citrun-inst -c switch.c -ok "citrun-check" citrun-check -o check.out +ok "citrun_inst" citrun_inst -c switch.c +ok "citrun_check" citrun_check -o check.out strip_preamble switch.c strip_millis check.out -ok "citrun-inst output diff" diff -u switch.c.inst_good switch.c.citrun_nohdr -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_inst output diff" diff -u switch.c.inst_good switch.c.citrun_nohdr +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/inst_two_src.sh b/t/inst_two_src.sh @@ -33,8 +33,8 @@ Totals: 6 Total statements EOF -ok "citrun-wrap compile" citrun-wrap cc -o main main.c other.c -ok "citrun-check" citrun-check -o check.out +ok "citrun_wrap compile" citrun_wrap cc -o main main.c other.c +ok "citrun_check" citrun_check -o check.out strip_millis check.out -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/inst_while.sh b/t/inst_while.sh @@ -40,11 +40,11 @@ Totals: 2 Binary operators EOF -ok "citrun-inst" citrun-inst -c while.c -ok "citrun-check" citrun-check -o check.out +ok "citrun_inst" citrun_inst -c while.c +ok "citrun_check" citrun_check -o check.out strip_preamble while.c strip_millis check.out -ok "citrun-inst diff" diff -u while.c.inst_good while.c.citrun_nohdr -ok "citrun-check diff" diff -u check.good check.out +ok "citrun_inst diff" diff -u while.c.inst_good while.c.citrun_nohdr +ok "citrun_check diff" diff -u check.good check.out diff --git a/t/lib_badver.sh b/t/lib_badver.sh @@ -21,5 +21,5 @@ EOF ok "is compiled" cc -o main main.c -output_good="main: libcitrun-0.0: incompatible version 0.255, try cleaning and rebuilding your project" +output_good="main: libcitrun 0.0: incompatible version 0.255, try cleaning and rebuilding your project" ok_program "running fake node" 1 "$output_good" ./main diff --git a/t/term_basic.t b/t/term_basic.t @@ -5,7 +5,7 @@ use test::project; my $project = test::project->new(); -my $exp = Expect->spawn("citrun-term"); +my $exp = Expect->spawn("citrun_term"); my $waiting = "Waiting for connection on $ENV{CITRUN_SOCKET}"; ok(1) if (defined $exp->expect(undef, ($waiting))); diff --git a/t/utils.pm b/t/utils.pm @@ -10,7 +10,7 @@ sub new { $ENV{CITRUN_PROCDIR} = "$tmp_dir/procdir/"; copy($_, $tmp_dir) while (<t/program/*>); - system("src/citrun-wrap make -C $tmp_dir"); + system("src/citrun_wrap make -C $tmp_dir"); return $tmp_dir; } diff --git a/t/wrap_badarg.sh b/t/wrap_badarg.sh @@ -1,9 +1,9 @@ #!/bin/sh -u # -# Make sure calling citrun-wrap with arguments fails. +# Make sure calling citrun_wrap with arguments fails. # . t/utils.subr plan 1 -output_good="usage: citrun-wrap <build cmd>" -ok_program "citrun-wrap -ASD" 1 "$output_good" citrun-wrap -ASD +output_good="usage: citrun_wrap <build cmd>" +ok_program "citrun_wrap -ASD" 1 "$output_good" citrun_wrap -ASD diff --git a/t/wrap_badsrc.sh b/t/wrap_badsrc.sh @@ -6,9 +6,9 @@ plan 4 -output_good="citrun-inst: stat: No such file or directory" -ok_program "is citrun-wrap failing" 1 "$output_good" citrun-wrap cc -o main main.c -ok "is citrun-check successful" citrun-check -o check.out +output_good="citrun_inst: stat: No such file or directory" +ok_program "is citrun_wrap failing" 1 "$output_good" citrun_wrap cc -o main main.c +ok "is citrun_check successful" citrun_check -o check.out cat <<EOF > check.good Summary: @@ -19,4 +19,4 @@ Totals: EOF strip_millis check.out -ok "is citrun-check output identical" diff -u check.good check.out +ok "is citrun_check output identical" diff -u check.good check.out diff --git a/t/wrap_cmake.sh b/t/wrap_cmake.sh @@ -21,11 +21,11 @@ project (program) add_executable(program main.c) EOF -ok "is cmake successful" citrun-wrap cmake . +ok "is cmake successful" citrun_wrap cmake . find . -name citrun.log -print0 | xargs -0 rm -ok "is make (from cmake) successful" citrun-wrap make -ok "is citrun-check successful" citrun-check -o check.out +ok "is make (from cmake) successful" citrun_wrap make +ok "is citrun_check successful" citrun_check -o check.out cat <<EOF > check.good Summary: @@ -42,7 +42,7 @@ Totals: EOF strip_millis check.out -ok "is citrun-check output identical" diff -u check.good check.out +ok "is citrun_check output identical" diff -u check.good check.out ok "does compiled program run" ./program ok "is runtime shared memory file created" test -f procdir/program_* diff --git a/t/wrap_exitcode.sh b/t/wrap_exitcode.sh @@ -1,10 +1,10 @@ #!/bin/sh -u # -# Make sure that citrun-wrap exits with the same code as the native build. +# Make sure that citrun_wrap exits with the same code as the native build. # . t/utils.subr plan 1 output_good="ls: asdfasdfsaf: No such file or directory" -ok_program "build command exit code" 1 "$output_good" citrun-wrap ls asdfasdfsaf +ok_program "build command exit code" 1 "$output_good" citrun_wrap ls asdfasdfsaf diff --git a/t/wrap_jam.sh b/t/wrap_jam.sh @@ -19,8 +19,8 @@ cat <<EOF > Jamfile Main program : main.c ; EOF -ok "is jam successful" citrun-wrap jam -ok "is citrun-check successful" citrun-check -o check.out +ok "is jam successful" citrun_wrap jam +ok "is citrun_check successful" citrun_check -o check.out cat <<EOF > check.good Summary: @@ -37,7 +37,7 @@ Totals: EOF strip_millis check.out -ok "is citrun-check output identical" diff -u check.good check.out +ok "is citrun_check output identical" diff -u check.good check.out ok "does compiled program run" ./program ok "is runtime shared memory file created" test -f procdir/program_* diff --git a/t/wrap_make.sh b/t/wrap_make.sh @@ -20,8 +20,8 @@ program: main.o cc -o program main.o EOF -ok "is make successful" citrun-wrap make -ok "is citrun-check successful" citrun-check -o check.out +ok "is make successful" citrun_wrap make +ok "is citrun_check successful" citrun_check -o check.out cat <<EOF > check.good Summary: @@ -38,7 +38,7 @@ Totals: EOF strip_millis check.out -ok "is citrun-check output identical" diff -u check.good check.out +ok "is citrun_check output identical" diff -u check.good check.out ok "does compiled program run" ./program ok "is runtime shared memory file created" test -f procdir/program_* diff --git a/t/wrap_ninja.sh b/t/wrap_ninja.sh @@ -26,8 +26,8 @@ build main.o: cc main.c build program: link main.o EOF -ok "is ninja successful" citrun-wrap ninja -ok "is citrun-check successful" citrun-check -o check.out +ok "is ninja successful" citrun_wrap ninja +ok "is citrun_check successful" citrun_check -o check.out cat <<EOF > check.good Summary: @@ -44,7 +44,7 @@ Totals: EOF strip_millis check.out -ok "is citrun-check output identical" diff -u check.good check.out +ok "is citrun_check output identical" diff -u check.good check.out ok "does compiled program run" ./program ok "is runtime shared memory file created" test -f procdir/program_* diff --git a/t/wrap_parallel.sh b/t/wrap_parallel.sh @@ -30,8 +30,8 @@ program4: main4.o cc -o program4 main4.o EOF -ok "is make successful" citrun-wrap make -j4 -ok "is citrun-check successful" citrun-check -o check.out +ok "is make successful" citrun_wrap make -j4 +ok "is citrun_check successful" citrun_check -o check.out cat <<EOF > check.good Summary: @@ -48,7 +48,7 @@ Totals: EOF strip_millis check.out -ok "is citrun-check output identical" diff -u check.good check.out +ok "is citrun_check output identical" diff -u check.good check.out for i in 1 2 3 4; do ok "does compiled program$i run" ./program$i