Raymond Toy pushed to branch issue-460-ci-fails-if-unit-tests-do at cmucl / cmucl Commits: ef57f813 by Raymond Toy at 2025-12-18T16:29:42-08:00 Cleanups for Darwin timestamp test In run-unit-tests.sh, only run `touch` if we know (or assume) it will work. This doesn't work on MacOS 10.13. This gets rid of annoying error message on osx. In tests/os.lisp, we forgot to enable the 2106 timestamp test just for Linux. It was erroneously being run on osx. - - - - - 2 changed files: - bin/run-unit-tests.sh - tests/os.lisp Changes: ===================================== bin/run-unit-tests.sh ===================================== @@ -47,12 +47,19 @@ mkdir test-tmp ln -s /bin/ls test-tmp/ls-link # Set the timestamps on 64-bit-timestamp-2038.txt and -# 64-bit-timestamp-2106.txt. The time for the first file is a -# negative value for a 32-bit time_t. The second file won't fit in a -# 32-bit time_t value. It's ok if this doesn't work in general, as -# long as it works on Linux for the stat test in tests/os.lisp. -touch -d "1 April 2038" tests/resources/64-bit-timestamp-2038.txt -touch -d "1 April 2106" tests/resources/64-bit-timestamp-2106.txt +# 64-bit-timestamp-2106.txt, but only for OSes where we know this +# works. (This is so we don't an annoying error message from touch +# that doesn't accept the -d option, like MacOS 10.13.) The time for +# the first file is a negative value for a 32-bit time_t. The second +# file won't fit in a 32-bit time_t value. It's ok if this doesn't +# work in general, as long as it works on Linux for the stat test in +# tests/os.lisp. +case `uname -s` in + Linux) + touch -d "1 April 2038" tests/resources/64-bit-timestamp-2038.txt + touch -d "1 April 2106" tests/resources/64-bit-timestamp-2106.txt + ;; +esac # Cleanup temp files and directories that we created during testing. function cleanup { ===================================== tests/os.lisp ===================================== @@ -51,6 +51,7 @@ (assert-equal 2153718000 st-atime) (assert-equal 2153718000 st-mtime)))) +#+linux (define-test stat.64-bit-timestamp-2106 (:tag :issues) (let ((test-file #.(merge-pathnames "resources/64-bit-timestamp-2106.txt" View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/ef57f81386e5d2ae451b0dfa... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/ef57f81386e5d2ae451b0dfa... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)