]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
mg-schema-test-database: Move setting of test_cfg_setting to dbname
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 4 Dec 2015 19:13:08 +0000 (19:13 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 8 Dec 2015 14:51:02 +0000 (14:51 +0000)
This will makes it available to a wider subset of the script, which is
going to be important in a moment.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
mg-schema-test-database

index 1226761d4bd7a915b8051b000f2dd43d89669034..a1eb49c2ccbd45d38ec5fa1f97051684c5b55cc6 100755 (executable)
@@ -56,6 +56,12 @@ dbname () {
        dbname="${maindbname}_test$suffix"
        t="tmp/testdb$suffix"
        tcfg=local-config.test-database$suffix
+
+       test_cfg_setting="$(perl -we '
+                       use Osstest;
+                       print globalconfigfiles() or die $!;
+               '):$tcfg"
+
 }
 
 psql_query_internal () {
@@ -254,12 +260,6 @@ END
        '
        mv -f $tcfg.tmp $tcfg
 
-       # this makes `withtest' work
-       test_cfg_setting="$(perl -we '
-                       use Osstest;
-                       print globalconfigfiles() or die $!;
-               '):$tcfg"
-
        # Extract the schema for reference
        $(get_pgdump_cmd) -s -O -x >$t.schema