This is an archive of the discontinued LLVM Phabricator instance.

[zorg] Lit parser should ignore leading whitespace in log file.
ClosedPublic

Authored by rfoos on Apr 7 2015, 12:46 PM.

Details

Summary

Use case: MSBuild indents Lit test output, and test results are not displayed.

Everything except the Stop RE strips the log line, and this one line change allows indented logs to be displayed.

Diff Detail

Event Timeline

rfoos updated this revision to Diff 23362.Apr 7 2015, 12:46 PM
rfoos updated this revision to Diff 23363.
rfoos retitled this revision from to Lit parser should ignore leading whitespace in log file..
rfoos updated this object.
rfoos edited the test plan for this revision. (Show Details)
rfoos added a subscriber: Unknown Object (MLST).

Drop file not part of change.

rfoos set the repository for this revision to rL LLVM.
rfoos added a project: Restricted Project.
rfoos retitled this revision from Lit parser should ignore leading whitespace in log file. to [zorg] Lit parser should ignore leading whitespace in log file..Apr 7 2015, 1:00 PM
gkistanova accepted this revision.Apr 7 2015, 10:50 PM
gkistanova edited edge metadata.

LGTM with a minor note for line 51.

This revision is now accepted and ready to land.Apr 7 2015, 10:50 PM

It seems my comment to the line 51 was lost in the original message. Sorry for this.
Here it is.

zorg/buildbot/commands/LitTestCommand.py
51

lstrip() if you really want to remove the leading whitespace.

rfoos added inline comments.Apr 8 2015, 11:43 AM
zorg/buildbot/commands/LitTestCommand.py
51

I agree, lstrip is more correct.

strip should to lstrip + rstrip.

I used strip because the StartRE, and TestLineRE also use strip.

m = self.kTestVerboseLogStartRE.match(line.strip())
m = self.kTestLineRE.match(line.strip())

Should I

  • leave the strip on stopRE
  • Change the three RE's to lstrip
  • change only the stopRE to lstrip.
rfoos closed this revision.Apr 8 2015, 4:25 PM