WIP: Tests: Add option to run GPU tests on buildbot #2
@ -266,7 +266,7 @@ def create_code_worker_command_args(props, devops_env_id, track_id, pipeline_typ
|
||||
args += ["--python-module"]
|
||||
if needs_full_clean:
|
||||
args += ["--needs-full-clean"]
|
||||
if step_name in ["compile-gpu", "compile-install"]:
|
||||
if step_name in ["compile-gpu", "compile-install", "test-code"]:
|
||||
if needs_package_delivery or needs_gpu_binaries:
|
||||
args += ["--needs-gpu-binaries"]
|
||||
if needs_gpu_tests:
|
||||
@ -405,17 +405,21 @@ def create_deliver_test_results_step(worker_config, track_id, pipeline_type):
|
||||
|
||||
def next_worker_code(worker_names_gpu, builder, workers, request):
|
||||
# Use a GPU worker if needed and supported for this platform.
|
||||
if not workers:
|
||||
# GPU worker is currently reserved for GPU builds only.
|
||||
compatible_workers = []
|
||||
if request.properties.getProperty("needs_gpu_tests", False) and worker_names_gpu:
|
||||
for worker in workers:
|
||||
if worker.worker.workername in worker_names_gpu:
|
||||
compatible_workers.append(worker)
|
||||
else:
|
||||
for worker in workers:
|
||||
if worker.worker.workername not in worker_names_gpu:
|
||||
compatible_workers.append(worker)
|
||||
|
||||
if not compatible_workers:
|
||||
return None
|
||||
|
||||
if not request.properties.getProperty("needs_gpu_tests", False) or not worker_names_gpu:
|
||||
return random.choice(workers)
|
||||
|
||||
for worker in workers:
|
||||
if worker.worker.workername in worker_names_gpu:
|
||||
return worker
|
||||
|
||||
return None
|
||||
return random.choice(compatible_workers)
|
||||
|
||||
|
||||
def populate(devops_env_id):
|
||||
|
@ -43,8 +43,10 @@ def package_for_upload(builder: worker.blender.CodeBuilder, success: bool) -> No
|
||||
shutil.make_archive(str(package_filepath), "zip", package_tests_dir, package_filename)
|
||||
shutil.rmtree(package_filepath)
|
||||
|
||||
# Always upload unpacked folder for main and release tracks.
|
||||
if builder.track_id != "vexp":
|
||||
# Always upload unpacked folder for main and release tracks,
|
||||
# when using GPU tests. This is useful for debugging GPU
|
||||
# differences.
|
||||
if builder.track_id != "vexp" and builder.needs_gpu_tests:
|
||||
branch = builder.branch_id.replace("blender-", "").replace("-release", "")
|
||||
name = f"{branch}-{builder.platform}-{builder.architecture}"
|
||||
shutil.copytree(build_tests_dir, package_tests_dir / name)
|
||||
|
Loading…
Reference in New Issue
Block a user