]> Cypherpunks.ru repositories - goredo.git/blobdiff - t/apenwarr/101-atime/atime2.do
Do not depend on Python for testing
[goredo.git] / t / apenwarr / 101-atime / atime2.do
index f77931eab7f0d26d0e9c4ea12503e573bf0e3032..f5ce80ec4264bb87d6fad44578a210f5af2a0943 100644 (file)
@@ -1,6 +1,13 @@
 # make sure redo doesn't think merely *reading* the old file counts as
 # modifying it in-place.
 cat $1 >/dev/null 2>/dev/null || true
-${PYTHON:-python} tick.py
+perl -mTime::HiRes -e '
+    $t2 = 1 + int(Time::HiRes::time());
+    while (1) {
+        $t = Time::HiRes::time();
+        last if $t > $t2;
+        sleep($t2 - $t + 0.01);
+    };
+'
 cat $1 >/dev/null 2>/dev/null || true
 echo hello