[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
s.popinet at niwa.co.nz
Fri May 15 02:52:22 UTC 2009
The following commit has been merged in the upstream branch:
commit 7c742b46caef2cc056980956bf0ff37edd974896
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date: Thu Jul 21 14:02:28 2005 +1000
Changed the way gfs2tex sets environment variables
darcs-hash:20050721040228-fbd8f-cd5bd0965319bcecc45309d80539f2a4f1d35e3e.gz
diff --git a/doc/examples/gfs2tex.py b/doc/examples/gfs2tex.py
index 51460c2..2e1460c 100644
--- a/doc/examples/gfs2tex.py
+++ b/doc/examples/gfs2tex.py
@@ -135,7 +135,7 @@ class Example:
file.write(self.section + "{" + "\n".join(self.title) + "}\n")
file.write("\\begin{description}\n")
file.write("\\item[Author]" + self.author + "\n")
- file.write("\\item[Command]" + "{\\tt " + self.command + "}\n")
+ file.write("\\item[Command]" + "{\\tt " + self.command.replace('&',r'\&') + "}\n")
file.write("\\item[Version]" + self.version + "\n")
f = self.name + ".gfs"
required = " " + f + \
@@ -229,9 +229,13 @@ class Example:
else:
return None,None
- def run(self,env=""):
+ def run(self,env=None):
+ if env:
+ env += " && "
+ else:
+ env = ""
out = os.popen("cd " + self.path + " && " +\
- "sh -c \"time -p " + env + " " + self.command + "\" 2>&1")
+ "sh -c \"time -p " + env + self.command + "\" 2>&1")
lines = []
for l in out:
record = l.split()
diff --git a/test/euler/test.py b/test/euler/test.py
index 2605604..49de31a 100644
--- a/test/euler/test.py
+++ b/test/euler/test.py
@@ -6,7 +6,7 @@ sys.path.append("../../doc/examples")
import gfs2tex
from datetime import *
-env = "PYTHONPATH=$PYTHONPATH:" + os.getcwd() + " donotrun=false"
+env = "export PYTHONPATH=$PYTHONPATH:" + os.getcwd() + " && export donotrun=false"
system = commands.getoutput('uname -o -n -m')
path = commands.getoutput('which gerris2D')
version = commands.getoutput("""gerris2D -V 2>&1 | awk '{if ($5 == "version") print $6;}'""")
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list