]> xenbits.xensource.com Git - osstest.git/commitdiff
Executive: provide db_pg_dsn (for the benefit of Tcl)
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 14 Feb 2013 12:40:17 +0000 (12:40 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 14 Feb 2013 12:40:17 +0000 (12:40 +0000)
Osstest/Executive.pm

index 23c82ad44f4f5ff1c7c81ee04916f0dfb4e02fde..ab3da9c2cca16a95b53e49c142d9f3911f2b8db5 100644 (file)
@@ -49,7 +49,7 @@ BEGIN {
                       alloc_resources alloc_resources_rollback_begin_work
                       resource_check_allocated resource_shared_mark_ready
                       duration_estimator
-                      opendb opendb_state
+                      db_pg_dsn opendb opendb_state
                       );
     %EXPORT_TAGS = ( );
 
@@ -141,9 +141,8 @@ sub opendb_state () {
 
 our $whoami;
 
-sub opendb ($) {
+sub db_pg_dsn ($) {
     my ($dbname) = @_;
-
     my $pg= $c{"ExecutiveDbname_$dbname"};
 
     if (!defined $pg) {
@@ -167,6 +166,13 @@ sub opendb ($) {
 
         $pg = $c{"ExecutiveDbname_$dbname"} = $pat;
     }
+    return $pg;
+}
+
+sub opendb ($) {
+    my ($dbname) = @_;
+
+    my $pg= db_pg_dsn($dbname);
 
     my $dbh= DBI->connect("dbi:Pg:$pg", '','', {
         AutoCommit => 1,