Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: exclude all tests with difference parameters in `--exclude` list #14316

Merged
merged 1 commit into from Sep 27, 2018

Conversation

Projects
None yet
6 participants
@ken2812221
Copy link
Member

commented Sep 25, 2018

Fix broken exclusion list in functional tests. See #14007 (review)

@ken2812221 ken2812221 changed the title tests: exclude all tests with difference parameters tests: exclude all tests with difference parameters in `--exclude` list Sep 25, 2018

@ken2812221 ken2812221 force-pushed the ken2812221:2018-09-25-test-fix branch Sep 25, 2018

@fanquake fanquake added the Tests label Sep 25, 2018

@DrahtBot

This comment has been minimized.

Copy link
Contributor

commented Sep 25, 2018

Reviewers, this pull request conflicts with the following ones:
  • #14320 ([bugfix] wallet: Fix duplicate fileid detection by ken2812221)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@jnewbery
Copy link
Member

left a comment

utACK with one request for a comment.

Show resolved Hide resolved test/functional/test_runner.py
test/functional/test_runner.py Outdated
@@ -285,11 +285,12 @@ def main():

# Remove the test cases that the user has explicitly asked to exclude.
if args.exclude:
exclude_tests = [re.sub("\.py$", "", test) + (".py" if ".py" not in test else "") for test in args.exclude.split(',')]
exclude_tests = [re.sub("\.py$", "", test) for test in args.exclude.split(',')]

This comment has been minimized.

Copy link
@MarcoFalke

MarcoFalke Sep 25, 2018

Member

nit: could remove the use of the re module, since it is no longer required? "foo.py".split('.py')[0] == "foo".split('.py')[0]

@ken2812221 ken2812221 force-pushed the ken2812221:2018-09-25-test-fix branch 2 times, most recently Sep 25, 2018

@ken2812221 ken2812221 force-pushed the ken2812221:2018-09-25-test-fix branch to c7b3e48 Sep 25, 2018

@DrahtBot DrahtBot removed the Needs rebase label Sep 25, 2018

@jimmysong
Copy link
Contributor

left a comment

Couple of nits , but otherwise looks good.

@@ -285,11 +285,13 @@ def main():

# Remove the test cases that the user has explicitly asked to exclude.
if args.exclude:
exclude_tests = [re.sub("\.py$", "", test) + (".py" if ".py" not in test else "") for test in args.exclude.split(',')]
exclude_tests = [test.split('.py')[0] for test in args.exclude.split(',')]

This comment has been minimized.

Copy link
@jimmysong

jimmysong Sep 27, 2018

Contributor

nit: I prefer test.strip('.py') just in case there's a very unlikely '.py' in the middle of a file name.

This comment has been minimized.

Copy link
@MarcoFalke

MarcoFalke Sep 27, 2018

Member

Wouldn't work with args?

>>> 'foo.py --arg'.strip('.py')
'foo.py --arg'
test_list.remove(exclude_test)
else:
# Remove <test_name>.py and <test_name>.py --arg from the test list
exclude_list = [test for test in test_list if test.split('.py')[0] == exclude_test]

This comment has been minimized.

Copy link
@jimmysong

jimmysong Sep 27, 2018

Contributor

nit: same as above. test.strip('.py') is preferable over test.split('.py')[0] and reads a little better.

@MarcoFalke

This comment has been minimized.

Copy link
Member

commented Sep 27, 2018

utACK c7b3e48

MarcoFalke added a commit to MarcoFalke/bitcoin that referenced this pull request Sep 27, 2018

Merge bitcoin#14316: tests: exclude all tests with difference paramet…
…ers in `--exclude` list

c7b3e48 tests: exclude all tests with difference parameters (Chun Kuan Lee)

Pull request description:

  Fix broken exclusion list in functional tests. See bitcoin#14007 (review)

Tree-SHA512: b6c2b86fef13e3c00c695adaeeb3e47ee9b48877c71bc605d24201ce931b2ef3ae9f5f199071fa1ec5de2d7aadc478410094c380cc297922e683e9b2569cda03

@MarcoFalke MarcoFalke merged commit c7b3e48 into bitcoin:master Sep 27, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ken2812221 ken2812221 deleted the ken2812221:2018-09-25-test-fix branch Sep 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.