* [PATCH] test: Set fixed time zone
@ 2010-04-23 7:36 Michal Sojka
2010-04-23 15:33 ` Dirk Hohndel
2010-04-23 20:30 ` Carl Worth
0 siblings, 2 replies; 5+ messages in thread
From: Michal Sojka @ 2010-04-23 7:36 UTC (permalink / raw)
To: notmuch
When the test suite is run in a different time zone that where Carl
lives, some tests may fail depending on the time when the test suite is
run. For example, just now I get:
Search for all messages ("*"):... FAIL
--- test-031.expected 2010-04-23 09:33:47.898634822 +0200
+++ test-031.output 2010-04-23 09:33:47.898634822 +0200
@@ -1,5 +1,5 @@
-thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Test message #6 (inbox unread)
-thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Test message #14 (inbox unread)
+thread:XXX 2001-01-06 [1/1] Notmuch Test Suite; Test message #6 (inbox unread)
+thread:XXX 2001-01-06 [1/1] Notmuch Test Suite; Test message #14 (inbox unread)
thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; body search (inbox unread)
thread:XXX 2000-01-01 [1/1] searchbyfrom; search by from (inbox unread)
thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by to (inbox unread)
By setting a fixed time zone in the test script, these problems should
be eliminated.
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
---
test/notmuch-test | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/test/notmuch-test b/test/notmuch-test
index 2b76f04..f0741e1 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -1,6 +1,8 @@
#!/bin/bash
set -e
+export TZ=UTC+8
+
find_notmuch_binary ()
{
dir=$1
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] test: Set fixed time zone
2010-04-23 7:36 [PATCH] test: Set fixed time zone Michal Sojka
@ 2010-04-23 15:33 ` Dirk Hohndel
2010-04-23 20:30 ` Carl Worth
1 sibling, 0 replies; 5+ messages in thread
From: Dirk Hohndel @ 2010-04-23 15:33 UTC (permalink / raw)
To: Michal Sojka, notmuch
On Fri, 23 Apr 2010 09:36:45 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> When the test suite is run in a different time zone that where Carl
> lives, some tests may fail depending on the time when the test suite is
> run. For example, just now I get:
>
> By setting a fixed time zone in the test script, these problems should
> be eliminated.
The correct fix is of course that all of you need to move to Portland...
:-)
/D
--
Dirk Hohndel
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] test: Set fixed time zone
2010-04-23 7:36 [PATCH] test: Set fixed time zone Michal Sojka
2010-04-23 15:33 ` Dirk Hohndel
@ 2010-04-23 20:30 ` Carl Worth
2010-04-26 10:12 ` [PATCH] test: Comment why we need to set TZ Michal Sojka
1 sibling, 1 reply; 5+ messages in thread
From: Carl Worth @ 2010-04-23 20:30 UTC (permalink / raw)
To: Michal Sojka, notmuch
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
On Fri, 23 Apr 2010 09:36:45 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> When the test suite is run in a different time zone that where Carl
> lives, some tests may fail depending on the time when the test suite is
> run. For example, just now I get:
...
> By setting a fixed time zone in the test script, these problems should
> be eliminated.
Sorry about leaking that part of my environment into the codified test
suite.
I've pushed this fix for now, (though please follow up with some of the
text from the commit message as a comment next to that assignment in the
test-suite script which otherwise seems a bit out-of-place).
Thanks,
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] test: Comment why we need to set TZ
2010-04-23 20:30 ` Carl Worth
@ 2010-04-26 10:12 ` Michal Sojka
2010-04-26 15:06 ` Carl Worth
0 siblings, 1 reply; 5+ messages in thread
From: Michal Sojka @ 2010-04-26 10:12 UTC (permalink / raw)
To: notmuch
---
test/notmuch-test | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/test/notmuch-test b/test/notmuch-test
index 7082344..dc413f7 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -1,6 +1,10 @@
#!/bin/bash
set -e
+# Messages contain time/date values with time zone and notmuch
+# displays them converted to the local time zone. We need to set fixed
+# timezone here so that the output of the tests is always the same
+# without regard to the time zone of where the test suite is run.
export TZ=UTC+8
find_notmuch_binary ()
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] test: Comment why we need to set TZ
2010-04-26 10:12 ` [PATCH] test: Comment why we need to set TZ Michal Sojka
@ 2010-04-26 15:06 ` Carl Worth
0 siblings, 0 replies; 5+ messages in thread
From: Carl Worth @ 2010-04-26 15:06 UTC (permalink / raw)
To: Michal Sojka, notmuch
[-- Attachment #1: Type: text/plain, Size: 456 bytes --]
On Mon, 26 Apr 2010 12:12:13 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> +# Messages contain time/date values with time zone and notmuch
> +# displays them converted to the local time zone. We need to set fixed
> +# timezone here so that the output of the tests is always the same
> +# without regard to the time zone of where the test suite is run.
> export TZ=UTC+8
Perefct. I've pushed this now.
-Carl
--
carl.d.worth@intel.com
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-04-26 15:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-23 7:36 [PATCH] test: Set fixed time zone Michal Sojka
2010-04-23 15:33 ` Dirk Hohndel
2010-04-23 20:30 ` Carl Worth
2010-04-26 10:12 ` [PATCH] test: Comment why we need to set TZ Michal Sojka
2010-04-26 15:06 ` Carl Worth
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).