|
25 | 25 | config = configparser.ConfigParser()
|
26 | 26 | config.read(['nipa.config', "tester.config"])
|
27 | 27 |
|
28 |
| -results_dir = config.get('results', 'dir', fallback=os.path.join(NIPA_DIR, "results")) |
| 28 | +results_dir = config.get('results', 'dir', |
| 29 | + fallback=os.path.join(NIPA_DIR, "results")) |
29 | 30 |
|
30 | 31 | # TODO: use config
|
31 | 32 | parser = argparse.ArgumentParser()
|
32 |
| -parser.add_argument('--mdir', required=True, help='path to the directory with the patches') |
| 33 | +parser.add_argument('--mdir', required=True, |
| 34 | + help='path to the directory with the patches') |
33 | 35 | parser.add_argument('--tree', required=True, help='path to the tree to test on')
|
34 |
| -parser.add_argument('--tree-name', default='unknown', help='the tree name to expect') |
| 36 | +parser.add_argument('--tree-name', default='unknown', |
| 37 | + help='the tree name to expect') |
35 | 38 | parser.add_argument('--tree-branch', default='main',
|
36 | 39 | help='the branch or commit to use as a base for applying patches')
|
37 | 40 | parser.add_argument('--result-dir', default=results_dir,
|
|
41 | 44 | args.mdir = os.path.abspath(args.mdir)
|
42 | 45 | args.tree = os.path.abspath(args.tree)
|
43 | 46 |
|
44 |
| -log_init(config.get('log', 'type'), config.get('log', 'path'), force_single_thread=True) |
| 47 | +log_init(config.get('log', 'type'), config.get('log', 'path'), |
| 48 | + force_single_thread=True) |
45 | 49 |
|
46 | 50 | log_open_sec("Loading patches")
|
47 | 51 | try:
|
|
81 | 85 | tester.join()
|
82 | 86 |
|
83 | 87 | # Summary hack
|
84 |
| -os.system(f'for i in $(find {args.result_dir} -type f -name summary); do dir=$(dirname "$i"); head -n2 "$dir"/summary; cat "$dir"/desc 2>/dev/null; done' |
85 |
| - ) |
| 88 | +os.system(f'for i in $(find {args.result_dir} -type f -name summary); do ' + |
| 89 | + 'dir=$(dirname "$i"); ' + |
| 90 | + 'head -n2 "$dir"/summary; ' + |
| 91 | + 'cat "$dir"/desc 2>/dev/null; done' |
| 92 | +) |
0 commit comments