Beispiel #1
0
          (datetime.now().strftime("%d/%m/%Y %H:%M:%S"), project.name,
           args.commit),
          flush=True)
    project.checkout_commit(args.commit)
    print("[%s] [FINISHED]  Checkout %s %s" %
          (datetime.now().strftime("%d/%m/%Y %H:%M:%S"), project.name,
           project.get_commit()),
          flush=True)

    project_path = working_directory
    log_path = os.path.join(project_path, "output.log")

    print("[%s] [STARTED]  Install %s" %
          (datetime.now().strftime("%d/%m/%Y %H:%M:%S"), project.name),
          flush=True)
    status = project.install(stdout=log_path, timeout=args.timeout)
    print("[%s] [FINISHED] Install %s (status: %s)" %
          (datetime.now().strftime("%d/%m/%Y %H:%M:%S"), project.name, status),
          flush=True)

    if len(project.pom.poms) == 0:
        os._exit(os.EX_OK)

    results = {
        "url": project.url,
        "commit": args.commit,
        "lib": args.lib,
        "executions": []
    }

    print("[%s] [STARTED]  Test %s" %
Beispiel #2
0
                        "--results",
                        required=True,
                        help="The result folder")
    parser.add_argument("--timeout",
                        help="Execution timeout of mvn compile/test/package",
                        default=None)

    args = parser.parse_args()

    working_directory = tempfile.mkdtemp()

    project = Project(args.url)
    project.clone(working_directory)
    project.checkout_commit(args.commit)

    project.install(stdout="install.log", timeout=args.timeout)

    if len(project.pom.poms) == 0:
        os._exit(os.EX_OK)

    to_instrument = set()

    cl = project.classpath()
    for p in cl:
        for dep in p.split(":"):
            for lib in json_libs:
                if lib.replace(".", "/").replace(":", "/") in dep:
                    to_instrument.add(dep)
                    break
    if len(to_instrument) == 0:
        os._exit(os.EX_OK)