File: windows-test-minimum.ps1

package info (click to toggle)
trac 1.6-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,620 kB
  • sloc: python: 81,903; javascript: 2,219; makefile: 561; sh: 92; xml: 12
file content (34 lines) | stat: -rw-r--r-- 1,079 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$venvdir = "$($env:LocalAppData)\venv"
& python -m venv $venvdir
$python = "$venvdir\scripts\python.exe"
& "$venvdir\scripts\activate.ps1"
& $python -m pip install --upgrade pip setuptools
& $python -m pip install -r .github\requirements-minimum.txt
& $python -m pip list --format=freeze

& choco install -y --no-progress html-tidy
Get-ChildItem -Path "$($env:ProgramData)\chocolatey\lib\html-tidy\tools" `
              -Filter '*.dll' -Recurse `
| Copy-Item -Destination "$venvdir\scripts" -Verbose

$env:PYTHONWARNINGS = 'default'
Set-Content -Path Makefile.cfg '.uri ='
& make.exe status Trac.egg-info
if ($LASTEXITCODE) {
    Write-Error "'make.exe status Trac.egg-info' exited with $LASTEXITCODE"
    exit 1
}
$rc = 0
& make.exe unit-test
if ($LASTEXITCODE) {
    Write-Warning "'make.exe unit-test' exited with $LASTEXITCODE"
    $rc = 1
}
if ($env:MATRIX_TESTS -eq 'functional') {
    & make.exe functional-test testopts=-v
    if ($LASTEXITCODE) {
        Write-Warning "'make.exe functional-test testopts=-v' exited with $LASTEXITCODE"
        $rc = 1
    }
}
exit $rc