Test failure on Linux
Hi,
When updating the gobject-introspection conda-forge recipe to the latest stable release, I encountered the following test failure with the Linux builds:
The output from the failed tests:
25/61 test_ccompiler.py FAIL 2.04s (exit status 1)
--- command ---
13:19:29 PYTHONPATH='$SRC_DIR/forgebuild' $PREFIX/bin/python $SRC_DIR/forgebuild/../tests/scanner/test_ccompiler.py
--- stderr ---
..s...xF.x......s..
======================================================================
FAIL: test_link_args_override (__main__.UnixCCompilerTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "$SRC_DIR/forgebuild/../tests/scanner/test_ccompiler.py", line 73, in test_link_args_override
self.assertEqual(compiler.compiler.linker_so[0], "foobar")
AssertionError: 'gcc' != 'foobar'
- gcc
+ foobar
I managed to fix it with the following patch: if you think I did right I will gladly open a MR:
diff --git a/tests/scanner/test_ccompiler.py b/tests/scanner/test_ccompiler.py
index 6c0674a1..971f53d4 100644
--- a/tests/scanner/test_ccompiler.py
+++ b/tests/scanner/test_ccompiler.py
@@ -68,7 +68,7 @@ class UnixCCompilerTest(unittest.TestCase):
self.assertEqual(compiler.linker_cmd[0], "foobar")
def test_link_args_override(self):
- with Environ(dict(CC="foobar")):
+ with Environ(dict(LDSHARED="foobar")):
compiler = CCompiler()
self.assertEqual(compiler.compiler.linker_so[0], "foobar")