From 0fa8b565ac0448e0bad30beec7deeb8a11430384 Mon Sep 17 00:00:00 2001 From: Ayush Ranjan Date: Wed, 15 May 2024 14:56:56 -0700 Subject: [PATCH] Ignore Nvidia drivers that fail to install in all_drivers_test.sh. Some drivers fail to build on our Ubuntu VMs due to NVIDIA/open-gpu-kernel-modules#594. PiperOrigin-RevId: 634085739 --- tools/gpu/all_drivers_test.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/gpu/all_drivers_test.sh b/tools/gpu/all_drivers_test.sh index de31e80e8..d08b01d90 100755 --- a/tools/gpu/all_drivers_test.sh +++ b/tools/gpu/all_drivers_test.sh @@ -24,7 +24,20 @@ trap "rm -f ${tmp_file}" EXIT make sudo TARGETS=tools/gpu:main ARGS="list --outfile=${tmp_file}" read -r -a versions <<< "$(cat "${tmp_file}")" +num_successful=0 for driver in "${versions[@]}"; do + set +e make sudo TARGETS=tools/gpu:main ARGS="install --version ${driver}" + install_exit_code=$? + set -e + if [[ $install_exit_code -ne 0 ]]; then + echo "Installing driver ${driver} failed. Not testing this version." >&2 + continue + fi make gpu-smoke-tests RUNTIME_ARGS="--debug" + num_successful="$(( $num_successful + 1 ))" done +if [[ "$num_successful" == 0 ]]; then + echo 'No version was successfully tested.' >&2 + exit 1 +fi