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

Run tests in parallel with GNU parallel #1332

Merged
merged 6 commits into from
Oct 24, 2022
Merged

Conversation

gsingh93
Copy link
Member

@gsingh93 gsingh93 commented Oct 23, 2022

Note: this isn't ready to be merged. The tests run in parallel, but I still need to figure out how to update the test failed/success count.

Also need to add parallel to the dev dependencies.

Fixes #1330

@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2022

Codecov Report

Merging #1332 (67044e4) into dev (168677d) will decrease coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##              dev    #1332      +/-   ##
==========================================
- Coverage   54.92%   54.87%   -0.06%     
==========================================
  Files         153      153              
  Lines       19363    19387      +24     
  Branches     1811     1815       +4     
==========================================
+ Hits        10636    10639       +3     
- Misses       8277     8298      +21     
  Partials      450      450              
Impacted Files Coverage Δ
pwndbg/heap/ptmalloc.py 55.53% <0.00%> (-1.04%) ⬇️
pwndbg/commands/heap.py 77.98% <0.00%> (+0.44%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@gsingh93
Copy link
Member Author

With the latest commit the test pass/fail count is fixed. But I still need to get the names of the failed tests, which is feature I just added that now doesn't work with this approach 😅.

Also, for some reason ~5 tests fail when run under parallel, I'm not sure why yet.

@gsingh93
Copy link
Member Author

The latest commit fixes some issues where we used hardcoded /tmp paths in our tests, which obviously break with multiple tests using the same file. This was fixed by using tempfile.mktemp instead.

The last test failures look like this:

>       assert re.match(r"fd:\s+0x1 \((/dev/pts/\d+|pipe:\[\d+\])\)", line_fd)
E       AssertionError: assert None
E        +  where None = <function match at 0x7fbf446005e0>('fd:\\s+0x1 \\((/dev/pts/\\d+|pipe:\\[\\d+\\])\\)', 'fd:        0x1 (/tmp/parZ4YC4.par (deleted))')
E        +    where <function match at 0x7fbf446005e0> = re.match

@gsingh93
Copy link
Member Author

Ok, all bugs are fixed now. This is ready for review and can be merged if it looks good.

It would also be good to only display the output of failing jobs, but I will make that in a followup PR, as that's new functionality.

@gsingh93 gsingh93 marked this pull request as ready for review October 23, 2022 19:54
@gsingh93 gsingh93 merged commit f94bc27 into pwndbg:dev Oct 24, 2022
@gsingh93 gsingh93 deleted the parallel-tests branch October 24, 2022 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Run tests in parallel
2 participants