2 #-------------------------------------------------------------------------------
5 # Run all pyelftools tests.
7 # Eli Bendersky (eliben@gmail.com)
8 # This code is in the public domain
9 #-------------------------------------------------------------------------------
10 from __future__
import print_function
11 import subprocess
, sys
12 from utils
import is_in_rootdir
14 def run_test_script(path
, *args
):
15 cmd
= [sys
.executable
, path
] + list(args
)
16 print("Running '%s'" % ' '.join(cmd
))
17 subprocess
.check_call(cmd
)
20 if not is_in_rootdir():
21 testlog
.error('Error: Please run me from the root dir of pyelftools!')
23 run_test_script('test/run_all_unittests.py')
24 run_test_script('test/run_examples_test.py')
25 run_test_script('test/run_readelf_tests.py', '--parallel')
26 run_test_script('test/run_dwarfdump_tests.py', '--parallel')
28 if __name__
== '__main__':