Browse Source

Moved full travis setup to after it's confirmed that it's necessary

Steven Smith 9 years ago
parent
commit
5af78b2993
2 changed files with 13 additions and 5 deletions
  1. 0 5
      .travis.yml
  2. 13 0
      toolset/run-ci.py

+ 0 - 5
.travis.yml

@@ -185,11 +185,6 @@ before_install:
   - pip install requests
   - echo "127.0.0.1 " `hostname` | sudo tee /etc/hosts
 
-install:
-  # Configure Travis-CI build environment for TFB
-  #   e.g. setup databases, users, etc
-  - ./config/travis_setup.sh
-
 services:
   - postgresql
 

+ 13 - 0
toolset/run-ci.py

@@ -295,6 +295,19 @@ class CIRunnner:
       log.info("I found no changes to `%s` or `toolset/`, aborting verification", self.directory)
       return 0
 
+    # Do full setup now that we've verified that there's work to do
+    try:
+      p = subprocess.Popen("config/travis_setup.sh", shell=True)
+      p.wait()
+    except subprocess.CalledProcessError:
+      log.critical("Subprocess Error")
+      print trackback.format_exc()
+      return 1
+    except Exception as err:
+      log.critical("Exception from running and waiting on subprocess to set up Travis environment")
+      log.error(err.child_traceback)
+      return 1
+
     names = ' '.join(self.names)
     # Assume mode is verify
     command = "toolset/run-tests.py --mode verify --test %s" % names