Browse Source

Improve changed file detection

Hamilton Turner 11 years ago
parent
commit
527242b3e4
1 changed files with 7 additions and 3 deletions
  1. 7 3
      toolset/run-ci.py

+ 7 - 3
toolset/run-ci.py

@@ -41,10 +41,13 @@ class CIRunnner:
     try:
       is_pull_req = (os.environ['TRAVIS_PULL_REQUEST'] != "false")
       if is_pull_req:
-        # See add_commit_range in setup/travis-ci
-        self.commit_range = "prbase..prhead"
+        # For pull requests, this is the Github auto-merge commit
+        # which is exactly what we want to see
+        self.commit_range = os.environ['TRAVIS_COMMIT']
       else:  
         self.commit_range = os.environ['TRAVIS_COMMIT_RANGE']
+        if self.commit_range == "":
+          self.commit_range = os.environ['TRAVIS_COMMIT']
     except KeyError:
       log.warning("I should only be used for automated integration tests e.g. Travis-CI")
       log.warning("Were you looking for run-tests.py?")
@@ -287,4 +290,5 @@ if __name__ == "__main__":
 
     sys.exit(retcode)
 
-# vim: set sw=2 ts=2 expandtab
+
+# vim: set sw=2 ts=2 expandtab