message: scripts: optimized test
diff: @@ -84,17 +84,11 @@ def test():
  run_test(os.path.join(bin_dir, 'oidnTest'), arch)
  # Runs regression tests for the specified filter
  -def test_regression(filter, features, dataset):
  - # Get the result name
  - result = filter.lower()
  - for f in features:
  - result += '_' + f
  - features_str = result.split('_', 1)[1]
  -
  +def test_regression(filter, feature_sets, dataset):
  dataset_dir = os.path.join(cfg.data_dir, dataset)
  - if cfg.command == 'baseline':
  # Convert the input images to PFM
  + if cfg.command == 'baseline':
  image_filenames = sorted(glob(os.path.join(dataset_dir, '**', '*.exr'), recursive=True))
  for input_filename in image_filenames:
  input_name = os.path.relpath(input_filename, dataset_dir).rsplit('.', 1)[0]
  @@ -105,6 +99,15 @@ def test_regression(filter, features, dataset):
  convert_cmd += f' "{input_filename}" "{output_filename}"'
  run_test(convert_cmd)
  + # Iterate over the feature sets
  + for features in feature_sets:
  + # Get the result name
  + result = filter.lower()
  + for f in features:
  + result += '_' + f
  + features_str = result.split('_', 1)[1]
  +
  + if cfg.command == 'baseline':
  # Generate the baseline images
  print_test(f'{filter}.{features_str}', 'Infer')
  infer_cmd = os.path.join(root_dir, 'training', 'infer.py')
  @@ -161,18 +164,22 @@ test()
  # Regression tests: RT
  if not cfg.filter or 'RT' in cfg.filter:
  - dataset = 'rt_regress'
  - test_regression('RT', ['hdr', 'alb', 'nrm'], dataset)
  - test_regression('RT', ['hdr', 'alb'], dataset)
  - test_regression('RT', ['hdr'], dataset)
  - test_regression('RT', ['ldr', 'alb', 'nrm'], dataset)
  - test_regression('RT', ['ldr', 'alb'], dataset)
  - test_regression('RT', ['ldr'], dataset)
  + test_regression(
  + 'RT',
  + [
  + ['hdr', 'alb', 'nrm'],
  + ['hdr', 'alb'],
  + ['hdr'],
  + ['ldr', 'alb', 'nrm'],
  + ['ldr', 'alb'],
  + ['ldr']
  + ],
  + 'rt_regress'
  + )
  # Regression tests: RTLightmap
  if not cfg.filter or 'RTLightmap' in cfg.filter:
  - dataset = 'rtlightmap_regress'
  - test_regression('RTLightmap', ['hdr'], dataset)
  + test_regression('RTLightmap', [['hdr']], 'rtlightmap_regress')
  # Done
  if cfg.command == 'run':
  