"\n<td align=right>" + str(total_volt_nonfatal_excep) + "</td>" + \
                           "\n<td align=right>" + str(total_cmp_excep) + "</td>" + \
                           "\n<td align=right>" + str(total_volt_crashes) + "</td>" + \
                           "\n<td align=right>" + str(total_cmp_crashes) + "</td>" + \
                           "\n<td align=right>" + str(total_diff_crashes) + "</td>" + \
                           "\n<td align=right>" + str(min_all_statements_per_pattern) + "</td>" + \
                           "\n<td align=right>" + str(max_all_statements_per_pattern) + "</td>" + \
                           "\n<td align=right>" + str(total_num_inserts) + "</td>" + \
                           "\n<td align=right>" + str(total_num_patterns) + "</td>" + \
                           "\n<td align=right>" + str(total_num_unresolved) + "</td>" + \
                           "\n<td align=right>" + minutes_colon_seconds(total_gensql_time) + "</td>" + \
                           "\n<td align=right>" + minutes_colon_seconds(total_voltdb_time) + "</td>" + \
                           "\n<td align=right>" + minutes_colon_seconds(total_cmpdb_time) + "</td>" + \
                           "\n<td align=right>" + minutes_colon_seconds(total_compar_time) + "</td>" + \
                           "\n<td align=right>" + minutes_colon_seconds(time1-time0) + "</td></tr>\n"
    generate_summary(output_dir, statistics, comparison_database)

    # output statistics for SQLCoverage auto filer
    with open(os.path.join(output_dir, "stats.txt"), "w") as hack:
        stats = \
            {
            'valid_statements' : valid_statements,
            'valid_percent' : valid_percent,
            'invalid_statements' : invalid_statements,
            'invalid_percent' : invalid_percent,
            'total_statements' : total_statements,
            'mismatched_statements' : mismatched_statements,
            'mismatched_percent' : mismatched_percent,
            'total_volt_fatal_excep' : total_volt_fatal_excep,
            'total_volt_nonfatal_excep' : total_volt_nonfatal_excep,
            'total_cmp_excep' : total_cmp_excep,
Example #2
0
                           "\n<td align=right>" + str(total_statements) + "</td>" + \
                           "\n<td align=right>" + str(mismatched_statements) + "</td>" + \
                           "\n<td align=right>" + mismatched_percent + "%</td>" + \
                           "\n<td align=right>" + str(total_volt_npes) + "</td>" + \
                           "\n<td align=right>" + str(total_cmp_npes) + "</td>" + \
                           "\n<td align=right>" + str(total_num_crashes) + "</td>" + \
                           "\n<td align=right>" + str(min_all_statements_per_pattern) + "</td>" + \
                           "\n<td align=right>" + str(max_all_statements_per_pattern) + "</td>" + \
                           "\n<td align=right>" + str(total_num_inserts) + "</td>" + \
                           "\n<td align=right>" + str(total_num_patterns) + "</td>" + \
                           "\n<td align=right>" + minutes_colon_seconds(total_gensql_time) + "</td>" + \
                           "\n<td align=right>" + minutes_colon_seconds(total_voltdb_time) + "</td>" + \
                           "\n<td align=right>" + minutes_colon_seconds(total_cmpdb_time) + "</td>" + \
                           "\n<td align=right>" + minutes_colon_seconds(total_compar_time) + "</td>" + \
                           "\n<td align=right>" + minutes_colon_seconds(time1-time0) + "</td></tr>\n"
    generate_summary(output_dir, statistics, comparison_database)

    # Print the total time, for each type of activity
    print_seconds(total_gensql_time, "for generating ALL SQL statements")
    print_seconds(total_voltdb_time, "for running ALL VoltDB (JNI) statements")
    print_seconds(total_cmpdb_time,  "for running ALL " + comparison_database + " statements")
    print_seconds(total_compar_time, "for comparing ALL DB results")
    print_elapsed_seconds("for generating the output report", time1, "Total   time: ")
    print_elapsed_seconds("for the entire run", time0, "Total   time: ")
    if total_cmp_npes > 0:
        print "Total number of " + comparison_database + " NullPointerExceptions (NPEs): %d" % total_cmp_npes
    if total_volt_npes > 0:
        success = False
        print "Total number of VoltDB NullPointerExceptions (NPEs): %d" % total_volt_npes
    if mismatched_statements > 0:
        print "Total number of mismatched statements (i.e., test failures): %d" % mismatched_statements
        # testConfigKits["deploymentFile"]
        # testConfigKits["hostname"]
        # testConfigKits["hostport"]
        testConfigKits = create_testConfigKits(options, basedir)

    success = True
    statistics = {}
    for config_name in configs_to_run:
        print >> sys.stderr, "SQLCOVERAGE: STARTING ON CONFIG: %s" % config_name
        report_dir = output_dir + '/' + config_name
        config = config_list.get_config(config_name)
        if(options.hostname != None and options.hostname != defaultHost):
            testDDL = basedir + "/" + config['ddl']
            testProjectFile = create_projectFile(testDDL, 'test')
            testCatalog = create_catalogFile(testConfigKits['voltcompiler'], testProjectFile, 'test')
            # To add one more key
            testConfigKits["testCatalog"] = testCatalog
        result = run_config(config_name, config, basedir, report_dir, seed, options.report_all, \
                            options.generate_only, args, testConfigKits)
        statistics[config_name] = result["keyStats"]
        statistics["seed"] = seed
        if result["mis"] != 0:
            success = False

    # Write the summary
    generate_summary(output_dir, statistics)

    if not success:
        print >> sys.stderr, "SQL coverage has errors."
        exit(1)
Example #4
0
            testProjectFile = create_projectFile(testDDL, 'test')
            testCatalog = create_catalogFile(testConfigKits['voltcompiler'],
                                             testProjectFile, 'test')
            # To add one more key
            testConfigKits["testCatalog"] = testCatalog
        result = run_config(config_name, config, basedir, report_dir, seed,
                            options.report_all, options.generate_only,
                            options.subversion_generation, options.report_all,
                            args, testConfigKits)
        statistics[config_name] = result["keyStats"]
        statistics["seed"] = seed
        if result["mis"] != 0:
            success = False

    # Write the summary
    time1 = time.time()
    generate_summary(output_dir, statistics)

    # Print the elapsed time, and the current system time
    print_seconds(gensql_time, "for generating ALL statements")
    print_seconds(voltdb_time, "for running ALL VoltDB (JNI) statements")
    print_seconds(hsqldb_time, "for running ALL HSqlDB statements")
    print_seconds(compar_time, "for comparing ALL DB results")
    print_elapsed_seconds("for generating the output report", time1,
                          "Total   time: ")
    print_elapsed_seconds("for the entire run", time0, "Total   time: ")

    if not success:
        print >> sys.stderr, "SQL coverage has errors."
        exit(1)