Don't create dumpling list file unless there are actually dumps.
authorAditya Mandaleeka <adityam@microsoft.com>
Fri, 19 Aug 2016 02:35:45 +0000 (19:35 -0700)
committerAditya Mandaleeka <adityam@microsoft.com>
Fri, 19 Aug 2016 19:09:18 +0000 (12:09 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/3dedd1a9ad5a99be59d7e4cdb5aec75b4cfafa40

src/coreclr/tests/runtest.sh

index 9368663..a55ee3c 100755 (executable)
@@ -120,9 +120,8 @@ esac
 dumplingsListPath="$PWD/dumplings.txt"
 if [ -f "$dumplingsListPath" ]; then
     rm "$dumplingsListPath"
-fi  
+fi
 
-touch $dumplingsListPath
 find . -type f -name "local_dumplings.txt" -exec rm {} \;
 
 function xunit_output_begin {
@@ -1158,7 +1157,11 @@ print_results
 echo "constructing $dumplingsListPath"
 find . -type f -name "local_dumplings.txt" -exec cat {} \; > $dumplingsListPath
 
-cat $dumplingsListPath
+if [ -s $dumplingsListPath ]; then
+    cat $dumplingsListPath
+else
+    rm $dumplingsListPath
+fi
 
 time_end=$(date +"%s")
 time_diff=$(($time_end-$time_start))