This is an archive of the discontinued LLVM Phabricator instance.

[libFuzzer] Fix coverage tests for Windows.
ClosedPublic

Authored by mpividori on Jan 12 2017, 7:41 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

mpividori updated this revision to Diff 84213.Jan 12 2017, 7:41 PM
mpividori retitled this revision from to [libFuzzer] Fix coverage tests for Windows..
mpividori updated this object.
mpividori added reviewers: kcc, zturner.
mpividori added a subscriber: llvm-commits.
zturner added inline comments.Jan 13 2017, 10:20 AM
lib/Fuzzer/test/coverage.test
6 ↗(On Diff #84213)

A couple of alternatives:

  1. Check whether this line would work: CHECK: COVERED_DIRS: %S
  1. Use %{pathsep} instead of the regex. CHECK: COVERED_DIRS: {{.*}}lib%{pathsep}Fuzzer%{pathsep}test

The first would be ideal, but if the output only prints a relative path and not an absolute path, it won't work since %S uses an absolute path.

@zturner, Great to know that I can use: %{pathsep} , I looked for something similar in the documentation but I didn't find it. Thanks.

mpividori added inline comments.Jan 17 2017, 8:45 PM
lib/Fuzzer/test/coverage.test
6 ↗(On Diff #84213)

@zturner I think we need to use {{[/\\]}}. I see that many tests use that. We can't use %S and %{pathsep}, because they can only be used inside RUN: lines, because they are replaced by lit, not by FileCheck.

zturner accepted this revision.Jan 17 2017, 8:52 PM

Thanks for trying. lgtm

This revision is now accepted and ready to land.Jan 17 2017, 8:52 PM
This revision was automatically updated to reflect the committed changes.