diff options
author | Lars Langhans <lla@openoffice.org> | 2010-05-10 14:22:26 +0200 |
---|---|---|
committer | Lars Langhans <lla@openoffice.org> | 2010-05-10 14:22:26 +0200 |
commit | 894edb4c5e0e348f58ef81c4805d63564c43944c (patch) | |
tree | 92ba4f8db8edd53732786203ed08b1669672c3d0 /testgraphical | |
parent | a140d01587697909c3fb8a0e5d8e0055cfff0de1 (diff) |
gfxcmp02: #159601# add graphical compare test
Diffstat (limited to 'testgraphical')
-rw-r--r-- | testgraphical/source/dbhelper.pm | 209 |
1 files changed, 209 insertions, 0 deletions
diff --git a/testgraphical/source/dbhelper.pm b/testgraphical/source/dbhelper.pm new file mode 100644 index 000000000000..0f5c0d5bb5ea --- /dev/null +++ b/testgraphical/source/dbhelper.pm @@ -0,0 +1,209 @@ +# +# # ------------------------------------------------------------------------------ +# +# sub DB_INSERT_INTO_TABLE_STATUS() +# { +# # my $sDocID = shift; +# # my $sDBDistinct = shift; +# +# my $sHostname = hostname; +# +# my $sSQL = "INSERT INTO status (docid, dbdistinct2, hostname)"; +# $sSQL .= " VALUES ($docid, '$dbdistinct', '$sHostname')"; +# ExecSQL($sSQL); +# } +# sub DB_UPDATE_TABLE_STATUS_SET_INFO($) +# { +# # my $sDocID = shift; +# # my $sDBDistinct = shift; +# my $sInfo = shift; +# +# # my $sHostname = hostname; +# +# my $sInsertSQL = "UPDATE status SET info='$sInfo' WHERE docid=$docid AND dbdistinct2='$dbdistinct'"; +# ExecSQL($sInsertSQL); +# } +# +# sub DB_UPDATE_TABLE_DOCUMENTS_SET_STATE_INFO($$) +# { +# # my $sDocID = shift; +# my $sStatus = shift; +# my $sError = shift; +# +# my $sSQL = "UPDATE documents"; +# $sSQL .= " SET state='" . $sStatus . "'"; +# $sSQL .= ",info='" . $sError . "'"; +# $sSQL .= " WHERE docid=$docid"; +# ExecSQL($sSQL); +# } +# sub DB_UPDATE_TABLE_STATUS_SET_STATE($) +# { +# # my $sDocID = shift; +# my $sStatus = shift; +# +# my $sSQL = "UPDATE status"; +# $sSQL .= " SET state='" . $sStatus . "'"; +# $sSQL .= " WHERE docid=$docid"; +# ExecSQL($sSQL); +# } +# +# # sub DB_UPDATE_TABLE_STATUS_SET_STATE_FAILED() +# # { +# # DB_UPDATE_TABLE_STATUS_SET_STATE("FAILED-FAILED"); +# # } +# # ------------------------------------------------------------------------------ +# # sub getDBConnectionString() +# # { +# # # return "server:jakobus,db:jobs_convwatch,user:admin,passwd:admin"; +# # return "server:unoapi,db:jobs_convwatch,user:convwatch,passwd:convwatch"; +# # } +# # ------------------------------------------------------------------------------ +# sub getSourceInfo($) +# { +# my $sDBStr = shift; +# +# my $sSourceVersion; +# if ( $sDBStr =~ / sourceversion='(.*?)',/ ) +# { +# $sSourceVersion = $1; +# log_print( "sSourceVersion: $sSourceVersion\n"); +# } +# if (! $sSourceVersion) +# { +# log_print( "Error: no value for sourceversion found.\n"); +# return; +# } +# my $sSourceName; +# if ( $sDBStr =~ / sourcename='(.*?)',/ ) +# { +# $sSourceName = $1; +# log_print( "sSourceName: $sSourceName\n"); +# } +# my $sSourceCreatorType; +# if ( $sDBStr =~ / sourcecreatortype='(.*?)',/ ) +# { +# $sSourceCreatorType = $1; +# log_print( "sSourceCreatorType: $sSourceCreatorType\n"); +# } +# return $sSourceVersion, $sSourceName, $sSourceCreatorType; +# } +# # ------------------------------------------------------------------------------ +# sub getDestinationInfo($) +# { +# my $sDBStr = shift; +# +# my $sDestinationVersion; +# if ( $sDBStr =~ / destinationversion='(.*?)',/ ) +# { +# $sDestinationVersion = $1; +# log_print( "sDestinationVersion: $sDestinationVersion\n"); +# } +# if (! $sDestinationVersion) +# { +# log_print( "Error: no value for destinationversion found.\n"); +# return; +# } +# my $sDestinationName; +# if ( $sDBStr =~ / destinationname='(.*?)',/ ) +# { +# $sDestinationName = $1; +# log_print( "sDestinationName: $sDestinationName\n"); +# } +# my $sDestinationCreatorType; +# if ( $sDBStr =~ / destinationcreatortype='(.*?)',/ ) +# { +# $sDestinationCreatorType = $1; +# log_print( "sDestinationCreatorType: $sDestinationCreatorType\n"); +# } +# return $sDestinationVersion, $sDestinationName, $sDestinationCreatorType; +# } +# # ------------------------------------------------------------------------------ +# # sub getMailAddress($) +# # { +# # my $sDBStr = shift; +# # my $sMailAddress = ""; +# # if ( $sDBStr =~ / mailfeedback='(.*?)',/ ) +# # { +# # $sMailAddress = $1; +# # log_print( "sMailAddress: $sMailAddress\n"); +# # } +# # return $sMailAddress; +# # } +# +# # sub getDocumentInfo($) +# # { +# # my $sDBStr = shift; +# # +# # my $sDocumentPoolPath; +# # if ( $sDBStr =~ / documentpoolpath='(.*?)',/ ) +# # { +# # $sDocumentPoolPath = $1; +# # log_print( "sDocumentPoolPath: $sDocumentPoolPath\n"); +# # } +# # if (! $sDocumentPoolPath) +# # { +# # log_print( "Error: no value for documentpoolpath found.\n"); +# # return; +# # } +# # my $sDocumentPool; +# # if ( $sDBStr =~ / documentpool='(.*?)',/ ) +# # { +# # $sDocumentPool = $1; +# # log_print( "sDocumentPool: $sDocumentPool\n"); +# # } +# # if (! $sDocumentPool) +# # { +# # log_print( "Error: no value for documentpool found.\n"); +# # return; +# # } +# # my $sDocumentName; +# # if ( $sDBStr =~ / name='(.*?)',/ ) +# # { +# # $sDocumentName = $1; +# # log_print( "sDocumentName: $sDocumentName\n"); +# # } +# # return $sDocumentPoolPath, $sDocumentPool, $sDocumentName; +# # } +# +# sub getDistinct($) +# { +# my $sDBStr = shift; +# my $sDBDistinct; +# if ( $sDBStr =~ / dbdistinct2='(\S*?)',/ ) +# { +# $sDBDistinct = $1; +# log_print( "dbdistinct2: $sDBDistinct\n"); +# } +# return $sDBDistinct; +# } +# +# sub getIDInfo($) +# { +# my $sDBStr = shift; +# # my $dbdistinct; +# +# my $sDBDistinct = getDistinct($sDBStr); +# # if ( $sDBStr =~ / dbdistinct2='(\S*?)',/ ) +# # { +# # $sDBDistinct = $1; +# # log_print( "dbdistinct2: $sDBDistinct\n"); +# # } +# if (! $sDBDistinct) +# { +# log_print( "Error: no dbdistinct given.\n"); +# return; +# } +# my $sDocID; +# if ( $sDBStr =~ / docid=(\S*?),/ ) +# { +# $sDocID = $1; +# log_print( "docid: $sDocID\n"); +# } +# if (! $sDocID) +# { +# log_print( "Error: no docid given.\n"); +# return; +# } +# return $sDBDistinct, $sDocID; +# } +# |