fix pytest opts
@@ -88,13 +88,12 @@ function Main {
RunOrDie python -c "import cupy; cupy.show_config()"
# Unit test
- $pytest_opts = ""
if ($test -eq "build") {
return
} elseif ($test -eq "test") {
- $pytest_opts = "$pytest_opts -m ""not slow"""
+ $pytest_opts = "-m", "not slow"
} elseif ($test -eq "slow") {
- $pytest_opts = "$pytest_opts -m ""slow"""
+ $pytest_opts = "-m", "slow"
} else {
throw "Unsupported test target: $target"
}
@@ -107,7 +106,7 @@ function Main {
}
echo "Running test..."
$test_retval = 0
- python -m pytest -rfEX $Env:PYTEST_OPTS tests > cupy_test_log.txt
+ python -m pytest -rfEX @pytest_opts tests > cupy_test_log.txt
if (-not $?) {
$test_retval = $LastExitCode
}
