def run_unittest(throw=True): """ Runs unit-tests. """ args = lambda: None args.build_type = "debug" args.backend = "software" build_path = util.get_build_path(args) print('') print("Building unit-tests...") if not build.check_configured(args, throw=False): build.configure(args) build.build_unit(args) print('') print("Running unit-tests...") return util.call([path.join(build_path, 'bin', 'unit')], throw)
def run_unittest(args): build_path = build.get_build_path(args) print("Building unit-tests...") # We use the argument parser from the main build script here to initialize all required members of the argument structure. ret = build.configure(build.get_args()) if not ret: ret = build.build_unit(args) if not ret: ret = subprocess.call([path.join(build_path, 'bin', 'unit')]) return ret