Skip to content
This repository was archived by the owner on Aug 14, 2020. It is now read-only.

Conversation

@dminor
Copy link
Contributor

@dminor dminor commented Aug 3, 2016

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.

autophone.py Outdated
tests = PhoneTest.match(build_url=build_url)
tests = PhoneTest.match(build_url=build_url,
branch=msg['branch'],
revision=msg['revision'])
Copy link
Contributor

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.

dminor added 2 commits August 10, 2016 14:47
…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))
Copy link
Contributor

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
Copy link
Contributor

@bclary bclary Aug 16, 2016

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed now :)

@dminor
Copy link
Contributor Author

dminor commented Aug 17, 2016

Squashed and pushed to: 46936d2

@dminor dminor closed this Aug 17, 2016
@dminor dminor deleted the bug-1277653-fix branch August 17, 2016 16:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants