MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / check_dependicies

Function check_dependicies

helpers/check_dynamic_dependencies.py:10–38  ·  view source on GitHub ↗

Check the dynamic symbol versions. Parameters ---------- objdump_string : string The dynamic symbol table entries of the file (result of `objdump -T` command).

(objdump_string)

Source from the content-addressed store, hash-verified

8
9
10def check_dependicies(objdump_string):
11 """Check the dynamic symbol versions.
12
13 Parameters
14 ----------
15 objdump_string : string
16 The dynamic symbol table entries of the file (result of `objdump -T` command).
17 """
18 GLIBC_version = re.compile(r'0{16}[ \t]+GLIBC_(\d{1,2})[.](\d{1,3})[.]?\d{,3}[ \t]+')
19 versions = GLIBC_version.findall(objdump_string)
20 assert len(versions) > 1
21 for major, minor in versions:
22 assert int(major) <= 2
23 assert int(minor) <= 14
24
25 GLIBCXX_version = re.compile(r'0{16}[ \t]+GLIBCXX_(\d{1,2})[.](\d{1,2})[.]?(\d{,3})[ \t]+')
26 versions = GLIBCXX_version.findall(objdump_string)
27 assert len(versions) > 1
28 for major, minor, patch in versions:
29 assert int(major) == 3
30 assert int(minor) == 4
31 assert patch == '' or int(patch) <= 19
32
33 GOMP_version = re.compile(r'0{16}[ \t]+G?OMP_(\d{1,2})[.](\d{1,2})[.]?\d{,3}[ \t]+')
34 versions = GOMP_version.findall(objdump_string)
35 assert len(versions) > 1
36 for major, minor in versions:
37 assert int(major) == 1
38 assert int(minor) == 0
39
40
41if __name__ == "__main__":

Callers 1

Calls 1

compileMethod · 0.45

Tested by

no test coverage detected