| 1 |
Set-ExecutionPolicy Unrestricted |
| 2 |
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process -force |
| 3 |
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser -force |
| 4 |
Get-ExecutionPolicy -List |
| 5 |
echo $env:Path |
| 6 |
echo "JAVA_HOME: $env:JAVA_HOME" |
| 7 |
echo "PYTHONPATH: $env:PYTHONPATH" |
| 8 |
echo "Cassandra version: $env:CASSANDRA_VERSION" |
| 9 |
echo "Simulacron jar: $env:SIMULACRON_JAR" |
| 10 |
echo $env:ci_type |
| 11 |
python --version |
| 12 |
python -c "import platform; print(platform.architecture())" |
| 13 |
|
| 14 |
$wc = New-Object 'System.Net.WebClient' |
| 15 |
|
| 16 |
if($env:ci_type -eq 'unit'){ |
| 17 |
echo "Running Unit tests" |
| 18 |
pytest -s -v --junit-xml=unit_results.xml .\tests\unit |
| 19 |
|
| 20 |
$env:EVENT_LOOP_MANAGER="gevent" |
| 21 |
pytest -s -v --junit-xml=unit_results.xml .\tests\unit\io\test_geventreactor.py |
| 22 |
$env:EVENT_LOOP_MANAGER="eventlet" |
| 23 |
pytest -s -v --junit-xml=unit_results.xml .\tests\unit\io\test_eventletreactor.py |
| 24 |
$env:EVENT_LOOP_MANAGER="asyncore" |
| 25 |
|
| 26 |
echo "uploading unit results" |
| 27 |
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\unit_results.xml)) |
| 28 |
|
| 29 |
} |
| 30 |
|
| 31 |
if($env:ci_type -eq 'standard'){ |
| 32 |
|
| 33 |
echo "Running CQLEngine integration tests" |
| 34 |
pytest -s -v --junit-xml=cqlengine_results.xml .\tests\integration\cqlengine |
| 35 |
$cqlengine_tests_result = $lastexitcode |
| 36 |
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\cqlengine_results.xml)) |
| 37 |
echo "uploading CQLEngine test results" |
| 38 |
|
| 39 |
echo "Running standard integration tests" |
| 40 |
pytest -s -v --junit-xml=standard_results.xml .\tests\integration\standard |
| 41 |
$integration_tests_result = $lastexitcode |
| 42 |
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\standard_results.xml)) |
| 43 |
echo "uploading standard integration test results" |
| 44 |
} |
| 45 |
|
| 46 |
|
| 47 |
$exit_result = $unit_tests_result + $cqlengine_tests_result + $integration_tests_result + $simulacron_tests_result |
| 48 |
echo "Exit result: $exit_result" |
| 49 |
exit $exit_result |