Skip to content

Commit

Permalink
Merge pull request #6 from tyu011/master
Browse files Browse the repository at this point in the history
Add "make test" in Makefile to test all and/or selected examples
  • Loading branch information
chrispbradley committed Aug 16, 2011
2 parents d85f9da + f89ac2a commit 3d0ccb0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
@@ -1 +1 @@
TestingPoint.0=.,,expected_files,.,1e-10
TestingPoint.0=.,,expected_files,.,1e-6
@@ -1 +1 @@
TestingPoint.0=.,,expected_files,.,1e-10
TestingPoint.0=.,,expected_files,.,1e-6
@@ -1 +1 @@
TestingPoint.0=.,,expected_files,.,1e-10
TestingPoint.0=.,,expected_files,.,1e-6
17 changes: 10 additions & 7 deletions noseMain.py
Expand Up @@ -2,12 +2,13 @@
from time import strftime
from datetime import date
import socket
sys.path.append(os.environ['OPENCMISS_ROOT']+"/cm/examples")
examplesDir = os.environ['OPENCMISS_ROOT']+"/cm/examples"
sys.path.append(os.environ['OPENCMISSEXAMPLES_ROOT'])
examplesDir = os.environ['OPENCMISSEXAMPLES_ROOT']
logsDir = os.environ['OPENCMISS_ROOT']+"/build/logs"
hostname = socket.gethostname()
compiler = os.environ['COMPILER']
configfile = os.environ['CONFIGURE']
size = os.environ['SIZE']
parentdir = os.environ['DIR']

def load_prop(propFile, properties) :
properties['TestingPoint']=[]
Expand Down Expand Up @@ -84,12 +85,14 @@ def test_build_library():
assert err==0

def test_example():
global compiler
rootdir = os.getcwd()
global compiler,examplesDir,parentdir
if (not examplesDir.endswith("/")) :
rootdir = examplesDir + "/"
rootdir = rootdir+parentdir
for root, subFolders, files in os.walk(rootdir) :
if root.find(".svn")==-1 :
for f in files :
if f==configfile :
if (size=='small' and f=='nightlytest.prop') or (size=='large' and (f=='nightlytest.prop' or f=='weeklytest.prop')) :
os.chdir(root)
yield check_build, 'build',root,compiler
system = os.uname()[0].lower()
Expand All @@ -98,7 +101,7 @@ def test_example():
properties = dict()
load_prop(propFile,properties)
if '42TestingPointsPATH' in properties :
testingPointsPath = os.environ['OPENCMISS_ROOT']+"/cm/examples/"+properties['42TestingPointsPATH']
testingPointsPath = examplesDir+"/"+properties['42TestingPointsPATH']
else:
testingPointsPath = ""
testpoints = properties['TestingPoint']
Expand Down

0 comments on commit 3d0ccb0

Please sign in to comment.