test: update test-ns3.py to handle the mold linker

This commit is contained in:
Gabriel Ferreira
2023-05-29 23:44:11 -03:00
parent 4385f8709a
commit 458e3b15b4

View File

@@ -1387,10 +1387,10 @@ class NS3ConfigureTestCase(NS3BaseTestCase):
self.assertIn("Invalid library name: %s" % invalid_or_nonexistent_library, stderr)
elif invalid_or_nonexistent_library in ["gsd", "libfi", "calibre"]:
self.assertEqual(return_code, 2) # should fail due to missing library
# GCC's LD says cannot find
# LLVM's LLD says unable to find
if "lld" in stdout + stderr:
self.assertIn("unable to find library -l%s" % invalid_or_nonexistent_library, stderr)
elif "mold" in stdout + stderr:
self.assertIn("library not found: %s" % invalid_or_nonexistent_library, stderr)
else:
self.assertIn("cannot find -l%s" % invalid_or_nonexistent_library, stderr)
else: