Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 0f / b9a28695c016d128958a49179507fd1c760f79
1 Return-Path: <too@guru-group.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5  by arlo.cworth.org (Postfix) with ESMTP id E9A1E6DE00EB\r
6  for <notmuch@notmuchmail.org>; Wed, 25 May 2016 14:37:54 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.255\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.255 tagged_above=-999 required=5 tests=[AWL=0.264, \r
12  HEADER_FROM_DIFFERENT_DOMAINS=0.001, T_RP_MATCHES_RCVD=-0.01]\r
13  autolearn=disabled\r
14 Received: from arlo.cworth.org ([127.0.0.1])\r
15  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
16  with ESMTP id XeoJVzaoPPst for <notmuch@notmuchmail.org>;\r
17  Wed, 25 May 2016 14:37:47 -0700 (PDT)\r
18 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
19  by arlo.cworth.org (Postfix) with ESMTP id 14F8B6DE01F7\r
20  for <notmuch@notmuchmail.org>; Wed, 25 May 2016 14:37:47 -0700 (PDT)\r
21 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
22  id 2D7101000DF; Thu, 26 May 2016 00:37:43 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: notmuch@notmuchmail.org\r
25 Cc: tomi.ollila@iki.fi\r
26 Subject: [PATCH 2/2] test: test_python: set PYTHONPATH to the python execution\r
27  environment\r
28 Date: Thu, 26 May 2016 00:37:41 +0300\r
29 Message-Id: <1464212261-26892-2-git-send-email-tomi.ollila@iki.fi>\r
30 X-Mailer: git-send-email 2.8.2\r
31 In-Reply-To: <1464212261-26892-1-git-send-email-tomi.ollila@iki.fi>\r
32 References: <1464212261-26892-1-git-send-email-tomi.ollila@iki.fi>\r
33 X-BeenThere: notmuch@notmuchmail.org\r
34 X-Mailman-Version: 2.1.20\r
35 Precedence: list\r
36 List-Id: "Use and development of the notmuch mail system."\r
37  <notmuch.notmuchmail.org>\r
38 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
39  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
41 List-Post: <mailto:notmuch@notmuchmail.org>\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
43 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
44  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
45 X-List-Received-Date: Wed, 25 May 2016 21:37:55 -0000\r
46 \r
47 Place PYTHONPATH to the environment when python is executed in a way\r
48 that current shell environment is not affected. This also allows adding\r
49 the old value of PYTHONPATH to the end of the new value (otherwise it\r
50 would have been appended again and again when test_python is called).\r
51 \r
52 At the same time, use -B option to avoid writing .pyc files to\r
53 bindings/python/* (which are not cleared out by distclean).\r
54 \r
55 Drop the (unused) prefix code which preserved the original stdout of the\r
56 python program and opened sys.stdout to OUTPUT. In place of that there\r
57 is now note how (debug) information can be printed to original stdout.\r
58 ---\r
59  test/test-lib.sh | 8 ++++----\r
60  1 file changed, 4 insertions(+), 4 deletions(-)\r
61 \r
62 diff --git a/test/test-lib.sh b/test/test-lib.sh\r
63 index a7e6397c324e..ec2da0b7151c 100644\r
64 --- a/test/test-lib.sh\r
65 +++ b/test/test-lib.sh\r
66 @@ -1171,10 +1171,10 @@ test_emacs () {\r
67  }\r
68  \r
69  test_python() {\r
70 -       export PYTHONPATH=$TEST_DIRECTORY/../bindings/python\r
71 -\r
72 -       (echo "import sys; _orig_stdout=sys.stdout; sys.stdout=open('OUTPUT', 'w')"; cat) \\r
73 -               | $NOTMUCH_PYTHON -\r
74 +    # Note: if there is need to print debug information from python program,\r
75 +    # use stdout = os.fdopen(6, 'w') or stderr = os.fdopen(7, 'w')\r
76 +    PYTHONPATH="$TEST_DIRECTORY/../bindings/python${PYTHONPATH:+:$PYTHONPATH}" \\r
77 +       $NOTMUCH_PYTHON -B - > OUTPUT\r
78  }\r
79  \r
80  test_ruby() {\r
81 -- \r
82 2.8.2\r
83 \r