aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2020-06-08 18:58:48 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2020-06-22 15:01:34 -0700
commitf71c828d99fcfc6961882b3c37fbe2d0a712a1e6 (patch)
tree055f82772febfc1db35d2404e708dec86d5c7a7d
parent77935db7b0a36b499d07a142f7a97cf219d1da5a (diff)
downloadmeson-f71c828d99fcfc6961882b3c37fbe2d0a712a1e6.zip
meson-f71c828d99fcfc6961882b3c37fbe2d0a712a1e6.tar.gz
meson-f71c828d99fcfc6961882b3c37fbe2d0a712a1e6.tar.bz2
unittests: Fix test_identity_cross on Solaris
Since mesonbuild/environment.py doesn't recognize Studio compilers, force use of gcc on Solaris for now. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rwxr-xr-xtest cases/unit/61 identity cross/build_wrapper.py10
-rwxr-xr-xtest cases/unit/61 identity cross/host_wrapper.py10
2 files changed, 16 insertions, 4 deletions
diff --git a/test cases/unit/61 identity cross/build_wrapper.py b/test cases/unit/61 identity cross/build_wrapper.py
index b5fe7bb..15d5c07 100755
--- a/test cases/unit/61 identity cross/build_wrapper.py
+++ b/test cases/unit/61 identity cross/build_wrapper.py
@@ -1,5 +1,11 @@
#!/usr/bin/env python3
-import subprocess, sys
+import subprocess, sys, platform
-subprocess.call(["cc", "-DEXTERNAL_BUILD"] + sys.argv[1:])
+# Meson does not yet support Studio cc on Solaris, only gcc or clang
+if platform.system() == 'SunOS':
+ cc = 'gcc'
+else:
+ cc = 'cc'
+
+subprocess.call([cc, "-DEXTERNAL_BUILD"] + sys.argv[1:])
diff --git a/test cases/unit/61 identity cross/host_wrapper.py b/test cases/unit/61 identity cross/host_wrapper.py
index e88577c..a3a694a 100755
--- a/test cases/unit/61 identity cross/host_wrapper.py
+++ b/test cases/unit/61 identity cross/host_wrapper.py
@@ -1,5 +1,11 @@
#!/usr/bin/env python3
-import subprocess, sys
+import subprocess, sys, platform
-subprocess.call(["cc", "-DEXTERNAL_HOST"] + sys.argv[1:])
+# Meson does not yet support Studio cc on Solaris, only gcc or clang
+if platform.system() == 'SunOS':
+ cc = 'gcc'
+else:
+ cc = 'cc'
+
+subprocess.call([cc, "-DEXTERNAL_HOST"] + sys.argv[1:])