Skip to content

Commit

Permalink
debug output for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
martinus committed Oct 9, 2023
1 parent 35fe17e commit c1c8646
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/fuzz/run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ auto env(char const* varname) -> std::optional<std::string> {
auto p = std::filesystem::current_path();
while (true) {
auto const filename = p / ".fuzz-corpus-base-dir";
fmt::print("trying '{}'\n", filename.string());
if (std::filesystem::exists(filename)) {
if (auto file_content = read_file(p / ".fuzz-corpus-base-dir"); file_content) {
auto f = std::filesystem::path(file_content.value()).make_preferred();
fmt::print("got it! p='{}, f='{}', p/f='{}'\n", p.string(), f.string(), (p / f).string());
return p / f;
}
// could not read file
Expand Down

0 comments on commit c1c8646

Please sign in to comment.