Tests: Disable --cycles-device arguments on non-Cycles tests
This commit reworks the RenderReport base class to avoid adding `--cycles-device` device arguments to non Cycles tests. This reduces some warnings that can show up with EEVEE and Workbench tests that accidentally used these arguments. Pull Request: https://projects.blender.org/blender/blender/pulls/133724
This commit is contained in:
@@ -13,12 +13,12 @@ try:
|
||||
from modules import render_report
|
||||
|
||||
class WorkbenchReport(render_report.Report):
|
||||
def __init__(self, title, output_dir, oiiotool, device=None, blocklist=[]):
|
||||
super().__init__(title, output_dir, oiiotool, device=device, blocklist=blocklist)
|
||||
self.gpu_backend = device
|
||||
def __init__(self, title, output_dir, oiiotool, variation=None, blocklist=[]):
|
||||
super().__init__(title, output_dir, oiiotool, variation=variation, blocklist=blocklist)
|
||||
self.gpu_backend = variation
|
||||
|
||||
def _get_render_arguments(self, arguments_cb, filepath, base_output_filepath):
|
||||
return arguments_cb(filepath, base_output_filepath, gpu_backend=self.device)
|
||||
return arguments_cb(filepath, base_output_filepath, gpu_backend=self.gpu_backend)
|
||||
|
||||
except ImportError:
|
||||
# render_report can only be loaded when running the render tests. It errors when
|
||||
@@ -91,7 +91,7 @@ def main():
|
||||
parser = create_argparse()
|
||||
args = parser.parse_args()
|
||||
|
||||
report = WorkbenchReport("Workbench", args.outdir, args.oiiotool, device=args.gpu_backend)
|
||||
report = WorkbenchReport("Workbench", args.outdir, args.oiiotool, variation=args.gpu_backend)
|
||||
if args.gpu_backend == "vulkan":
|
||||
report.set_compare_engine('workbench', 'opengl')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user