Re: subunit and sle15_python_module_pythons errors out
Good morning Dirk, On 08.05.23 at 17:27 Dirk Müller wrote:
On Montag, 8. Mai 2023 13:19:50 CEST Johannes Kastl wrote:
- process = subprocess.Popen(self.script, shell=True, + process = subprocess.Popen(sys.executable, self.script, shell=True, Thanks for the patch. This did not work, as it errored out with a stacktrace.
It would have been useful to share teh stack trace. I guess with a shell it doesn't expect argument lists. so how about removing the shell=True in the line above? then it should invoke "sys.exutable self.script" and that should work then.
Sorry, that would have been helpful, yes. I'll revisit this in the next couple of days. In the meantime I disabled the checks and tried to get the package to build at all (it is only a dependency and I wanted to get to the point where I have everything for the Ansible tool chain at least building...). Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
On 09.05.23 at 07:52 Johannes Kastl wrote:
On 08.05.23 at 17:27 Dirk Müller wrote:
On Montag, 8. Mai 2023 13:19:50 CEST Johannes Kastl wrote:
- process = subprocess.Popen(self.script, shell=True, + process = subprocess.Popen(sys.executable, self.script, shell=True, Thanks for the patch. This did not work, as it errored out with a stacktrace.
It would have been useful to share teh stack trace. I guess with a shell it doesn't expect argument lists. so how about removing the shell=True in the line above? then it should invoke "sys.exutable self.script" and that should work then.
Sorry, that would have been helpful, yes.
Here is the traceback. I set up a branch with the reworked package (that builds fine for 15.4 backports without the checks), the package without the patch (that fails the checks on 15.4 backports) and the package with the patch. Kind Regards, Johannes
https://build.opensuse.org/project/monitor/home:ojkastl_buildservice:branche...
[ 54s] Traceback (most recent call last): [ 54s] File "<frozen runpy>", line 198, in _run_module_as_main [ 54s] File "<frozen runpy>", line 88, in _run_code [ 54s] File "/usr/lib/python3.11/site-packages/testtools/run.py", line 260, in <module> [ 54s] main(sys.argv, sys.stdout) [ 54s] File "/usr/lib/python3.11/site-packages/testtools/run.py", line 256, in main [ 54s] program = TestProgram(argv=argv, testRunner=partial(TestToolsTestRunner, stdout=stdout), [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib/python3.11/site-packages/testtools/run.py", line 180, in __init__ [ 54s] self.runTests() [ 54s] File "/usr/lib/python3.11/site-packages/testtools/run.py", line 214, in runTests [ 54s] self.result = testRunner.run(self.test) [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib/python3.11/site-packages/testtools/run.py", line 100, in run [ 54s] return test.run(result) [ 54s] ^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 122, in run [ 54s] test(result) [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 84, in __call__ [ 54s] return self.run(*args, **kwds) [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 122, in run [ 54s] test(result) [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 84, in __call__ [ 54s] return self.run(*args, **kwds) [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 122, in run [ 54s] test(result) [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 84, in __call__ [ 54s] return self.run(*args, **kwds) [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 122, in run [ 54s] test(result) [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 84, in __call__ [ 54s] return self.run(*args, **kwds) [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 122, in run [ 54s] test(result) [ 54s] File "/usr/lib64/python3.11/unittest/case.py", line 678, in __call__ [ 54s] return self.run(*args, **kwds) [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/home/abuild/rpmbuild/BUILD/subunit-1.4.2/python/subunit/__init__.py", line 904, in run [ 54s] self._run(result) [ 54s] File "/home/abuild/rpmbuild/BUILD/subunit-1.4.2/python/subunit/__init__.py", line 912, in _run [ 54s] process = subprocess.Popen(sys.executable, self.script, shell=True, [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib64/python3.11/subprocess.py", line 835, in __init__ [ 54s] raise TypeError("bufsize must be an integer") [ 54s] TypeError: bufsize must be an integer [ 54s] Tests running...
-- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
On 09.05.23 at 08:09 Johannes Kastl wrote:
On 09.05.23 at 07:52 Johannes Kastl wrote: On 08.05.23 at 17:27 Dirk Müller wrote:
I guess with a shell it doesn't expect argument lists. so how about removing the shell=True in the line above? then it should invoke "sys.exutable self.script" and that should work then.
Without the shell=True it runs into the same stacktrace. And also with "shell=False".
[ 54s] Traceback (most recent call last): [ 54s] File "<frozen runpy>", line 198, in _run_module_as_main [ 54s] File "<frozen runpy>", line 88, in _run_code [ 54s] File "/usr/lib/python3.11/site-packages/testtools/run.py", line 260, in <module> [ 54s] main(sys.argv, sys.stdout) [ 54s] File "/usr/lib/python3.11/site-packages/testtools/run.py", line 256, in main [ 54s] program = TestProgram(argv=argv, testRunner=partial(TestToolsTestRunner, stdout=stdout), [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib/python3.11/site-packages/testtools/run.py", line 180, in __init__ [ 54s] self.runTests() [ 54s] File "/usr/lib/python3.11/site-packages/testtools/run.py", line 214, in runTests [ 54s] self.result = testRunner.run(self.test) [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib/python3.11/site-packages/testtools/run.py", line 100, in run [ 54s] return test.run(result) [ 54s] ^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 122, in run [ 54s] test(result) [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 84, in __call__ [ 54s] return self.run(*args, **kwds) [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 122, in run [ 54s] test(result) [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 84, in __call__ [ 54s] return self.run(*args, **kwds) [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 122, in run [ 54s] test(result) [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 84, in __call__ [ 54s] return self.run(*args, **kwds) [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 122, in run [ 54s] test(result) [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 84, in __call__ [ 54s] return self.run(*args, **kwds) [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib64/python3.11/unittest/suite.py", line 122, in run [ 54s] test(result) [ 54s] File "/usr/lib64/python3.11/unittest/case.py", line 678, in __call__ [ 54s] return self.run(*args, **kwds) [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/home/abuild/rpmbuild/BUILD/subunit-1.4.2/python/subunit/__init__.py", line 904, in run [ 54s] self._run(result) [ 54s] File "/home/abuild/rpmbuild/BUILD/subunit-1.4.2/python/subunit/__init__.py", line 912, in _run [ 54s] process = subprocess.Popen(sys.executable, self.script, [ 54s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [ 54s] File "/usr/lib64/python3.11/subprocess.py", line 835, in __init__ [ 54s] raise TypeError("bufsize must be an integer") [ 54s] TypeError: bufsize must be an integer
-- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Am Dienstag, 9. Mai 2023, 08:09:03 CEST schrieb Johannes Kastl: Hi Johannes,
Here is the traceback. I set up a branch with the reworked package (that builds fine for 15.4 backports without the checks), the package without the patch (that fails the checks on 15.4 backports) and the package with the patch.
Ah, okay, it needs to be in a list or tuple: - process = subprocess.Popen(self.script, shell=True, + process = subprocess.Popen((sys.executable, self.script), shell=True, Greetings, Dirk
Hi Dirk, On 10.05.23 at 11:48 Dirk Müller wrote:
Ah, okay, it needs to be in a list or tuple:
- process = subprocess.Popen(self.script, shell=True, + process = subprocess.Popen((sys.executable, self.script), shell=True,
Thanks for the help! But this also fails (for all targets, this is from Tumbleweed):
https://build.opensuse.org/package/show/home:ojkastl_buildservice:branches:d...
[ 60s] ====================================================================== [ 60s] FAIL: subunit.tests.test_test_protocol.TestExecTestCase.test_args [ 60s] ---------------------------------------------------------------------- [ 60s] Traceback (most recent call last): [ 60s] File "/home/abuild/rpmbuild/BUILD/subunit-1.4.2/python/subunit/tests/test_test_protocol.py", line 1057, in test_args [ 60s] self.assertEqual(1, result.testsRun) [ 60s] File "/usr/lib64/python3.10/unittest/case.py", line 845, in assertEqual [ 60s] assertion_func(first, second, msg=msg) [ 60s] File "/usr/lib64/python3.10/unittest/case.py", line 838, in _baseAssertEqual [ 60s] raise self.failureException(msg) [ 60s] AssertionError: 1 != 0 [ 60s] ====================================================================== [ 60s] FAIL: subunit.tests.test_test_protocol.TestExecTestCase.test_run [ 60s] ---------------------------------------------------------------------- [ 60s] Traceback (most recent call last): [ 60s] File "/home/abuild/rpmbuild/BUILD/subunit-1.4.2/python/subunit/tests/test_test_protocol.py", line 1070, in test_run [ 60s] self.assertEqual([ [ 60s] File "/usr/lib64/python3.10/unittest/case.py", line 845, in assertEqual [ 60s] assertion_func(first, second, msg=msg) [ 60s] File "/usr/lib64/python3.10/unittest/case.py", line 1051, in assertListEqual [ 60s] self.assertSequenceEqual(list1, list2, msg, seq_type=list) [ 60s] File "/usr/lib64/python3.10/unittest/case.py", line 1033, in assertSequenceEqual [ 60s] self.fail(msg) [ 60s] File "/usr/lib64/python3.10/unittest/case.py", line 675, in fail [ 60s] raise self.failureException(msg) [ 60s] AssertionError: Lists differ: [('startTest', <subunit.RemotedTestCase de[666 chars]r'>)] != [] [ 60s] [ 60s] First list contains 9 additional elements. [ 60s] First extra element 0: [ 60s] ('startTest', <subunit.RemotedTestCase description='old mcdonald'>) [ 60s] [ 60s] Diff is 753 characters long. Set self.maxDiff to None to see it. [ 60s] [ 60s] Ran 521 tests in 1.983s [ 60s] FAILED (failures=2) [ 60s] make[1]: *** [Makefile:1570: check-local] Error 1 [ 60s] make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/subunit-1.4.2' [ 60s] make: *** [Makefile:1408: check-am] Error 2 [ 60s] error: Bad exit status from /var/tmp/rpm-tmp.yBbYJw (%check)
Kind Regards, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
participants (2)
-
Dirk Müller
-
Johannes Kastl