예제 #1
0
파일: test.py 프로젝트: pranith/vixl
def RunBenchmarks(options, args):
  rc = 0
  if CanRunAarch32(options, args):
    benchmark_names = util.ListCCFilesWithoutExt(config.dir_aarch32_benchmarks)
    for bench in benchmark_names:
      rc |= RunCommand(
        [os.path.realpath(
          join(config.dir_build_latest, 'benchmarks/aarch32', bench)), '10'])
  if CanRunAarch64(options, args):
    benchmark_names = util.ListCCFilesWithoutExt(config.dir_aarch64_benchmarks)
    for bench in benchmark_names:
      rc |= RunCommand(
        [util.relrealpath(
            join(config.dir_build_latest,
                'benchmarks/aarch64', bench)), '10'])
  return rc
예제 #2
0
        # Convert 'compiler' into an environment variable:
        environment_options = {'CXX': options['compiler']}
        del options['compiler']

        # Avoid going through the build stage if we are not using the build
        # result.
        if not (args.notest and args.nobench):
            build_rc = BuildAll(options, args.jobs, environment_options)
            # Don't run the tests for this configuration if the build failed.
            if build_rc != 0:
                rc.Combine(build_rc)
                continue

            # Use the realpath of the test executable so that the commands printed
            # can be copy-pasted and run.
            test_executable = util.relrealpath(
                join(config.dir_build_latest, 'test', 'test-runner'))

            if not args.notest:
                printer.Print(test_executable)
                tests.AddTests(test_executable, args.filters, list(),
                               args.under_valgrind)

            if not args.nobench:
                rc.Combine(RunBenchmarks(options, args))

    rc.Combine(tests.Run(args.jobs, args.verbose))
    if not args.dry_run:
        rc.PrintStatus()

    sys.exit(rc.Value)