diff options
author | Mathieu Lirzin <mthl@gnu.org> | 2018-03-20 14:33:56 +0100 |
---|---|---|
committer | Mathieu Lirzin <mthl@gnu.org> | 2018-03-20 19:25:28 +0100 |
commit | 09e452b62a82845736e638eecd762a911d95a349 (patch) | |
tree | ac51f0fd973352ee55c823e5d8ac3c83b1d31123 | |
parent | 44f4fab6414e15b49a6f7dc5bba0e3ab8e9e0a87 (diff) | |
download | mcron-09e452b62a82845736e638eecd762a911d95a349.tar.gz mcron-09e452b62a82845736e638eecd762a911d95a349.tar.bz2 mcron-09e452b62a82845736e638eecd762a911d95a349.zip |
tests: Set timezone in "schedule.sh"
Previously the test environment was implicitly expecting the current
timezone to be UTC+1.
* tests/schedule.sh: Set TZ environment variable to 'UTC0'.
Update expected result.
Reported-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r-- | tests/schedule.sh | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/tests/schedule.sh b/tests/schedule.sh index ad267c4..5ea79e5 100644 --- a/tests/schedule.sh +++ b/tests/schedule.sh @@ -1,5 +1,5 @@ # schedule.sh -- Check mcron schedule output -# Copyright © 2017 Mathieu Lirzin <mthl@gnu.org> +# Copyright © 2017, 2018 Mathieu Lirzin <mthl@gnu.org> # # This file is part of GNU Mcron. # @@ -18,9 +18,14 @@ source "${srcdir}/tests/init.sh" +# Use UTC and SOURCE_DATE_EPOCH to get reproducible result. + SOURCE_DATE_EPOCH=1 export SOURCE_DATE_EPOCH +TZ=UTC0 +export TZ + # Use current working directory to store mcron files XDG_CONFIG_HOME=`pwd` export XDG_CONFIG_HOME @@ -35,83 +40,83 @@ cat > cron/bar.guile <<EOF EOF cat > expected <<EOF -Thu Jan 1 01:00:01 1970 +0100 +Thu Jan 1 00:00:01 1970 +0000 (display foo ) -Thu Jan 1 01:00:01 1970 +0100 +Thu Jan 1 00:00:01 1970 +0000 (display bar ) -Thu Jan 1 01:00:02 1970 +0100 +Thu Jan 1 00:00:02 1970 +0000 (display foo ) -Thu Jan 1 01:00:02 1970 +0100 +Thu Jan 1 00:00:02 1970 +0000 (display bar ) -Thu Jan 1 01:00:03 1970 +0100 +Thu Jan 1 00:00:03 1970 +0000 (display foo ) -Thu Jan 1 01:00:03 1970 +0100 +Thu Jan 1 00:00:03 1970 +0000 (display bar ) -Thu Jan 1 01:00:04 1970 +0100 +Thu Jan 1 00:00:04 1970 +0000 (display foo ) -Thu Jan 1 01:00:04 1970 +0100 +Thu Jan 1 00:00:04 1970 +0000 (display bar ) -Thu Jan 1 01:00:05 1970 +0100 +Thu Jan 1 00:00:05 1970 +0000 (display foo ) -Thu Jan 1 01:00:05 1970 +0100 +Thu Jan 1 00:00:05 1970 +0000 (display bar ) -Thu Jan 1 01:00:06 1970 +0100 +Thu Jan 1 00:00:06 1970 +0000 (display foo ) -Thu Jan 1 01:00:06 1970 +0100 +Thu Jan 1 00:00:06 1970 +0000 (display bar ) -Thu Jan 1 01:00:07 1970 +0100 +Thu Jan 1 00:00:07 1970 +0000 (display foo ) -Thu Jan 1 01:00:07 1970 +0100 +Thu Jan 1 00:00:07 1970 +0000 (display bar ) -Thu Jan 1 01:00:08 1970 +0100 +Thu Jan 1 00:00:08 1970 +0000 (display foo ) -Thu Jan 1 01:00:08 1970 +0100 +Thu Jan 1 00:00:08 1970 +0000 (display bar ) -Thu Jan 1 01:00:09 1970 +0100 +Thu Jan 1 00:00:09 1970 +0000 (display foo ) -Thu Jan 1 01:00:09 1970 +0100 +Thu Jan 1 00:00:09 1970 +0000 (display bar ) -Thu Jan 1 01:00:10 1970 +0100 +Thu Jan 1 00:00:10 1970 +0000 (display foo ) -Thu Jan 1 01:00:10 1970 +0100 +Thu Jan 1 00:00:10 1970 +0000 (display bar ) |