Permalink
Browse files

Improve run-ci's change detection

Ensure that the prefix matches the directory. Using the
entire string results in things like 'php' being run when only
'cakephp' was modified
  • Loading branch information...
hamiltont committed Aug 6, 2014
1 parent f98caad commit 8174939faa0f14b0addeb8a924dcd5e352261f60
Showing with 2 additions and 2 deletions.
  1. +2 −2 toolset/run-ci.py
View
@@ -82,14 +82,14 @@ def _should_run(self):
'''
# Look for changes to core TFB framework code
find_tool_changes = "git diff --name-only %s | grep toolset | wc -l" % self.commit_range
find_tool_changes = "git diff --name-only %s | grep '^toolset' | wc -l" % self.commit_range
changes = subprocess.check_output(find_tool_changes, shell=True)
if int(changes) != 0:
log.info("Found changes to core framework code")
return True
# Look for changes relevant to this test
find_test_changes = "git diff --name-only %s | grep %s | wc -l" % (self.commit_range, self.test.directory)
find_test_changes = "git diff --name-only %s | grep '^%s' | wc -l" % (self.commit_range, self.test.directory)
changes = subprocess.check_output(find_test_changes, shell=True)
if int(changes) == 0:
log.info("No changes found for %s", self.name)

0 comments on commit 8174939

Please sign in to comment.