Lines Matching +full:stdout +full:- +full:path
1 # SPDX-License-Identifier: GPL-2.0+
23 prog: Program to run (with be passed a '-t' argument to run tests
37 path = os.path.dirname(prog)
39 glob_list = glob.glob(os.path.join(path, '*.py'))
44 glob_list += ['*libfdt.py', '*site-packages*']
45 cmd = ('PYTHONPATH=$PYTHONPATH:%s/sandbox_spl/tools python-coverage run '
46 '--omit "%s" %s -P1 -t' % (build_dir, ','.join(glob_list), prog))
48 stdout = command.Output('python-coverage', 'report')
49 lines = stdout.splitlines()
51 # Convert '/path/to/name.py' just the module name 'name'
52 test_set = set([os.path.splitext(os.path.basename(line.split()[0]))[0]
58 print stdout
61 coverage = lines[-1].split(' ')[-1]
65 print stdout
66 print ("Type 'python-coverage html' to get a report in "
74 # Use this to suppress stdout/stderr output:
75 # with capture_sys_output() as (stdout, stderr)
80 old_out, old_err = sys.stdout, sys.stderr
82 sys.stdout, sys.stderr = capture_out, capture_err
85 sys.stdout, sys.stderr = old_out, old_err