From dd391d38f6ef2165bc76a1e69da52e1bd1208e53 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 28 Oct 2020 16:19:03 +0100 Subject: Tests: add CMake option to run Cycles regression tests on GPU devices CYCLES_TEST_DEVICES is a list of devices (CPU, CUDA, OPTIX, OPENCL). It is set to CPU only by default. Test output is now writen to build/tests/cycles/, and the HTML report has separate report pages for the different devices, with option to compare between CPU and GPU renders. Various GPU tests are still failing due to CPU/GPU differences, these are to be fixed or blacklisted still. Ref T82193 --- tests/python/cycles_render_tests.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/python/cycles_render_tests.py') diff --git a/tests/python/cycles_render_tests.py b/tests/python/cycles_render_tests.py index 3c597b39cb8..9153a2732b5 100644 --- a/tests/python/cycles_render_tests.py +++ b/tests/python/cycles_render_tests.py @@ -50,6 +50,7 @@ def create_argparse(): parser.add_argument("-testdir", nargs=1) parser.add_argument("-outdir", nargs=1) parser.add_argument("-idiff", nargs=1) + parser.add_argument("-device", nargs=1) return parser @@ -61,12 +62,16 @@ def main(): test_dir = args.testdir[0] idiff = args.idiff[0] output_dir = args.outdir[0] + device = args.device[0] from modules import render_report - report = render_report.Report("Cycles", output_dir, idiff) + report = render_report.Report('Cycles', output_dir, idiff, device) report.set_pixelated(True) report.set_reference_dir("cycles_renders") - report.set_compare_engines('cycles', 'eevee') + if device == 'CPU': + report.set_compare_engine('eevee') + else: + report.set_compare_engine('cycles', 'CPU') # Increase threshold for motion blur, see T78777. test_dir_name = Path(test_dir).name -- cgit v1.2.3