2 if __name__ == '__main__':
4 from subprocess import Popen
8 salomeKernelDir = sys.argv[1]
9 sourceDir = sys.argv[2]
10 testfile = sys.argv[3]
12 portlogfile = os.getcwd() + "/.salome_port"
13 testlogfile = os.getcwd() + "/test.log"
14 # remove port file if any
16 os.remove(portlogfile)
20 proc = Popen([salomeKernelDir + "/bin/salome/runSalome.py", "--modules", "SHAPER,GEOM", "--gui", "--ns-port-log=" + portlogfile, sourceDir + "/test_hdf.py", "args:" + testfile + "," + portlogfile + "," + testlogfile + "," + salomeKernelDir + "," + sourceDir])
23 while not os.path.exists(portlogfile) and iter < 100:
27 while os.path.exists(portlogfile):
31 with open(testlogfile, 'r') as inputFile:
35 isOk = isOk and s.find("FAIL") < 0
37 os.remove(testlogfile)
41 assert isOk, "Test failed"