Skip to content

Commit

Permalink
Issue #248: bash-engine: No need to filter stdout with xtrace fd support
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonKagstrom committed May 19, 2018
1 parent a14fad3 commit ad17136
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/engines/bash-engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ class BashEngine : public ScriptEngineBase
// Printout lines to stdout, except kcov markers
void handleStdout()
{
// No need if we have xtrace fd support
if (m_bashSupportsXtraceFd)
{
return;
}

char *curLine = NULL;
size_t linecap = 0;

Expand All @@ -430,7 +436,7 @@ class BashEngine : public ScriptEngineBase
* For some reason, redirection sometimes give kkcov@..., so filter that
* in addition to the obvious stuff
*/
size_t kcovMarker = m_bashSupportsXtraceFd ? -1 : std::string(curLine).find("kcov@");
size_t kcovMarker = std::string(curLine).find("kcov@");

if (kcovMarker != 0 && kcovMarker != 1)
{
Expand Down

0 comments on commit ad17136

Please sign in to comment.