env["TEXTTEST_TMP"] = os.path.join(options.rootDir, env["FILEPREFIX"]+"texttesttmp") env["TEXTTEST_HOME"] = os.path.join(options.rootDir, options.testsDir) if "SUMO_HOME" not in env: env["SUMO_HOME"] = os.path.join(os.path.dirname(__file__), '..', '..') shutil.rmtree(env["TEXTTEST_TMP"], True) if not os.path.exists(env["SUMO_REPORT"]): os.makedirs(env["SUMO_REPORT"]) for name in ["dfrouter", "duarouter", "jtrrouter", "netconvert", "netgenerate", "od2trips", "sumo", "polyconvert", "sumo-gui", "activitygen"]: binary = os.path.join(options.rootDir, options.binDir, name + programSuffix + ".exe") if name == "sumo-gui": if os.path.exists(binary): env["GUISIM_BINARY"] = binary elif os.path.exists(binary): env[name.upper()+"_BINARY"] = binary log = open(testLog, 'w') # provide more information than just the date: nameopt = " -name %sr%s" % (date.today().strftime("%d%b%y"), svnrev) if options.sumoExe == "meso": runInternalTests.runInternal(programSuffix, "-b "+env["FILEPREFIX"]+nameopt, log) else: subprocess.call("texttest.py -b "+env["FILEPREFIX"]+nameopt, stdout=log, stderr=subprocess.STDOUT, shell=True) subprocess.call("texttest.py -a sumo.gui -b "+env["FILEPREFIX"]+nameopt, stdout=log, stderr=subprocess.STDOUT, shell=True) subprocess.call("texttest.py -b "+env["FILEPREFIX"]+" -coll", stdout=log, stderr=subprocess.STDOUT, shell=True) ago = datetime.datetime.now() - datetime.timedelta(50) subprocess.call('texttest.py -s "batch.ArchiveRepository session='+env["FILEPREFIX"]+' before=%s"' % ago.strftime("%d%b%Y"), stdout=log, stderr=subprocess.STDOUT, shell=True) log.close() log = open(statusLog, 'w') status.printStatus(makeLog, makeAllLog, env["TEXTTEST_TMP"], env["SMTP_SERVER"], log) log.close()
"dfrouter", "duarouter", "jtrrouter", "marouter", "netconvert", "netgenerate", "od2trips", "sumo", "polyconvert", "sumo-gui", "activitygen", "emissionsDrivingCycle", "emissionsMap" ]: binary = os.path.join(options.rootDir, options.binDir, name + programSuffix + ".exe") if name == "sumo-gui": if os.path.exists(binary): env["GUISIM_BINARY"] = binary elif os.path.exists(binary): env[name.upper() + "_BINARY"] = binary log = open(testLog, 'w') # provide more information than just the date: nameopt = " -name %sr%s" % (date.today().strftime("%d%b%y"), svnrev) if options.sumoExe == "meso": runInternalTests.runInternal(programSuffix, "-b " + env["FILEPREFIX"] + nameopt, log) else: subprocess.call("texttest.py -b " + env["FILEPREFIX"] + nameopt, stdout=log, stderr=subprocess.STDOUT, shell=True) subprocess.call("texttest.py -a sumo.gui -b " + env["FILEPREFIX"] + nameopt, stdout=log, stderr=subprocess.STDOUT, shell=True) subprocess.call("texttest.py -b " + env["FILEPREFIX"] + " -coll", stdout=log, stderr=subprocess.STDOUT, shell=True) ago = datetime.datetime.now() - datetime.timedelta(50)
]: binary = os.path.join(options.rootDir, options.binDir, name + ".exe") if name == "sumo-gui": if os.path.exists(binary): env["GUISIM_BINARY"] = binary elif os.path.exists(binary): env[name.upper() + "_BINARY"] = binary log = open(testLog, 'w') # provide more information than just the date: fullOpt = [ "-b", env["FILEPREFIX"], "-name", "%sr%s" % (date.today().strftime("%d%b%y"), svnrev) ] ttBin = "texttestc.py" if options.sumoExe == "meso": runInternalTests.runInternal("", fullOpt, log, console=True) else: subprocess.call([ttBin] + fullOpt, env=os.environ, stdout=log, stderr=subprocess.STDOUT, shell=True) subprocess.call([ttBin, "-a", "sumo.gui"] + fullOpt, env=os.environ, stdout=log, stderr=subprocess.STDOUT, shell=True) subprocess.call([ttBin, "-b", env["FILEPREFIX"], "-coll"], env=os.environ, stdout=log, stderr=subprocess.STDOUT,
shutil.rmtree(env["TEXTTEST_TMP"], True) if not os.path.exists(env["SUMO_REPORT"]): os.makedirs(env["SUMO_REPORT"]) for name in ["dfrouter", "duarouter", "jtrrouter", "marouter", "netconvert", "netgenerate", "od2trips", "sumo", "polyconvert", "sumo-gui", "activitygen", "emissionsDrivingCycle", "emissionsMap"]: binary = os.path.join(options.rootDir, options.binDir, name + ".exe") if name == "sumo-gui": if os.path.exists(binary): env["GUISIM_BINARY"] = binary elif os.path.exists(binary): env[name.upper() + "_BINARY"] = binary log = open(testLog, 'w') # provide more information than just the date: fullOpt = ["-b", env["FILEPREFIX"], "-name", "%sr%s" % (date.today().strftime("%d%b%y"), svnrev)] ttBin = "texttestc.py" if options.sumoExe == "meso": runInternalTests.runInternal("", fullOpt, log, console=True) else: subprocess.call([ttBin] + fullOpt, env=os.environ, stdout=log, stderr=subprocess.STDOUT, shell=True) subprocess.call([ttBin, "-a", "sumo.gui"] + fullOpt, env=os.environ, stdout=log, stderr=subprocess.STDOUT, shell=True) subprocess.call([ttBin, "-b", env["FILEPREFIX"], "-coll"], env=os.environ, stdout=log, stderr=subprocess.STDOUT, shell=True) log.close() log = open(statusLog, 'w') status.printStatus(makeLog, makeAllLog, env["SMTP_SERVER"], log) log.close()
binary = os.path.join(options.rootDir, options.binDir, name + programSuffix + ".exe") if name == "sumo-gui": if os.path.exists(binary): env["GUISIM_BINARY"] = binary elif os.path.exists(binary): env[name.upper() + "_BINARY"] = binary log = open(testLog, 'w') # provide more information than just the date: fullOpt = [ "-b", env["FILEPREFIX"], "-name", "%sr%s" % (date.today().strftime("%d%b%y"), svnrev) ] ttBin = "texttestc.py" if options.sumoExe == "meso": runInternalTests.runInternal(programSuffix, fullOpt, log, console=True) else: subprocess.call([ttBin] + fullOpt, stdout=log, stderr=subprocess.STDOUT, shell=True) subprocess.call([ttBin, "-a", "sumo.gui"] + fullOpt, stdout=log, stderr=subprocess.STDOUT, shell=True) subprocess.call([ttBin, "-b", env["FILEPREFIX"], "-coll"], stdout=log, stderr=subprocess.STDOUT, shell=True) ago = datetime.datetime.now() - datetime.timedelta(50) subprocess.call('%s -s "batch.ArchiveRepository session=%s before=%s"' %