From 537b3f6cb1c032c992de16991a01e99a06f5e4bb Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 26 Sep 2020 07:22:17 +0200 Subject: [PATCH] tests/exec: Wait after writing to a file before executing it Otherwise we might get "text file is busy", or worse no error at all. Hoping .2 seconds is enough here. --- tests/checks/exec.fish | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/checks/exec.fish b/tests/checks/exec.fish index 656156dce..f86c80d8f 100644 --- a/tests/checks/exec.fish +++ b/tests/checks/exec.fish @@ -13,6 +13,8 @@ echo "neg failed: $status" set -l f (mktemp) echo "#!/bin/sh"\r\n"echo foo" > $f chmod +x $f +# Cheesy sleep to avoid "text file is busy" +sleep 0.2 $f #CHECKERR: Failed to execute process '{{.*}}'. Reason: #CHECKERR: The file uses windows line endings (\r\n). Run dos2unix or similar to fix it.