diff --git a/deploy/Kubernetes/_build/helm-test.ps1 b/deploy/Kubernetes/_build/helm-test.ps1 index 48e68dd4..38646118 100644 --- a/deploy/Kubernetes/_build/helm-test.ps1 +++ b/deploy/Kubernetes/_build/helm-test.ps1 @@ -100,9 +100,11 @@ function test_helm_chart([string] $chart_path, [string] $tests_path, [object[]] if ($fail_count -gt 0) { write-minimal "Failed: ${fail_count}, Passed: ${pass_count}, Total: $($tests.count)" 'Red' + return $false } else { write-minimal "Passed: ${pass_count}, Total: $($tests.count)" 'Green' + return $true } } diff --git a/deploy/Kubernetes/worker/tests/trtllm/test-chart.ps1 b/deploy/Kubernetes/worker/tests/trtllm/test-chart.ps1 index e47865a6..43cf8ecd 100644 --- a/deploy/Kubernetes/worker/tests/trtllm/test-chart.ps1 +++ b/deploy/Kubernetes/worker/tests/trtllm/test-chart.ps1 @@ -123,8 +123,11 @@ $tests = @( } ) +$is_pass = $false + try { - test_helm_chart 'deploy/Kubernetes/worker/charts/trtllm' 'deploy/Kubernetes/worker/tests/trtllm' $tests + $is_pass = test_helm_chart 'deploy/Kubernetes/worker/charts/trtllm' 'deploy/Kubernetes/worker/tests/trtllm' $tests + write-debug "is_pass: ${is_pass}." } catch { if ($is_debug) { @@ -136,3 +139,9 @@ catch { # Clean up any NVBUILD environment variables left behind by the build. cleanup_after + +if (-not $is_pass) { + exit(1) +} + +exit(0)