tests fail on raspbian with Python 3.5
Linux raspberrypi 4.19.27-v7+ #1206 SMP Wed Mar 6 14:40:18 GMT 2019 armv7l GNU/Linux gcc 8.3.0 native build, no cross-compilation
> ================================================================
> gobject-introspection 1.60.0: tests/scanner/test-suite.log
> ================================================================
>
> # TOTAL: 32
> # PASS: 31
> # SKIP: 0
> # XFAIL: 0
> # FAIL: 1
> # XPASS: 0
> # ERROR: 0
>
> .. contents:: :depth: 2
>
> FAIL: test_ccompiler.py
> =======================
>
> EEsEEEx.xEEEEEEsEE
> ======================================================================
> ERROR: test_compile_cc (__main__.UnixCCompilerTest)
> Checks that CC overrides used compiler.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./test_ccompiler.py", line 121, in test_compile_cc
> args = self.compile_args(environ=dict(CC='supercc'))
> File "./test_ccompiler.py", line 88, in compile_args
> spawn.assert_called_once()
> File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
> raise AttributeError(name)
> AttributeError: assert_called_once
>
> ======================================================================
> ERROR: test_compile_command (__main__.UnixCCompilerTest)
> Checks complete compilation command.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./test_ccompiler.py", line 209, in test_compile_command
> source='/tmp/file.c')
> File "./test_ccompiler.py", line 88, in compile_args
> spawn.assert_called_once()
> File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
> raise AttributeError(name)
> AttributeError: assert_called_once
>
> ======================================================================
> ERROR: test_compile_includes_cppflags (__main__.UnixCCompilerTest)
> Checks that compilation step includes both CFLAGS and CPPFLAGS, in that order.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./test_ccompiler.py", line 165, in test_compile_includes_cppflags
> CPPFLAGS='-fsecure -Ddebug'))
> File "./test_ccompiler.py", line 88, in compile_args
> spawn.assert_called_once()
> File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
> raise AttributeError(name)
> AttributeError: assert_called_once
>
> ======================================================================
> ERROR: test_deprecation_warnings_are_disabled_during_compilation (__main__.UnixCCompilerTest)
> Checks that deprecation warnings are disabled during compilation.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./test_ccompiler.py", line 154, in test_deprecation_warnings_are_disabled_during_compilation
> args = self.compile_args()
> File "./test_ccompiler.py", line 88, in compile_args
> spawn.assert_called_once()
> File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
> raise AttributeError(name)
> AttributeError: assert_called_once
>
> ======================================================================
> ERROR: test_flags_retaining_macros_are_filtered_out (__main__.UnixCCompilerTest)
> Checks that flags that would retain macros after preprocessing step are filtered out.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./test_ccompiler.py", line 171, in test_flags_retaining_macros_are_filtered_out
> args = self.preprocess_args(cpp_options=list(FLAGS_RETAINING_MACROS))
> File "./test_ccompiler.py", line 109, in preprocess_args
> spawn.assert_called_once()
> File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
> raise AttributeError(name)
> AttributeError: assert_called_once
>
> ======================================================================
> ERROR: test_multiple_args_in_cc (__main__.UnixCCompilerTest)
> Checks that shell word splitting rules are used to split CC.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./test_ccompiler.py", line 144, in test_multiple_args_in_cc
> args = self.compile_args(environ=dict(CC='build-log -m " hello there " gcc'))
> File "./test_ccompiler.py", line 88, in compile_args
> spawn.assert_called_once()
> File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
> raise AttributeError(name)
> AttributeError: assert_called_once
>
> ======================================================================
> ERROR: test_multiple_args_in_cpp (__main__.UnixCCompilerTest)
> Checks that shell word splitting rules are used to split CPP.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./test_ccompiler.py", line 149, in test_multiple_args_in_cpp
> args = self.preprocess_args(environ=dict(CPP='build-log -m " hello there" gcc -E'))
> File "./test_ccompiler.py", line 109, in preprocess_args
> spawn.assert_called_once()
> File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
> raise AttributeError(name)
> AttributeError: assert_called_once
>
> ======================================================================
> ERROR: test_perprocess_includes_cwd (__main__.UnixCCompilerTest)
> Checks that preprocessing includes current working directory.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./test_ccompiler.py", line 196, in test_perprocess_includes_cwd
> args = self.preprocess_args()
> File "./test_ccompiler.py", line 109, in preprocess_args
> spawn.assert_called_once()
> File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
> raise AttributeError(name)
> AttributeError: assert_called_once
>
> ======================================================================
> ERROR: test_preprocess_cc (__main__.UnixCCompilerTest)
> Checks that CC overrides used preprocessor when CPP is unspecified.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./test_ccompiler.py", line 126, in test_preprocess_cc
> args = self.preprocess_args(environ=dict(CC='clang'))
> File "./test_ccompiler.py", line 109, in preprocess_args
> spawn.assert_called_once()
> File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
> raise AttributeError(name)
> AttributeError: assert_called_once
>
> ======================================================================
> ERROR: test_preprocess_command (__main__.UnixCCompilerTest)
> "Checks complete preprocessing command.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./test_ccompiler.py", line 202, in test_preprocess_command
> source='/tmp/file.c')
> File "./test_ccompiler.py", line 109, in preprocess_args
> spawn.assert_called_once()
> File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
> raise AttributeError(name)
> AttributeError: assert_called_once
>
> ======================================================================
> ERROR: test_preprocess_cpp (__main__.UnixCCompilerTest)
> Checks that CPP overrides used preprocessor regardless of CC.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./test_ccompiler.py", line 132, in test_preprocess_cpp
> args = self.preprocess_args(environ=dict(CC='my-compiler', CPP='my-preprocessor'))
> File "./test_ccompiler.py", line 109, in preprocess_args
> spawn.assert_called_once()
> File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
> raise AttributeError(name)
> AttributeError: assert_called_once
>
> ======================================================================
> ERROR: test_preprocess_includes_cppflags (__main__.UnixCCompilerTest)
> Checks that preprocessing step includes CPPFLAGS.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./test_ccompiler.py", line 159, in test_preprocess_includes_cppflags
> args = self.preprocess_args(environ=dict(CPPFLAGS='-fsecure -Ddebug'))
> File "./test_ccompiler.py", line 109, in preprocess_args
> spawn.assert_called_once()
> File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
> raise AttributeError(name)
> AttributeError: assert_called_once
>
> ======================================================================
> ERROR: test_preprocess_preserves_comments (__main__.UnixCCompilerTest)
> Checks that preprocessing step includes flag that preserves comments.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "./test_ccompiler.py", line 191, in test_preprocess_preserves_comments
> args = self.preprocess_args()
> File "./test_ccompiler.py", line 109, in preprocess_args
> spawn.assert_called_once()
> File "/usr/lib/python3.5/unittest/mock.py", line 585, in __getattr__
> raise AttributeError(name)
> AttributeError: assert_called_once
>
> ----------------------------------------------------------------------
> Ran 18 tests in 0.289s
>
> FAILED (errors=13, skipped=2, expected failures=2)
> Traceback (most recent call last):
> File "../../tests/gi-tester", line 122, in <module>
> sys.exit(main(sys.argv))
> File "../../tests/gi-tester", line 116, in main
> subprocess.check_call([env["PYTHON"], targetname], env=env)
> File "/usr/lib/python3.5/subprocess.py", line 271, in check_call
> raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['/usr/bin/python3', './test_ccompiler.py']' returned non-zero exit status 1
> FAIL test_ccompiler.py (exit status: 1)
Edited by Christoph Reiter