From: Sergey Matveev Date: Mon, 19 Feb 2024 17:24:31 +0000 (+0300) Subject: Do not depend on Python for testing X-Git-Tag: v2.6.1^0 X-Git-Url: http://www.git.cypherpunks.ru/?p=goredo.git;a=commitdiff_plain;h=5a13299ef31c771042764491c6826b587274b169 Do not depend on Python for testing --- diff --git a/doc/news.texi b/doc/news.texi index 9859401..f6bcdd5 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -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 diff --git a/t/apenwarr/101-atime/atime2.do b/t/apenwarr/101-atime/atime2.do index f77931e..f5ce80e 100644 --- a/t/apenwarr/101-atime/atime2.do +++ b/t/apenwarr/101-atime/atime2.do @@ -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 index 04a0b04..0000000 --- a/t/apenwarr/101-atime/tick.py +++ /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) diff --git a/t/apenwarr/130-mode/all.do b/t/apenwarr/130-mode/all.do index 5e0fbe9..2bd0b06 100644 --- a/t/apenwarr/130-mode/all.do +++ b/t/apenwarr/130-mode/all.do @@ -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 diff --git a/usage.go b/usage.go index 6e8d4de..566bca5 100644 --- 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