From 94d0e21eede63b125ed9b6df4b8e84d014919531 Mon Sep 17 00:00:00 2001 From: Premek Vysoky Date: Thu, 20 May 2021 16:49:48 +0200 Subject: [PATCH] Remove empty XHarness logs --- .../Sdk/tools/xharness-runner/xharness-runner.apple.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-runner.apple.sh b/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-runner.apple.sh index 58264b2ed74..8bbe9428f41 100644 --- a/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-runner.apple.sh +++ b/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/xharness-runner.apple.sh @@ -81,6 +81,10 @@ if [ -z "$targets" ]; then die "No targets were provided"; fi +if [ -z "$output_directory" ]; then + die "No output directory provided"; +fi + if [ -z "$xharness_cli_path" ]; then die "XHarness path wasn't provided"; fi @@ -156,6 +160,9 @@ fi # The simulator logs comming from the sudo-spawned Simulator.app are not readable by the helix uploader chmod 0644 "$output_directory"/*.log +# Remove empty files +find "$output_directory" -name "*.log" -maxdepth 1 -size 0 -print -delete + if [ "$command" == 'test' ]; then test_results=$(ls "$output_directory"/xunit-*.xml)