New submission from STINNER Victor <vstin...@python.org>:
Example: https://travis-ci.org/github/python/cpython/jobs/672698615 Output: =========================================== 0:09:01 load avg: 3.96 [104/421/1] test_distutils failed -- running: test_multiprocessing_forkserver (1 min 13 sec), test_unparse (6 min 21 sec) Warning -- files was modified by test_distutils Before: [] After: ['_configtest.gcno'] test test_distutils failed -- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/distutils/tests/test_build_ext.py", line 112, in test_build_ext assert_python_ok('-c', code) File "/home/travis/build/python/cpython/Lib/test/support/script_helper.py", line 156, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/home/travis/build/python/cpython/Lib/test/support/script_helper.py", line 142, in _assert_python res.fail(cmd_line) File "/home/travis/build/python/cpython/Lib/test/support/script_helper.py", line 70, in fail raise AssertionError("Process return code is %d\n" AssertionError: Process return code is 1 command line: ['/home/travis/build/python/cpython/python', '-X', 'faulthandler', '-I', '-c', "\ntmp_dir = '/tmp/tmp3y4hpawx'\n\nimport sys\nimport unittest\nfrom test import support\n\nsys.path.insert(0, tmp_dir)\nimport xx\n\nclass Tests(unittest.TestCase):\n def test_xx(self):\n for attr in ('error', 'foo', 'new', 'roj'):\n self.assertTrue(hasattr(xx, attr))\n\n self.assertEqual(xx.foo(2, 5), 7)\n self.assertEqual(xx.foo(13,15), 28)\n self.assertEqual(xx.new().demo(), None)\n if support.HAVE_DOCSTRINGS:\n doc = 'This is a template module just for instruction.'\n self.assertEqual(xx.__doc__, doc)\n self.assertIsInstance(xx.Null(), xx.Null)\n self.assertIsInstance(xx.Str(), xx.Str)\n\n\nunittest.main()\n"] stdout: --- --- stderr: --- Traceback (most recent call last): File "<string>", line 9, in <module> ImportError: /tmp/tmp3y4hpawx/xx.cpython-39-x86_64-linux-gnu.so: undefined symbol: __gcov_merge_add --- =========================================== Python is built GCC with -ftest-coverage option. But it seems like this option is "leaked" to C flags used to build third party extensions in distutils. Maybe CFLAGS_NODIST should be used instead of CFLAGS. The Travis CI job runs these commands: --- ./configure xvfb-run make -j4 coverage-report make pythoninfo bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml --- ---------- components: Tests messages: 366047 nosy: vstinner priority: normal severity: normal status: open title: Test code coverage (C) job of Travis CI fails on test_distutils which creates _configtest.gcno file versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40237> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com