aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-10-08 20:27:25 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2018-11-04 15:42:06 +0000
commite7bed74ae2a96169d512aba826aeb988d580bb15 (patch)
tree13ec2d408c90ed168de1715297eea563482bee19
parentc789efb8c883a719b308e023b82fab4d808ab460 (diff)
downloadmeson-e7bed74ae2a96169d512aba826aeb988d580bb15.zip
meson-e7bed74ae2a96169d512aba826aeb988d580bb15.tar.gz
meson-e7bed74ae2a96169d512aba826aeb988d580bb15.tar.bz2
Fix a bug in test_compiler_detection
AR wasn't reset in the environment, so this test could fail if more than one language compiler was specified in the environment and the linker wasn't 'ar'
-rwxr-xr-xrun_unittests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index b780883..00bf504 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -1696,6 +1696,8 @@ class AllPlatformTests(BasePlatformTests):
wrapperlinker_s += shlex.quote(w) + ' '
os.environ['AR'] = wrapperlinker_s
wlinker = env.detect_static_linker(wcc)
+ # Pop it so we don't use it for the next detection
+ evalue = os.environ.pop('AR')
# Must be the same type since it's a wrapper around the same exelist
self.assertIs(type(cc), type(wcc))
self.assertIs(type(linker), type(wlinker))