Skip to content

Commit

Permalink
Merge pull request Ericsson#4117 from dkrupp/cc_bin_test_fix
Browse files Browse the repository at this point in the history
Cc bin test fix
  • Loading branch information
bruntib authored Dec 7, 2023
2 parents b25976b + fc8ed1a commit dc518cc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions analyzer/tests/unit/test_env_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ def test_CC_ANALYZER_BIN(self):
machine is expected to run some version of gcc, so this should be OK.
"""
bin_gcc_var = self._get_analyzer_bin_for_CC_ANALYZER_BIN("gcc:gcc")
self.assertIn("gcc", bin_gcc_var)
self.assertNotIn("g++", bin_gcc_var)
self.assertTrue(bin_gcc_var.endswith("gcc"))
self.assertTrue(not bin_gcc_var.endswith("g++"))

bin_gpp_var = self._get_analyzer_bin_for_CC_ANALYZER_BIN("gcc:g++")
self.assertIn("g++", bin_gpp_var)
self.assertNotIn("gcc", bin_gpp_var)
self.assertTrue(bin_gpp_var.endswith("g++"))
self.assertTrue(not bin_gpp_var.endswith("gcc"))

self.assertNotEqual(bin_gcc_var, bin_gpp_var)

Expand All @@ -88,11 +88,11 @@ def test_CC_ANALYZER_BIN_overrides_CC_ANALYZERS_FROM_PATH(self):
context.analyzer_env["CC_ANALYZERS_FROM_PATH"] = '1'

bin_gcc_var = self._get_analyzer_bin_for_CC_ANALYZER_BIN("gcc:gcc")
self.assertIn("gcc", bin_gcc_var)
self.assertNotIn("g++", bin_gcc_var)
self.assertTrue(bin_gcc_var.endswith("gcc"))
self.assertTrue(not bin_gcc_var.endswith("g++"))

bin_gpp_var = self._get_analyzer_bin_for_CC_ANALYZER_BIN("gcc:g++")
self.assertIn("g++", bin_gpp_var)
self.assertNotIn("gcc", bin_gpp_var)
self.assertTrue(bin_gpp_var.endswith("g++"))
self.assertTrue(not bin_gpp_var.endswith("gcc"))

self.assertNotEqual(bin_gcc_var, bin_gpp_var)

0 comments on commit dc518cc

Please sign in to comment.