Line | |
---|
1 | import glob |
---|
2 | import sys |
---|
3 | import subprocess |
---|
4 | import os |
---|
5 | import json |
---|
6 | import itertools |
---|
7 | import copy |
---|
8 | |
---|
9 | mode=os.getenv("mode") |
---|
10 | arch=os.getenv("arch") |
---|
11 | svnr=os.getenv("svnR") |
---|
12 | repository=os.getenv("xios_test_suite_repository") |
---|
13 | |
---|
14 | def OSinfo(runthis): |
---|
15 | red = lambda text: '\033[0;31m' + text + '\033[0m' |
---|
16 | osstdout = subprocess.Popen(runthis, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) |
---|
17 | theInfo = osstdout.communicate()[0].strip() |
---|
18 | if osstdout.returncode!=0: |
---|
19 | print(red(runthis+" FAILED")) |
---|
20 | print(theInfo) |
---|
21 | sys.exit() |
---|
22 | # else: |
---|
23 | # print(runthis+" OK") |
---|
24 | |
---|
25 | |
---|
26 | def get_default_param(): |
---|
27 | f=open("default_param.json", 'r') |
---|
28 | default_param = json.load(f) |
---|
29 | f.close() |
---|
30 | return default_param[0] |
---|
31 | |
---|
32 | def nonblank_lines(f): |
---|
33 | for l in f: |
---|
34 | line = l.rstrip() |
---|
35 | if line and not line.startswith("#"): |
---|
36 | yield line |
---|
37 | |
---|
38 | def main(): |
---|
39 | print(svnr) |
---|
40 | print(repository) |
---|
41 | test_folder_list = glob.glob('test_*') |
---|
42 | |
---|
43 | for test_folder in test_folder_list: |
---|
44 | OSinfo("cp "+test_folder+"/user_param.json "+repository+"/RUN/def_files/"+svnr+"/"+test_folder) |
---|
45 | config_list = glob.glob(test_folder+"/CONFIG_*") |
---|
46 | #print(*config_list, sep = "\n") |
---|
47 | |
---|
48 | |
---|
49 | |
---|
50 | |
---|
51 | if __name__== "__main__": |
---|
52 | main() |
---|
Note: See
TracBrowser
for help on using the repository browser.