diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ef0012f5..5fcc3d45b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ -## 2.1.26 (XXXX-XX-XX) +## 2.1.26 (2019-03-14) ### Bug Fixes * Fixed a hardcoded log directory in BugZoo CLI. +* Updated coverage instrumentation to use C90-compatible comments. +* Update coverage instrumentation to support C. ## 2.1.25 (2019-02-09) diff --git a/bugzoo/mgr/coverage/gcov.py b/bugzoo/mgr/coverage/gcov.py index f7296743f..7d0ca1bbe 100644 --- a/bugzoo/mgr/coverage/gcov.py +++ b/bugzoo/mgr/coverage/gcov.py @@ -16,11 +16,15 @@ logger.setLevel(logging.DEBUG) INSTRUMENTATION = ( - "// BUGZOO :: INSTRUMENTATION :: START\n" + "/* BUGZOO :: INSTRUMENTATION :: START */\n" "#include \n" "#include \n" "#include \n" - "extern \"C\" void __gcov_flush(void);\n" + "#ifdef __cplusplus\n" + " extern \"C\" void __gcov_flush(void);\n" + "#else\n" + " void __gcov_flush(void);\n" + "#endif\n" "void bugzoo_sighandler(int sig){\n" " __gcov_flush();\n" " if(sig != SIGUSR1 && sig != SIGUSR2)\n" @@ -40,11 +44,11 @@ " sigaction(SIGBUS, &new_action, NULL);\n" " sigaction(SIGILL, &new_action, NULL);\n" " sigaction(SIGABRT, &new_action, NULL);\n" - " // Use signal for SIGUSR to remove handlers\n" + " /* Use signal for SIGUSR to remove handlers */\n" " signal(SIGUSR1, bugzoo_sighandler);\n" " signal(SIGUSR2, bugzoo_sighandler);\n" "}\n" - "// BUGZOO :: INSTRUMENTATION :: END\n" + "/* BUGZOO :: INSTRUMENTATION :: END */\n" )