Commit 5c57e8b2 authored by Romain Pacanowski's avatar Romain Pacanowski

adding more tests with UTIA. data2stats is launched as well but its output is...

adding more tests with UTIA. data2stats is launched as well but its output is not checked yet. To use these tests you need m100_fabric140.exr file in the build/tests/ directory
parent fcd2e3c7
...@@ -455,6 +455,75 @@ if have_openexr: ...@@ -455,6 +455,75 @@ if have_openexr:
AlwaysBuild(cmd9) AlwaysBuild(cmd9)
env.Alias('tests', cmd9) env.Alias('tests', cmd9)
# if we have the m100_fabric140.exr we can verify that some conversions with UTIA DB are working
UTIA_TEST_FILE = File('m100_fabric140.exr').srcnode().abspath
if os.path.isfile(UTIA_TEST_FILE):
cmd_utia_idempotence = make_command_test('data2data',
['--input',
test_byproduct('m100_fabric140.exr'),
'--in-data', 'data_utia',
'--out-data', 'data_merl',
'--output',
test_byproduct('m100_fabric140-3.exr')],
'data2data-utia-to-utia')
AlwaysBuild(cmd_utia_idempotence);
env.Alias('tests', cmd_utia_idempotence)
cmd_utia_1 = make_command_test('data2data',
['--input',
test_byproduct('m100_fabric140.exr'),
'--in-data', 'data_utia',
'--out-data', 'data_merl',
'--output',
test_byproduct('m100_fabric140.binary')],
'data2data-utia-to-merl')
AlwaysBuild(cmd_utia_1);
env.Alias('tests', cmd_utia_1)
cmd_utia_2 = make_command_test('data2data',
['--input',
test_byproduct('m100_fabric140.binary'),
'--in-data', 'data_merl',
'--out-data', 'data_utia',
'--output',
test_byproduct('m100_fabric140-2.exr')],
'data2data-merl-to-utia')
AlwaysBuild(cmd_utia_2);
env.Depends(cmd_utia_2, cmd_utia_1)
env.Alias('tests', cmd_utia_2)
cmd_utia_check = make_command_test('data2stats',
['--input',
test_byproduct('m100_fabric140-2.exr'),
'--in-data', 'data_utia',
'--ref',
test_byproduct('m100_fabric140.exr'),
'--ref-data', 'data_utia'],
'data2stats-utia-check');
AlwaysBuild(cmd_utia_check);
env.Depends(cmd_utia_check, cmd_utia_2)
env.Alias('tests', cmd_utia_check)
#TODO PARSE THE OUTPUT of cmd_utia_check to see of the Linf norm is < 1e-5 if yes test passes
# if not test fails
#
#log_output_directory = Dir('#build/sources/tests').abspath
# log_file = File(log_output_directory + os.sep + 'data2stats.data2stats-utia-check.log').abspath
# file_as_string = open(log_file, 'r').read()
# per_lines = file_as_string.split('<<INFO>>')
# index = [i for i,x in enumerate(per_lines) if x.startswith(' Linf_norm')]
# line_inf = per_lines[index[0]].split(' ')
#end_if UTIA No-Regression TEST
if have_nonlinear_fitter_eigen: if have_nonlinear_fitter_eigen:
cmd10 = make_command_test('data2brdf', cmd10 = make_command_test('data2brdf',
['--input', ['--input',
...@@ -483,6 +552,10 @@ if have_openexr: ...@@ -483,6 +552,10 @@ if have_openexr:
AlwaysBuild(cmd11) AlwaysBuild(cmd11)
env.Alias('tests', cmd11) env.Alias('tests', cmd11)
#end_of_if_have_exr
cmd20 = make_command_test('data2data', cmd20 = make_command_test('data2data',
['--input', ['--input',
test_byproduct('krylon_blue_RGB.astm'), test_byproduct('krylon_blue_RGB.astm'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment