-
Notifications
You must be signed in to change notification settings - Fork 11
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
Less hard-coded architecture in tests (fix #296) #322
base: master
Are you sure you want to change the base?
Conversation
I know there was also reported error in test_build_srpm, but it passed on my Fedora 21 (32b) so it is probably about different problems if any. |
1df4ec6
to
2069e89
Compare
refactor it with regexp checking, please |
2069e89
to
b5e9a17
Compare
'/usr/include/libio.h', | ||
'/usr/include/gnu/stubs-64.h' | ||
'/usr/lib/gcc/.*-redhat-linux/\d+.\d+.\d+./include/stddef.h', |
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 would change it to '/usr/lib/gcc/[^/]*-redhat-linux/\d+.\d+.\d+./include/stddef.h'
Fixed. |
@@ -133,6 +132,11 @@ def test_files_to_pkgs(self): | |||
self.assertEqual({"python3-dnf"}, self.spec.BuildRequires) | |||
self.assertEqual(MockedLogging.called, 2) | |||
|
|||
def find_match(self, expected, files): |
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.
defined at two places :). You can move it into tests/support.py and refactor it to assertRegexpMatch
RPGTestCase method.
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.
aggregating these parts: ref_re = [re.compile(r) for r in expected_required_files]
, output = self.find_match(ref_re, base.spec.required_files)
, self.assertEqual(len(output), len(expected_required_files))
I just fixed this when I changed gcc/g++ to makedepend - better performance and finds all files that matters without architecture dependencies. |
Miro's commits in #321 were merged. @regeciovad can you confirm that all tests are passing on your architecture without your commit in this PR. (I still believe |
Yes, all tests are passing in the actual master branch. |
Then I will let this PR hang until we need |
|
No description provided.