Skip to content

Commit

Permalink
[ci] fix check name detection of test files (#3021)
Browse files Browse the repository at this point in the history
  • Loading branch information
degemer authored and truthbk committed Nov 16, 2016
1 parent 9bc8d4c commit c9c986e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ci/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ def can_skip?
puts "Git diff: \n#{git_output}"
git_output.each_line do |filename|
filename.strip!
puts filename
if filename.start_with? 'checks.d'
check_name = File.basename(filename, '.py')
elsif filename.start_with?('tests/checks/integration', 'tests/checks/mock')
check_name = File.basename(filename, '.py').slice 'test_'
# 5 is test_
check_name = File.basename(filename, '.py').slice(5, 100)
elsif filename.start_with?('tests/checks/fixtures', 'conf.d')
next
else
Expand Down
2 changes: 1 addition & 1 deletion tests/checks/integration/test_mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_build_metric_list(self):
DEFAULT_METRICS = {
m_name: m_type for d in [
self.check.BASE_METRICS, self.check.DURABILITY_METRICS,
self.check.LOCKS_METRICS, self.check.WIREDTIGER_METRICS,]
self.check.LOCKS_METRICS, self.check.WIREDTIGER_METRICS, ]
for m_name, m_type in d.iteritems()
}

Expand Down

0 comments on commit c9c986e

Please sign in to comment.