Add sleep before looking for dump (#39217)
authorDan Moseley <danmose@microsoft.com>
Tue, 14 Jul 2020 19:19:58 +0000 (12:19 -0700)
committerGitHub <noreply@github.com>
Tue, 14 Jul 2020 19:19:58 +0000 (12:19 -0700)
* Add sleep before looking for dump

* Enable helix only

* typo

eng/testing/RunnerTemplate.sh [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 80b496e..dbd5f47
@@ -170,7 +170,14 @@ fi
 # ======================= BEGIN Core File Inspection =========================
 pushd $EXECUTION_DIR >/dev/null
 if [[ "$(uname -s)" == "Linux" && $test_exitcode -ne 0 ]]; then
-  echo Looking around for any Linux dump...
+  if [ -n "$HELIX_WORKITEM_PAYLOAD" ]; then
+     have_sleep=$(which sleep)
+     if [ -x "$have_sleep" ]; then
+         echo Waiting a few seconds for any dump to be written..
+          sleep 10s
+     fi
+  fi
+  echo Looking around for any Linux dump..
   # Depending on distro/configuration, the core files may either be named "core"
   # or "core.<PID>" by default. We read /proc/sys/kernel/core_uses_pid to 
   # determine which it is.