Add MacOS support to no-dot-so test
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
from glob import glob
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -79,11 +80,14 @@ def check_security_hardening():
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
def ensure_no_dot_so_in_depends():
|
def ensure_no_dot_so_in_depends():
|
||||||
arch_dir = os.path.join(
|
depends_dir = os.path.join(REPOROOT, 'depends')
|
||||||
REPOROOT,
|
arch_dir = os.path.join(depends_dir, 'x86_64-unknown-linux-gnu')
|
||||||
'depends',
|
if not os.path.isdir(arch_dir):
|
||||||
'x86_64-unknown-linux-gnu',
|
# Not Linux, try MacOS
|
||||||
)
|
arch_dirs = glob(os.path.join(depends_dir, 'x86_64-apple-darwin*'))
|
||||||
|
if arch_dirs:
|
||||||
|
# Just try the first one; there will only be on in CI
|
||||||
|
arch_dir = arch_dirs[0]
|
||||||
|
|
||||||
exit_code = 0
|
exit_code = 0
|
||||||
|
|
||||||
@@ -97,7 +101,7 @@ def ensure_no_dot_so_in_depends():
|
|||||||
exit_code = 1
|
exit_code = 1
|
||||||
else:
|
else:
|
||||||
exit_code = 2
|
exit_code = 2
|
||||||
print "arch-specific build dir not present: {}".format(arch_dir)
|
print "arch-specific build dir not present"
|
||||||
print "Did you build the ./depends tree?"
|
print "Did you build the ./depends tree?"
|
||||||
print "Are you on a currently unsupported architecture?"
|
print "Are you on a currently unsupported architecture?"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user