Improve test script logic and error handling (#1424)

- Fix exclude+gtest_filter logic
 - Improve error handling when detecting upstream branches
This commit is contained in:
andmar-amd
2025-11-19 17:14:40 -05:00
committed by GitHub
parent 4ef1e53269
commit 2b4d17078a
@@ -140,7 +140,7 @@ getFilter() {
esac
# Check if the loaded driver is upstream (in-box) or DKMS
rdma_get_pages_func=$(cat /proc/kallsyms | grep rdma_get_pages)
rdma_get_pages_func=$(cat /proc/kallsyms | grep rdma_get_pages || true)
if [ -z "$rdma_get_pages_func" ]; then
gtestFilter="$gtestFilter:${FILTER[upstream]}"
fi
@@ -205,9 +205,9 @@ runKfdTest() {
PKG_ROOT="$(getPackageRoot)"
fi
if [ -n "$GTEST_ARGS" ] && [ -n "$ADDITIONAL_EXCLUDE" ]; then
echo "Cannot use -e and --gtest_filter flags together"
exit 0
if [[ "$GTEST_ARGS" =~ "--gtest_filter" && -n "$ADDITIONAL_EXCLUDE" ]]; then
echo "Cannot use -e and --gtest_filter flags together"
exit 0
fi
if [ "$NODE" == "" ]; then