/[ascend]/trunk/models/johnpye/fprops/test.py
ViewVC logotype

Contents of /trunk/models/johnpye/fprops/test.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1886 - (show annotations) (download) (as text)
Fri Sep 19 07:22:54 2008 UTC (15 years, 8 months ago) by jpye
File MIME type: text/x-python
File size: 515 byte(s)
Adding separate file with basic test routine.
1 #!/usr/bin/env python
2 import subprocess, sys, os.path
3
4 try:
5 species = sys.argv[1]
6 except:
7 print "Run './test.py speciesname' to run its embedded test suite"
8 exit(1)
9
10 src = '%s.c'%species
11 if not os.path.exists(src):
12 print "No file named '%s' found in current directory" % src
13 exit(1)
14
15 s = 'gcc ideal.c helmholtz.c test.c %s.c -DTEST -o %s -lm' % (species,species)
16
17 print s
18 p = subprocess.Popen(s.split(' '))
19
20 p.wait()
21
22 if not p.returncode:
23 s = './%s' % species
24 print s
25 p = subprocess.Popen(s.split(' '))
26
27
28

Properties

Name Value
svn:executable *

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22