def run_test(): utils.find_assimp_or_die() tmp_target_path = os.path.join(settings.results, "tmp") try: os.mkdir(tmp_target_path) except OSError as oerr: # clear contents if tmp folder exists already del_folder_with_contents(tmp_target_path) try: zipin = zipfile.ZipFile(settings.database_name + ".zip", "r", zipfile.ZIP_STORED) except IOError: print("Regression database ", settings.database_name, ".zip was not found") return res = results(zipin) with open(os.path.join(settings.results, outfilename_output), "wt") as outfile: for tp in settings.model_directories: process_dir(tp, outfile, zipin, res) res.report_results()
def main(): """Run the test on all registered test repositories""" utils.find_assimp_or_die() res = [] for tp in settings.model_directories: res += process_dir(tp) [print(f) for f in res] return 0
os.mkdir(settings.database_name) except OSError: pass num = 0 for tp in settings.model_directories: num += process_dir(tp, outfile, lambda x: os.path.splitext(x)[1] in ext_list) print("="*60) print("Updated {0} entries".format(num)) # ------------------------------------------------------------------------------- if __name__ == "__main__": utils.find_assimp_or_die() def clean(f): f = f.strip("* \'") return "."+f if f[:1] != '.' else f if len(sys.argv)>1 and (sys.argv[1] == "--help" or sys.argv[1] == "-h"): print(usage) sys.exit(0) ext_list, preview, nozip = None, False, False for m in sys.argv[1:]: if m[:10]=="--exclude=": settings.exclude_extensions += map(clean, m[10:].split(",")) elif m[:3]=="-e=": settings.exclude_extensions += map(clean, m[3:].split(",")) elif m[:10]=="--include=":
os.mkdir(settings.database_name) except OSError: pass num = 0 for tp in settings.model_directories: num += process_dir(tp, outfile, lambda x: os.path.splitext(x)[1] in ext_list) print("=" * 60) print("Updated {0} entries".format(num)) # ------------------------------------------------------------------------------- if __name__ == "__main__": utils.find_assimp_or_die() def clean(f): f = f.strip("* \'") return "." + f if f[:1] != '.' else f if len(sys.argv) > 1 and (sys.argv[1] == "--help" or sys.argv[1] == "-h"): print(usage) sys.exit(0) ext_list, preview, nozip = None, False, False for m in sys.argv[1:]: if m[:10] == "--exclude=": settings.exclude_extensions += map(clean, m[10:].split(",")) elif m[:3] == "-e=": settings.exclude_extensions += map(clean, m[3:].split(","))