- Timestamp:
- Oct 15, 2018 8:38:37 PM (6 years ago)
- Location:
- palm/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palmtest
r3353 r3354 66 66 67 67 try: 68 from termcolor import colored 68 from termcolor import colored as tcolored 69 69 except ImportError: 70 def colored(string, color):70 def tcolored(string, color): 71 71 return string 72 72 73 74 version = '1.0.0' 73 disable_colored_output = False 74 75 76 def colored(string, color): 77 if not disable_colored_output: 78 return tcolored(string, color) 79 else: 80 return string 81 82 83 version = '1.0.1' 75 84 76 85 scripts_dir = os.path.dirname(os.path.realpath(__file__)) … … 88 97 hline = '#' * min(terminal_columns, 300) + '\n' 89 98 table_width_intro = 12 90 table_width_builds = len(max([s for s in next(os.walk(trunk_tests_builds_dir))[1] ], key=len)) + len('_debug')91 table_width_cases = len(max([s for s in next(os.walk(trunk_tests_cases_dir))[1] ], key=len))99 table_width_builds = len(max([s for s in next(os.walk(trunk_tests_builds_dir))[1] if not s[0] == '.'], key=len)) + len('_debug') 100 table_width_cases = len(max([s for s in next(os.walk(trunk_tests_cases_dir))[1] if not s[0] == '.'], key=len)) 92 101 table_width_cores = 7 93 102 table_width_total = table_width_intro + table_width_builds + table_width_cases + table_width_cores + 3 … … 954 963 self.fail_on_debug = args.fail_on_debug 955 964 self.dry_run = args.dry_run 965 self.no_color = args.no_color 956 966 self.test_id = args.test_id 957 967 self.test_case_names = args.cases … … 962 972 963 973 def prepare(self): 974 global disable_colored_output 975 disable_colored_output = self.no_color 964 976 self.test_dir = os.path.join(tests_dir, self.test_id) 965 977 try: … … 1001 1013 1002 1014 if 'all' in self.requested_build_names: 1003 self.requested_build_names = [name for name in next(os.walk(trunk_tests_builds_dir))[1] ]1015 self.requested_build_names = [name for name in next(os.walk(trunk_tests_builds_dir))[1] if not name[0] == '.'] 1004 1016 found_build_names = [] 1005 1017 for build_name in self.requested_build_names: … … 1017 1029 1018 1030 if 'all' in self.test_case_names: 1019 self.test_case_names = sorted([name for name in next(os.walk(trunk_tests_cases_dir))[1] ])1031 self.test_case_names = sorted([name for name in next(os.walk(trunk_tests_cases_dir))[1] if not name[0] == '.']) 1020 1032 1021 1033 additional_initial_runs_2 = [self.test_case_names] … … 1227 1239 if j and (jd or jd is None): 1228 1240 n_failed += 1 1229 logger.to_all(r.format('Tests:', n_all, n_ok, n_debugged, n_failed) )1241 logger.to_all(r.format('Tests:', n_all, n_ok, n_debugged, n_failed) + '\n') 1230 1242 total_failed += n_failed 1231 1243 total_debugged += n_debugged … … 1251 1263 1252 1264 def get_items(self): 1253 case_names = [name for name in next(os.walk(trunk_tests_cases_dir))[1] ]1265 case_names = [name for name in next(os.walk(trunk_tests_cases_dir))[1] if not name[0] == '.'] 1254 1266 return case_names + ['all'] 1255 1267 … … 1258 1270 1259 1271 def get_items(self): 1260 build_names = [name for name in next(os.walk(trunk_tests_builds_dir))[1] ]1272 build_names = [name for name in next(os.walk(trunk_tests_builds_dir))[1] if not name[0] == '.'] 1261 1273 return build_names + ['all'] 1262 1274 … … 1310 1322 dest='dry_run', 1311 1323 help='Prepare and process all requested tests without actually building or executing PALM.', 1324 required=False, 1325 ) 1326 self.add_argument( 1327 '--no-color', 1328 action='store_true', 1329 dest='no_color', 1330 help='Disable colored terminal output.', 1312 1331 required=False, 1313 1332 ) -
palm/trunk/TESTS/cases/example_cbl/case_config.yml
r3353 r3354 20 20 significant_digits_for_netcdf_checks: 21 21 timeseries: 3 22 profiles: 622 profiles: 5 23 23 other: 8 -
palm/trunk/TESTS/cases/example_cbl_restart/case_config.yml
r3353 r3354 22 22 significant_digits_for_netcdf_checks: 23 23 timeseries: 3 24 profiles: 624 profiles: 5 25 25 other: 8 -
palm/trunk/TESTS/cases/example_cbl_restart2/case_config.yml
r3353 r3354 22 22 significant_digits_for_netcdf_checks: 23 23 timeseries: 3 24 profiles: 624 profiles: 5 25 25 other: 8 -
palm/trunk/TESTS/cases/example_cbl_short/case_config.yml
r3353 r3354 20 20 significant_digits_for_netcdf_checks: 21 21 timeseries: 3 22 profiles: 622 profiles: 5 23 23 other: 8 -
palm/trunk/TESTS/cases/example_cbl_user_code/case_config.yml
r3353 r3354 20 20 significant_digits_for_netcdf_checks: 21 21 timeseries: 3 22 profiles: 622 profiles: 5 23 23 other: 8
Note: See TracChangeset
for help on using the changeset viewer.