示例#1
0
                          VALUES('%s')" % \
                          (suite.name)
                dprint(1," * SQL: " + sqlcmd)
                test_run.exec_sql_with_retry(sqlcmd)
                suite.id = test_run.cursor.lastrowid
                dprint(1," * SQL: row " + str(suite.id) + " inserted")
            else :
                # entry exists
                suite.id = row[0]
                dprint(1," * SQL: test_suite entry found (row " + str(suite.id) + ")");
            # end if
        # end for
    except :
        # if we could not get all test suite ids, we should turn off all DB updates
        print "ERROR: Unable to create test_suite record. Disabling further DB updates"
        test_run.update_db = False

        # no point in going on, exit now
        dprint(1,"* Leaving upload_initial_db_info")
        return
    # end try

    print "\n* Run info will be available at http://%s/testharness/show_test_runs_v2.php?runID=%d\n" % (testharness_front_end_host,test_run.id)

    dprint(1,"* Leaving upload_initial_db_info")
# end of function


def do_env_vars(run_list,action) :
    dprint(1,"* Entering do_env_vars")
                dprint(1, " * SQL: " + sqlcmd)
                test_run.exec_sql_with_retry(sqlcmd)
                suite.id = test_run.cursor.lastrowid
                dprint(1, " * SQL: row " + str(suite.id) + " inserted")
            else:
                # entry exists
                suite.id = row[0]
                dprint(
                    1, " * SQL: test_suite entry found (row " + str(suite.id) +
                    ")")
            # end if
        # end for
    except:
        # if we could not get all test suite ids, we should turn off all DB updates
        print "ERROR: Unable to create test_suite record. Disabling further DB updates"
        test_run.update_db = False

        # no point in going on, exit now
        dprint(1, "* Leaving upload_initial_db_info")
        return
    # end try

    print "\n* Run info will be available at http://%s/testharness/show_test_runs_v2.php?runID=%d\n" % (
        testharness_front_end_host, test_run.id)

    dprint(1, "* Leaving upload_initial_db_info")


# end of function