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

Less hard-coded architecture in tests (fix #296) #322

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

regeciovad
Copy link
Contributor

No description provided.

@regeciovad
Copy link
Contributor Author

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.

@regeciovad regeciovad force-pushed the issue296 branch 2 times, most recently from 1df4ec6 to 2069e89 Compare September 30, 2015 12:37
@jsilhan
Copy link
Member

jsilhan commented Sep 30, 2015

refactor it with regexp checking, please

'/usr/include/libio.h',
'/usr/include/gnu/stubs-64.h'
'/usr/lib/gcc/.*-redhat-linux/\d+.\d+.\d+./include/stddef.h',
Copy link
Member

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'

@regeciovad
Copy link
Contributor Author

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):
Copy link
Member

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.

Copy link
Member

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))

@onionka
Copy link
Member

onionka commented Oct 2, 2015

I just fixed this when I changed gcc/g++ to makedepend - better performance and finds all files that matters without architecture dependencies.

@jsilhan
Copy link
Member

jsilhan commented Oct 5, 2015

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 assertRegexMatch will be useful anyway.)

@regeciovad
Copy link
Contributor Author

Yes, all tests are passing in the actual master branch.

@jsilhan jsilhan added the defered label Oct 6, 2015
@jsilhan
Copy link
Member

jsilhan commented Oct 6, 2015

Then I will let this PR hang until we need assertRegexMatch somewhere else.

@jsilhan
Copy link
Member

jsilhan commented Feb 24, 2016

@PavolVican be a QA and test this manually from GUI, please not for this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants