Author: chapuni
Date: Wed Jul 12 19:06:30 2017
New Revision: 307876

URL: http://llvm.org/viewvc/llvm-project?rev=307876&view=rev
Log:
clang-tools-extra/test/clang-tidy/performance-unnecessary-value-param-header.cpp:
 Resolve flakiness in the test.

Tests would go flaky if;
1. Using %T (not %t)
2. Put a file with common name like header.h into %T
3. Other tests (eg. misc-unused-parameters.cpp) are doing as well

We should avoid using %T unless it really makes sense.

Modified:
    
clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param-header.cpp

Modified: 
clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param-header.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param-header.cpp?rev=307876&r1=307875&r2=307876&view=diff
==============================================================================
--- 
clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param-header.cpp
 (original)
+++ 
clang-tools-extra/trunk/test/clang-tidy/performance-unnecessary-value-param-header.cpp
 Wed Jul 12 19:06:30 2017
@@ -1,6 +1,8 @@
-// RUN: cp %S/Inputs/performance-unnecessary-value-param/header.h %T/header.h
-// RUN: %check_clang_tidy %s performance-unnecessary-value-param %t -- -- 
-std=c++11 -I %T
-// RUN: diff %T/header.h 
%S/Inputs/performance-unnecessary-value-param/header-fixed.h
+// RUN: rm -rf %t
+// RUN: mkdir %t
+// RUN: cp %S/Inputs/performance-unnecessary-value-param/header.h %t/header.h
+// RUN: %check_clang_tidy %s performance-unnecessary-value-param %t/temp -- -- 
-std=c++11 -I %t
+// RUN: diff %t/header.h 
%S/Inputs/performance-unnecessary-value-param/header-fixed.h
 
 #include "header.h"
 


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to