aboutgitcodebugslistschat
path: root/test/lib/util
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/util')
-rwxr-xr-xtest/lib/util8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lib/util b/test/lib/util
index dee6c8d..c1b3262 100755
--- a/test/lib/util
+++ b/test/lib/util
@@ -123,3 +123,11 @@ get_info_cols() {
__j=$((__j + 1))
done
}
+
+# wait_for() - Retry a command until it succeeds
+# $@: Command to run
+wait_for() {
+ while ! "$@"; do
+ sleep 0.1 || sleep 1
+ done
+}