[PATCH] test: Set fixed time zone

2010-04-23 Thread Carl Worth
On Fri, 23 Apr 2010 09:36:45 +0200, Michal Sojka  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
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 



[PATCH] test: Set fixed time zone

2010-04-23 Thread Michal Sojka
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 
---
 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



[PATCH] test: Set fixed time zone

2010-04-23 Thread Michal Sojka
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 sojk...@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

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] test: Set fixed time zone

2010-04-23 Thread Dirk Hohndel
On Fri, 23 Apr 2010 09:36:45 +0200, Michal Sojka sojk...@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
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] test: Set fixed time zone

2010-04-23 Thread Carl Worth
On Fri, 23 Apr 2010 09:36:45 +0200, Michal Sojka sojk...@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


pgpT9rCTzc9wU.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch