1919
2020# ?? Move to the initialization
2121ch = logging .StreamHandler ()
22- ch .setLevel (logging .INFO )
22+ ch .setLevel (logging .WARNING )
2323
2424
2525# Given a directory, validate JSON files against expected schema
@@ -45,7 +45,6 @@ def __init__(self):
4545 self .test_types = schema_files .ALL_TEST_TYPES
4646 self .executors = []
4747 self .icu_versions = []
48- self .debug_leve = 0
4948
5049 logging .config .fileConfig ("../logging.conf" )
5150
@@ -145,7 +144,6 @@ def validate_test_data_with_schema(self):
145144 schema_test_info .append (file_path_pair )
146145 else :
147146 test_data_files_not_found .append ([icu_version , test_type ])
148- logging .debug ('No data test file %s for %s, %s' , file_path_pair , test_type , icu_version )
149147 pass
150148
151149 if test_data_files_not_found :
@@ -161,7 +159,8 @@ def validate_test_data_with_schema(self):
161159 logging .warning ('FAIL: Test data %s, %s. MSG=%s' ,
162160 result_data ['test_type' ], result_data ['icu_version' ], result_data ['err_info' ])
163161 else :
164- logging .debug ('Test data validated: %s %s' , result_data ['test_type' ], result_data ['icu_version' ])
162+ pass
163+
165164 all_results .append (result_data )
166165 return all_results
167166
@@ -217,7 +216,7 @@ def check_test_data_against_schema(self, schema_info):
217216
218217 def check_test_data_schema (self , icu_version , test_type ):
219218 # Check the generated test data for structure against the schema
220- logging .debug ('Validating %s with %s' , test_type , icu_version )
219+ logging .info ('Validating %s with %s' , test_type , icu_version )
221220
222221 # Check test output vs. the test data schema
223222 schema_verify_file = os .path .join (self .schema_base , test_type , 'test_schema.json' )
@@ -247,7 +246,7 @@ def check_test_data_schema(self, icu_version, test_type):
247246
248247 results ['result' ] = result
249248 if result :
250- logging .debug ('Test data %s validated successfully, with ICU %s' , test_type , icu_version )
249+ logging .info ('Test data %s validated with ICU %s' , test_type , icu_version )
251250 else :
252251 logging .error ('Test data %s FAILED with ICU %s: %s' , test_type , icu_version , err_info )
253252
@@ -278,7 +277,7 @@ def get_test_output_schema_plan(self, icu_version, test_type, executor):
278277
279278 def check_test_output_schema (self , icu_version , test_type , executor ):
280279 # Check the output of the tests for structure against the schema
281- logging .debug ('Validating test output: %s %s %s' , executor , test_type , icu_version )
280+ logging .info ('Validating test output: %s %s %s' , executor , test_type , icu_version )
282281
283282 # Check test output vs. the schema
284283 schema_file_name = SCHEMA_FILE_MAP [test_type ]['result_data' ]['schema_file' ]
@@ -333,7 +332,6 @@ def validate_schema_file(self, schema_file_path):
333332 logging .fatal ('%s for %s. Cannot get test_type value' , err , schema_file_path , test_type )
334333 return [False , err , schema_file_path , test_type ]
335334
336- logging .info ('Checking schema %s' , schema_file_path )
337335 try :
338336 # With just a schema, it validates the schema.
339337 # However Validator.check_schema doesn't fail as expected.
@@ -449,7 +447,7 @@ def main(args):
449447 base_folders , test_types , result_folders = process_args (args )
450448
451449 logger = logging .Logger ("TEST_GENERATE LOGGER" )
452- logger .setLevel (logging .INFO )
450+ logger .setLevel (logging .WARNING )
453451 logger .info ('+++ Running JSON Schema tests' )
454452
455453 schema_validator = ConformanceSchemaValidator ()
@@ -461,20 +459,20 @@ def main(args):
461459 'icu76' ]
462460 schema_validator .executors = ['node' , 'rust' , 'dart_web' , 'dart_native' , 'icu4j' ]
463461
464- logging .info ('Checking test outputs' )
462+ logger .info ('Checking test outputs' )
465463 all_test_out_results = schema_validator .validate_test_output_with_schema ()
466464
467465 # Check all schema files for correctness.
468466 schema_errors = schema_validator .check_schema_files ()
469467 if schema_errors :
470- logging .error ('INVALID SCHEMA: %s' , schema_errors )
468+ logger .error ('INVALID SCHEMA: %s' , schema_errors )
471469 else :
472- logging .info ('All schemas are valid: %s' , schema_errors )
470+ logger .info ('All schemas are valid: %s' , schema_errors )
473471
474- logging .info ('Checking generated data' )
472+ logger .info ('Checking generated data' )
475473 all_test_data_results = schema_validator .validate_test_data_with_schema ()
476474
477- logging .info ('Checking test outputs' )
475+ logger .info ('Checking test outputs' )
478476 all_test_out_results = schema_validator .validate_test_output_with_schema ()
479477
480478 return
0 commit comments