# Handle Z3 dependency try: import z3 except ImportError: print "%(red)s[Z3]%(end)s " % cosmetics.colors + \ "Z3 and its python binding are necessary for TranslatorZ3." if TAGS["z3"] not in exclude_tags: exclude_tags.append(TAGS["z3"]) test_ko = [] test_ok = [] # Set callbacks if multiproc is False: testset.set_cpu_numbers(1) testset.set_callback(task_done=lambda test, error:multithread.task_done(test, error, test_ok, test_ko), task_new=multithread.task_new) # Filter testset according to tags testset.filter_tags(exclude_tags=exclude_tags) # Run tests testset.run() # Finalize testset.end(clean=not args.do_not_clean) print print (cosmetics.colors["green"] + "Result: %d/%d pass" % (len(test_ok), len(test_ok) + len(test_ko)) + cosmetics.colors["end"]) for test, error in test_ko:
# Remove llvm tests if TAGS["llvm"] not in exclude_tags: exclude_tags.append(TAGS["llvm"]) # Handle Z3 dependency try: import z3 except ImportError: print "%(red)s[Z3]%(end)s " % cosmetics.colors + \ "Z3 and its python binding are necessary for TranslatorZ3." if TAGS["z3"] not in exclude_tags: exclude_tags.append(TAGS["z3"]) # Set callbacks if multiproc is False: testset.set_callback(task_done=monothread.task_done, task_new=monothread.task_new) testset.set_cpu_numbers(1) else: screendisplay.init(testset.cpu_c) testset.set_callback(task_done=screendisplay.task_done, task_new=screendisplay.task_new) # Filter testset according to tags testset.filter_tags(exclude_tags=exclude_tags) # Run tests testset.run() # Finalize testset.end(clean=not args.do_not_clean)
# Handle pycparser dependency try: import pycparser except ImportError: print "%(red)s[PYCPARSER]%(end)s " % cosmetics.colors + \ "pycparser are necessary for Objc." if TAGS["cparser"] not in exclude_tags: exclude_tags.append(TAGS["cparser"]) test_ko = [] test_ok = [] # Set callbacks if multiproc is False: testset.set_cpu_numbers(1) testset.set_callback(task_done=lambda test, error:multithread.task_done(test, error, test_ok, test_ko), task_new=multithread.task_new) # Filter testset according to tags testset.filter_tags(exclude_tags=exclude_tags, include_tags=include_tags) # Run tests testset.run() # Finalize testset.end(clean=not args.do_not_clean) print print (cosmetics.colors["green"] + "Result: %d/%d pass" % (len(test_ok), len(test_ok) + len(test_ko)) + cosmetics.colors["end"]) for test, error in test_ko: