]>
Commit | Line | Data |
---|---|---|
e3524c66 TH |
1 | #! /usr/bin/env python2 |
2 | ||
3 | import sys | |
4 | import os | |
5 | ||
6 | def main(): | |
7 | this_script = os.path.abspath(sys.argv[0]) | |
8 | basedir = os.path.dirname(this_script) | |
9 | arch_dir = os.path.join( | |
10 | basedir, | |
11 | '..', | |
12 | '..', | |
13 | 'depends', | |
14 | 'x86_64-unknown-linux-gnu', | |
15 | ) | |
16 | ||
17 | exit_code = 0 | |
18 | ||
19 | if os.path.isdir(arch_dir): | |
20 | lib_dir = os.path.join(arch_dir, 'lib') | |
21 | libraries = os.listdir(lib_dir) | |
22 | ||
23 | for lib in libraries: | |
24 | if lib.find(".so") != -1: | |
25 | print lib | |
26 | exit_code = 1 | |
27 | else: | |
28 | exit_code = 2 | |
29 | print "arch-specific build dir not present: {}".format(arch_dir) | |
30 | print "Did you build the ./depends tree?" | |
31 | print "Are you on a currently unsupported architecture?" | |
32 | ||
33 | if exit_code == 0: | |
34 | print "PASS." | |
35 | else: | |
36 | print "FAIL." | |
37 | ||
38 | sys.exit(exit_code) | |
39 | ||
40 | if __name__ == '__main__': | |
41 | main() |