]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
mg-schema-test-database: Wrap some withtest psql_do in subshells
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 12 Dec 2016 13:21:53 +0000 (13:21 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 20 Dec 2016 17:05:12 +0000 (17:05 +0000)
Otherwise it takes effect for the rest of the script, which is not
what is wanted !  As it happens, there are no accesses to the real db
after this point, so this bug is latent.

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

index a82c044e0700951e204c5c09f766a86af10b1284..0517ca368a11bb0e6f73676f76c72fa4c03024cb 100755 (executable)
@@ -509,19 +509,20 @@ END
        printf "borrow..."
 
        for task in $tasks; do
-               withtest psql_do <<END
+               (withtest psql_do <<END
                        BEGIN;
                        UPDATE resources
                                SET owntaskid = $(taskid magic idle)
                                WHERE owntaskid = $(borrowtaskid $task);
                        COMMIT;
 END
+                )
        done
-       withtest psql_do <<END
+       (withtest psql_do <<END
                DELETE FROM tasks
                        WHERE type='xdbref' AND refkey='$dbname';
 END
-
+        )
        printf "\n"
 
        cat <<END