コード例 #1
0
ファイル: run.py プロジェクト: ericyao2013/CV-OpenCV_OpenCV
        if not [a for a in test_args if a.startswith("--perf_min_samples=")]:
            test_args.extend(["--perf_min_samples=1"])
        if not [a for a in test_args if a.startswith("--perf_force_samples=")]:
            test_args.extend(["--perf_force_samples=1"])
        if not [a for a in test_args if a.startswith("--perf_verify_sanity")]:
            test_args.extend(["--perf_verify_sanity"])

    ret = 0
    logs = []
    for path in args.build_path:
        try:
            if not os.path.isdir(path):
                raise Err(
                    "Not a directory (should contain CMakeCache.txt ot test executables)"
                )
            cache = CMakeCache(args.configuration)
            fname = os.path.join(path, "CMakeCache.txt")

            if os.path.isfile(fname):
                log.debug("Reading cmake cache file: %s", fname)
                cache.read(path, fname)
            else:
                log.debug("Assuming folder contains tests: %s", path)
                cache.setDummy(path)

            if args.android or cache.getOS() == "android":
                log.debug("Creating Android test runner")
                suite = AndroidTestSuite(args, cache, android_env)
            else:
                log.debug("Creating native test runner")
                suite = TestSuite(args, cache)
コード例 #2
0
        if not [a for a in test_args if a.startswith("--perf_min_samples=")]:
            test_args.extend(["--perf_min_samples=1"])
        if not [a for a in test_args if a.startswith("--perf_force_samples=")]:
            test_args.extend(["--perf_force_samples=1"])
        if not [a for a in test_args if a.startswith("--perf_verify_sanity")]:
            test_args.extend(["--perf_verify_sanity"])

    ret = 0
    logs = []
    for path in args.build_path:
        try:
            if not os.path.isdir(path):
                raise Err(
                    "Not a directory (should contain CMakeCache.txt ot test executables)"
                )
            cache = CMakeCache()
            fname = os.path.join(path, "CMakeCache.txt")

            if os.path.isfile(fname):
                log.debug("Reading cmake cache file: %s", fname)
                cache.read(path, fname, args.configuration)
            else:
                log.debug("Assuming folder contains tests: %s", path)
                cache.setDummy(path)

            if args.android or cache.getOS() == "android":
                log.debug("Creating Android test runner")
                suite = AndroidTestSuite(args, cache, android_env)
            else:
                log.debug("Creating native test runner")
                suite = TestSuite(args, cache)