Created attachment 352186 [details, diff] python-gflags-2.0-skip-permission-test-as-root.patch One unit test in python-gflags checks for a permission denied error on a file that it chmodded to 0. This only works when running as a normal user (i.e. FEATURES=userpriv) because root still can read files with no read access bits set. Considering userpriv is still not the default this is probably a good fix to include. Reported upstream: http://code.google.com/p/python-gflags/issues/detail?id=14 I've included a quick fix in an overlay of my own: https://github.com/marineam/misc-overlay/tree/master/dev-python/python-gflags
python-gflags $ PYTHON_TARGETS="pypy1_9 (or pypy2_0)" ebuild python-gflags-2.0.ebuild clean test yields >>> Source compiled. * pypy1_9: running distutils-r1_run_phase python_test OR pypy2_0 .......F...F. ====================================================================== FAIL: testFlagHelpInXML_SpaceSeparatedList (__main__.WriteFlagHelpInXMLFormatTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "gflags_helpxml_test.py", line 253, in testFlagHelpInXML_SpaceSeparatedList self._CheckFlagHelpInXML('dirs', 'tool', expected_output) File "gflags_helpxml_test.py", line 102, in _CheckFlagHelpInXML self.assertMultiLineEqual(sio.getvalue(), expected_output) File "/mnt/gen2/TmpDir/portage/dev-python/python-gflags-2.0/work/python-gflags-2.0/tests/gflags_googletest.py", line 104, in assertMultiLineEqual unittest.TestCase.assertMultiLineEqual(self, expected, actual) AssertionError: " <flag>\n <file>tool</file>\n <name>dirs</name>\n <meaning>Directories to [truncated]... != " <flag>\n <file>tool</file>\n <name>dirs</name>\n <meaning>Directories to [truncated]... <flag> <file>tool</file> <name>dirs</name> <meaning>Directories to search.</meaning> <default>src libs bin</default> <current>['src', 'libs', 'bin']</current> <type>whitespace separated list of strings</type> - <list_separator>' '</list_separator> <list_separator>'\t'</list_separator> <list_separator>'\n'</list_separator> - <list_separator>'\r'</list_separator> <list_separator>'\x0b'</list_separator> <list_separator>'\x0c'</list_separator> + <list_separator>'\r'</list_separator> + <list_separator>' '</list_separator> </flag> ====================================================================== FAIL: testWriteHelpInXMLFormat (__main__.WriteHelpInXMLFormatTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "gflags_helpxml_test.py", line 527, in testWriteHelpInXMLFormat self.assertMultiLineEqual(actual_output, expected_output) File "/mnt/gen2/TmpDir/portage/dev-python/python-gflags-2.0/work/python-gflags-2.0/tests/gflags_googletest.py", line 104, in assertMultiLineEqual unittest.TestCase.assertMultiLineEqual(self, expected, actual) AssertionError: '<?xml version="1.0"?>\n<AllFlags>\n <program>gflags_helpxml_test.py</program>\ [truncated]... != '<?xml version="1.0"?>\n<AllFlags>\n <program>gflags_helpxml_test.py</program>\ [truncated]... Diff is 5042 characters long. Set self.maxDiff to None to see it. ---------------------------------------------------------------------- Ran 13 tests in 0.041s FAILED (failures=2) dev-python/python-gflags $ PYTHON_TARGETS="python2_7" ebuild python-gflags-2.0.ebuild clean test yields >>> Source compiled. * python2_7: running distutils-r1_run_phase python_test ............. ---------------------------------------------------------------------- Ran 13 tests in 0.015s OK .........E......EEEWarning: Hit circular flagfile dependency: /mnt/gen2/TmpDir/portage/dev-python/python-gflags-2.0/temp/python2.7/gflags_unittestuxxTfV/UnitTestFile3.tst EEEEE..E.EEF......... ======================================================================
This doesn't seem to happen in 3.1.2. Feel free to reopen if I tested wrong.