changeset 603:2ab7f8d9f28c

Merged with Thomas.
author Martin Geisler <mg@daimi.au.dk>
date Mon, 24 Mar 2008 13:23:17 +0100
parents 1ad9f7991c7c e5273143bf1f
children 7bf246416d4c
files
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/run.py	Mon Mar 24 13:16:28 2008 +0100
+++ b/run.py	Mon Mar 24 13:23:17 2008 +0100
@@ -217,11 +217,24 @@
     """Find static errors using Pyflakes."""
     execute(['pyflakes', '.'])
 
+
 @command('trial', 'python')
 def trial(python):
     """Execute Trial using the Python executable given."""
     trial = find_program("trial")
-    execute([python, trial, '--reporter=bwverbose', 'viff.test'])
+    trial_env = {}
+
+    # Twisted on Windows needs the SYSTEMROOT env variable, see
+    # http://tracker.viff.dk/issue18
+    if sys.platform == "win32":
+        if os.environ['SYSTEMROOT']:
+            trial_env['SYSTEMROOT'] = os.environ['SYSTEMROOT']
+        else:
+            abort("Twisted Trial needs SYSTEMROOT env variable.")
+
+    execute([python, trial, '--reporter=bwverbose', 'viff.test'],
+            env=trial_env)
+
 
 @command('help')
 def usage():