Skip to content

Commit

Permalink
[flang][driver] Make the names of files created in unit tests unique …
Browse files Browse the repository at this point in the history
…(nfc)

Using files with identical names leads to unexpected failures when tests
are run in parallel. This is tricky to reproduce, but has been happening
on some buildbots since merging https://reviews.llvm.org/D92854. In that
patch I added a unit test with a non-unique test file. This patch fixes
that.
  • Loading branch information
banach-space committed Dec 21, 2020
1 parent 5e273b8 commit d6abd73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flang/unittests/Frontend/FrontendActionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using namespace Fortran::frontend;
namespace {

TEST(FrontendAction, PrintPreprocessedInput) {
std::string inputFile = "test-file.f";
std::string inputFile = "pp-test-file.f";
std::error_code ec;

// 1. Create the input file for the file manager
Expand Down Expand Up @@ -78,7 +78,7 @@ TEST(FrontendAction, PrintPreprocessedInput) {
}

TEST(FrontendAction, ParseSyntaxOnly) {
std::string inputFile = "test-file.f";
std::string inputFile = "syntax-only-test-file.f";
std::error_code ec;

// 1. Create the input file for the file manager
Expand Down

0 comments on commit d6abd73

Please sign in to comment.