-
Notifications
You must be signed in to change notification settings - Fork 16
Bug 1277653 - Add support for filtering whether tests should be run #56
Conversation
autophone.py
Outdated
| tests = PhoneTest.match(build_url=build_url) | ||
| tests = PhoneTest.match(build_url=build_url, | ||
| branch=msg['branch'], | ||
| revision=msg['revision']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build_url is going away since it no longer contains meta data in taskcluster build urls.
should have been repo=msg['branch'] ?
not sure about passing the revision and looking up the changeset inside of PhoneTest.match. More comments later.
…ased upon which directories were changed in a build; r?bc This adds a "run_if_changed" item to runtests section of a test configuration file. If present, the test will only run if files under those paths were modified in the revision being tested. This requires getting the pushlog and the diffs from the mercurial server in order to construct a list of files that were changed by that revision (and any other revision pushed at the same time.) If we are unable to retrieve the pushlog or the list of files, the test will run anyway, under the assumption that is both safer and a more likely to be noticed error condition than skipping the tests.
utils.py
Outdated
|
|
||
| if not pushlog: | ||
| logger.debug('Could not find pushlog for revision %s at %s' % | ||
| (revision, url)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined revision. Maybe just use the url in the debug message?
| if cd.startswith(td): | ||
| logger.debug('PhoneTest.match: test %s dir %s matched changeset_dirs %s' % (test, td, cd)) | ||
| matched = True | ||
| break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed that this will still continue executing the for cd loop....
We need to check matched and break out of the for cd loop if it is true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed now :)
|
Squashed and pushed to: 46936d2 |
This adds a "run_if_changed" item to runtests section of a test configuration
file. If present, the test will only run if files under those paths were
modified in the revision being tested.
This requires getting the pushlog and the diffs from the mercurial server in
order to construct a list of files that were changed by that revision (and any
other revision pushed at the same time.)
If we are unable to retrieve the pushlog or the list of files, the test will
run anyway, under the assumption that is both safer and a more likely to be
noticed error condition than skipping the tests.