Beispiel #1
0
def compile_by_domain_and_scope(domain, scope):
    common.print_verbose("Compiling " + scope)
    compile.compile(
        "domains/" + domain + "/src/" + scope + "/java",
        "target/domains/" + scope + "/" + domain,
        dependencies.classpath_for(domain, scope),
    )
Beispiel #2
0
def run_tests_for(domain, scope):
    common.print_info_no_eol("Running " + scope + " for " + domain + "...")
    classpath = dependencies.classpath_for(domain, scope)
    test_classes_as_string = test_classes_for(domain, scope)

    if test_classes_as_string.strip() != "":
        run_tests_command = "java -cp " + classpath + " org.junit.runner.JUnitCore " + test_classes_as_string
        common.print_verbose("Running tests with:")
        common.print_verbose(run_tests_command)
        (exit_code, output) = common.run_command(run_tests_command)
        if exit_code == 0:
            common.print_info(" PASSED.")
        else:
            common.print_info(" FAILED.")
    else:
        common.print_info(" No tests found.")