test.ps1 582 B

1234567891011121314151617181920212223242526
  1. $ErrorActionPreference = "Stop"
  2. # Get the root directory and third_party directory
  3. $ROOT_DIR = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent | Split-Path -Parent | Split-Path -Parent -Resolve
  4. # Include the common functions
  5. . "$ROOT_DIR/hack/lib/windows/init.ps1"
  6. function Test {
  7. uv run pytest
  8. if ($LASTEXITCODE -ne 0) {
  9. GPUStack.Log.Fatal "failed to run uv run pytest."
  10. }
  11. }
  12. #
  13. # main
  14. #
  15. GPUStack.Log.Info "+++ TEST +++"
  16. try {
  17. Test
  18. } catch {
  19. GPUStack.Log.Fatal "failed to test: $($_.Exception.Message)"
  20. }
  21. GPUStack.Log.Info "--- TEST ---"