-
-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
102 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
if ($env:COVERAGE -eq 1) { | ||
& coverage combine; | ||
& coverage report; | ||
& coverage xml -i -o coverage_xml.xml; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
if ($env:COVERAGE -eq 1) { | ||
$env:COVERAGE_PROCESS_START = "$($env:APPVEYOR_BUILD_FOLDER)\.coveragerc"; | ||
$env:COVERAGE_FILE = "$($env:APPVEYOR_BUILD_FOLDER)\.coverage"; | ||
New-Item -ItemType Directory -Force -Path "$($env:PYSITEDIR)"; | ||
|
||
(Get-Content -path .coverage_templates\.coveragerc.template -Raw) -replace '\$PWD',"$((Get-Location) -replace '\\', '/')" | Set-Content -Path "$($env:COVERAGE_PROCESS_START)"; | ||
(Get-Content -path .coverage_templates\sitecustomize.py.template -Raw) -replace '\$PWD',"$((Get-Location) -replace '\\', '/')" | Set-Content -Path "$($env:PYSITEDIR)\sitecustomize.py"; | ||
|
||
Write-Host "$($env:PYSITEDIR)\sitecustomize.py"; | ||
Get-Content -Path "$($env:PYSITEDIR)\sitecustomize.py"; | ||
Write-Host "$($env:COVERAGE_PROCESS_START)"; | ||
Get-Content -Path "$($env:COVERAGE_PROCESS_START)"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
New-Item -Name exclude_list.txt -ItemType File; | ||
$workaround_image = "Visual Studio 2015"; | ||
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq $workaround_image) { | ||
Add-Content -Path 'exclude_list.txt' -Value 'test\MSVS\vs-10.0-exec.py'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
dir "C:\Program Files\Git\usr\bin\x*.exe"; | ||
if (Test-Path "C:\Program Files\Git\usr\bin\xsltproc.EXE" ) { | ||
Remove-Item "C:\Program Files\Git\usr\bin\xsltproc.EXE" -ErrorAction Ignore; | ||
} | ||
dir "C:\Program Files\Git\usr\bin\x*.exe"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
C:\\%WINPYTHON%\\python.exe --version | ||
for /F "tokens=*" %%g in ('C:\\%WINPYTHON%\\python.exe -c "import sys; print(sys.path[-1])"') do (set PYSITEDIR=%%g) | ||
REM use mingw 32 bit until #3291 is resolved | ||
set PATH=C:\\%WINPYTHON%;C:\\%WINPYTHON%\\Scripts;C:\\ProgramData\\chocolatey\\bin;C:\\MinGW\\bin;C:\\MinGW\\msys\\1.0\\bin;C:\\cygwin\\bin;C:\\msys64\\usr\\bin;C:\\msys64\\mingw64\\bin;%PATH% | ||
C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off pip setuptools wheel | ||
C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off pypiwin32 coverage codecov | ||
set STATIC_DEPS=true & C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off lxml | ||
REM install 3rd party tools to test with | ||
choco install --allow-empty-checksums dmd ldc swig vswhere xsltproc winflexbison | ||
set SCONS_CACHE_MSVC_CONFIG=true | ||
set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[run] | ||
source = $PWD | ||
parallel = True | ||
omit = | ||
*Tests.py | ||
*/src/* | ||
*/test/* | ||
*/testing/* | ||
*/template/* | ||
*/scripts/* | ||
*/scons-time.py | ||
*/bootstrap.py | ||
*/runtest.py | ||
*/setup.py | ||
|
||
[path] | ||
source = $PWD | ||
|
||
[report] | ||
omit = | ||
*Tests.py | ||
*/src/* | ||
*/test/* | ||
*/testing/* | ||
*/template/* | ||
*/scripts/* | ||
*/scons-time.py | ||
*/bootstrap.py | ||
*/runtest.py | ||
*/setup.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import os | ||
os.environ['COVERAGE_PROCESS_START'] = r'$PWD/.coveragerc' | ||
os.environ['COVERAGE_FILE'] = r'$PWD/.coverage' | ||
import coverage | ||
coverage.process_startup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
python -m pip install -U coverage codecov | ||
|
||
# setup sitecustomize so we can make all subprocess start coverage | ||
export PYSITEDIR=$(python -c "import sys; print(sys.path[-1])") | ||
mkdir -p "$PYSITEDIR" | ||
|
||
# coverage.py environment variable for multiprocess | ||
export COVERAGE_PROCESS_START="$PWD/.coveragerc" | ||
export COVERAGE_FILE="$PWD/.coverage" | ||
|
||
# replace PWD in the template files so we have absolute paths from out /tmp test folders | ||
sed -e "s#\$PWD#$PWD#" .coverage_templates/.coveragerc.template > "$PWD/.coveragerc" | ||
sed -e "s#\$PWD#$PWD#" .coverage_templates/sitecustomize.py.template > "${PYSITEDIR}/sitecustomize.py" | ||
|
||
# print the results | ||
echo "${PYSITEDIR}/sitecustomize.py" | ||
cat "${PYSITEDIR}/sitecustomize.py" | ||
echo "$PWD/.coveragerc" | ||
cat "$PWD/.coveragerc" |