]> Cypherpunks.ru repositories - goredo.git/commitdiff
Do not depend on Python for testing v2.6.1
authorSergey Matveev <stargrave@stargrave.org>
Mon, 19 Feb 2024 17:24:31 +0000 (20:24 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Mon, 19 Feb 2024 17:57:09 +0000 (20:57 +0300)
doc/news.texi
t/apenwarr/101-atime/atime2.do
t/apenwarr/101-atime/tick.py [deleted file]
t/apenwarr/130-mode/all.do
usage.go

index 9859401eeffa59144d4d8b97be8b7186e2118332..f6bcdd55bca333f66528917bc42e4772c2c734ed 100644 (file)
@@ -2,6 +2,13 @@
 @cindex news
 @unnumbered News
 
+@anchor{Release 2_6_1}
+@section Release 2.6.1
+@itemize
+@item
+    Tests do not depend on Python or Git.
+@end itemize
+
 @anchor{Release 2_6_0}
 @section Release 2.6.0
 @itemize
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
diff --git a/t/apenwarr/101-atime/tick.py b/t/apenwarr/101-atime/tick.py
deleted file mode 100644 (file)
index 04a0b04..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-import time
-t2 = int(time.time()) + 1.0
-while 1:
-    t = time.time()
-    if t >= t2: break
-    time.sleep(t2 - t + 0.01)
index 5e0fbe90969ffde7570295a340b91e6d126874ab..2bd0b06038834ea1bcc45d82b5748e58c7ce729f 100644 (file)
@@ -1,5 +1,4 @@
 umask 0022
 redo mode1
-MODE=$(${PYTHON:-python} -c \
-       'import os; print(oct(os.stat("mode1").st_mode & 0o7777))')
-[ "$MODE" = "0644" -o "$MODE" = "0o644" ] || exit 78
+MODE=$(perl -e '@s=stat "mode1"; printf "%04o", $s[2] & 07777')
+[ "$MODE" = "0644" ] || exit 78
index 6e8d4de2b0f68943637e0a6acb872945624d393d..566bca57fe90f5ab001e7369e0a7558063d0f1f0 100644 (file)
--- a/usage.go
+++ b/usage.go
@@ -22,7 +22,7 @@ import (
 )
 
 const (
-       Version  = "2.6.0"
+       Version  = "2.6.1"
        Warranty = `Copyright (C) 2020-2024 Sergey Matveev
 
 This program is free software: you can redistribute it and/or modify