/[escript]/branches/4.0fordebian/site_scons/site_init.py
ViewVC logotype

Diff of /branches/4.0fordebian/site_scons/site_init.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2501 by gross, Thu May 14 05:02:20 2009 UTC revision 2502 by gross, Tue Jun 30 05:49:22 2009 UTC
# Line 32  def build_py(target, source, env): Line 32  def build_py(target, source, env):
32  def runUnitTest(target, source, env):  def runUnitTest(target, source, env):
33    time_start = time.time()    time_start = time.time()
34    app = str(source[0].abspath)    app = str(source[0].abspath)
35      pn, sn= os.path.split(app)
36    if not os.name== "nt":    if not os.name== "nt":
37       app = os.path.join(env['bininstall'],"escript")+" -bv "+app       app = "cd "+pn+"; "+os.path.join(env['bininstall'],"escript")+" -bv "+sn
38    else:    else:
39        if env['usempi']:        if env['usempi']:
40            app = "mpiexec -np %s -genvlist PYTHONPATH,OMP_NUM_THREADS,"\            app = "cd %s | mpiexec -np %s -genvlist PYTHONPATH,OMP_NUM_THREADS,"\
41              "FINLEY_TEST_DATA,PYVISI_TEST_DATA_ROOT,PYVISI_WORKDIR,PATH %s"\              "FINLEY_TEST_DATA,PYVISI_TEST_DATA_ROOT,PYVISI_WORKDIR,PATH %s"\
42              %(env['ENV']['ESCRIPT_NUM_NODES'], app)              %(pn,env['ENV']['ESCRIPT_NUM_NODES'], sn)
43          else:
44               app = "cd "+ pn +" | "+ sn
45    print "Executing test: " + app    print "Executing test: " + app
46    if not env.Execute(app):    if not env.Execute(app):
47      open(str(target[0]),'w').write("PASSED\n")      open(str(target[0]),'w').write("PASSED\n")
# Line 50  def runUnitTest(target, source, env): Line 53  def runUnitTest(target, source, env):
53  def runPyUnitTest(target, source, env):  def runPyUnitTest(target, source, env):
54     time_start = time.time()     time_start = time.time()
55     app = str(source[0].abspath)     app = str(source[0].abspath)
56       pn, sn= os.path.split(app)
57     if os.name== "nt":     if os.name== "nt":
58         if env['usempi']:         if env['usempi']:
59             app = "mpiexec -np %s -genvlist PYTHONPATH,OMP_NUM_THREADS,"\             app = "cd %s | mpiexec -np %s -genvlist PYTHONPATH,OMP_NUM_THREADS,"\
60                "FINLEY_TEST_DATA,PYVISI_TEST_DATA_ROOT,PYVISI_WORKDIR,PATH %s\pythonMPIredirect.exe %s"\                "FINLEY_TEST_DATA,PYVISI_TEST_DATA_ROOT,PYVISI_WORKDIR,PATH %s\pythonMPIredirect.exe %s"\
61                %(env['ENV']['ESCRIPT_NUM_NODES'],env['libinstall'],app)                %(pn,env['ENV']['ESCRIPT_NUM_NODES'],env['libinstall'],sn)
62         else:         else:
63             app = sys.executable + " " + app             app = "cd "+ pn +" | "+sys.executable + " " + sn
64     else:     else:
65       app = os.path.join(env['bininstall'],"escript")+" -ov "+app       app = "cd "+pn+"; "+os.path.join(env['bininstall'],"escript")+" -ov "+sn
66     print "Executing test: " + app     print "Executing test: ",app
67     if env.Execute(app) == 0:     if env.Execute(app) == 0:
68        open(str(target[0]),'w').write("PASSED\n")        open(str(target[0]),'w').write("PASSED\n")
69     else:     else:

Legend:
Removed from v.2501  
changed lines
  Added in v.2502

  ViewVC Help
Powered by ViewVC 1.1.26