From d6abd7317a269dc7d0204edb8e98f8fcc1a18a2f Mon Sep 17 00:00:00 2001 From: Andrzej Warzynski Date: Mon, 21 Dec 2020 11:09:06 +0000 Subject: [PATCH] [flang][driver] Make the names of files created in unit tests unique (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. --- flang/unittests/Frontend/FrontendActionTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flang/unittests/Frontend/FrontendActionTest.cpp b/flang/unittests/Frontend/FrontendActionTest.cpp index 78161f691eff..b49b7312525a 100644 --- a/flang/unittests/Frontend/FrontendActionTest.cpp +++ b/flang/unittests/Frontend/FrontendActionTest.cpp @@ -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 @@ -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