[ARVADOS-DEV] updated: 848ccc7efab5dab22f7fedd920daffbd102d09a7

git at public.curoverse.com git at public.curoverse.com
Mon Jun 8 13:39:08 EDT 2015


Summary of changes:
 jenkins/run-tests.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

       via  848ccc7efab5dab22f7fedd920daffbd102d09a7 (commit)
      from  855e16bace329e9a449fcfc569a0e8ba6acc2d21 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 848ccc7efab5dab22f7fedd920daffbd102d09a7
Author: Brett Smith <brett at curoverse.com>
Date:   Mon Jun 8 13:38:06 2015 -0400

    Fix directory when dropping API server database connections.
    
    The Python one-liner is written with the expectation that it's in this
    directory, and usually fails to find <config/database.yml> otherwise.
    No issue #.

diff --git a/jenkins/run-tests.sh b/jenkins/run-tests.sh
index 1a699a8..cd6e1d0 100755
--- a/jenkins/run-tests.sh
+++ b/jenkins/run-tests.sh
@@ -609,8 +609,9 @@ install_apiserver() {
     # Clear out any lingering postgresql connections to the test
     # database, so that we can drop it. This assumes the current user
     # is a postgresql superuser.
-    test_database=$(python -c "import yaml; print yaml.load(file('config/database.yml'))['test']['database']")
-    psql "$test_database" -c "SELECT pg_terminate_backend (pg_stat_activity.procpid::int) FROM pg_stat_activity WHERE pg_stat_activity.datname = '$test_database';" 2>/dev/null
+    cd "$WORKSPACE/services/api" \
+        && test_database=$(python -c "import yaml; print yaml.load(file('config/database.yml'))['test']['database']") \
+        && psql "$test_database" -c "SELECT pg_terminate_backend (pg_stat_activity.procpid::int) FROM pg_stat_activity WHERE pg_stat_activity.datname = '$test_database';" 2>/dev/null
 
     cd "$WORKSPACE/services/api" \
         && RAILS_ENV=test bundle exec rake db:drop \

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list