-
Notifications
You must be signed in to change notification settings - Fork 234
110353 add windows testing to python agent #726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
99e68d9
0fbb2a6
a69ef7e
aa4b9a2
af93be4
c88e611
bd0af6e
45760a8
fa8d3ab
0020034
0c57059
3e452ae
6c7c36c
7f2bb57
7f86139
8525ac9
608537b
2731a38
37c6b9e
1d2030c
754571f
3144df8
fc07eb6
9b51a72
1c05ab6
07027a1
c8d4f48
ffae864
86c5ddb
2522d9d
8608515
15aa5e7
7fdb816
f306165
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| .\tests\scripts\install_chocolatey.bat^ | ||
| && refreshenv^ | ||
| && .\tests\scripts\install_python.bat %1 %2^ | ||
| && refreshenv^ | ||
| && %2 -m pip install -r .\tests\requirements\requirements-base.txt^ | ||
| && .\tests\scripts\download_json_schema.bat^ | ||
| && .\tests\scripts\download_gherkin_features.bat^ | ||
| && .\tests\scripts\execute_pytest_windows.bat %1 %2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| mkdir .\tests\tempFeatures | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will it be possible to add some docs/headers about how this particular script works, what arguments are required and what requirements are needed? |
||
| curl https://codeload.github.com/elastic/apm/zip/master -o .\tests\tempFeatures\features.zip | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the URL they use when you click on the download button on the website. We use it for a long time already and never had problems (other than the occasional network glitch)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was not familiar with that particular entrypoint, then I searched and found that's not officially supported but some internal entrypoint which it could potentially be changed. The reference I found is below one: We could potentially use
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, although I don't anticipate them changing those URLs anytime soon, they are mentioned in the docs, even if only as en example response: https://developer.github.com/v3/repos/contents/#get-archive-link
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not clear what they do support or not! Anyway, no strong opinion, up to @ElWPenn how to proceed then. I'm glad to know a bit more about this! Thanks Beni for the feedback |
||
| 7z x .\tests\tempFeatures\features.zip -o.\tests\tempFeatures *.feature -y -r | ||
| mkdir .\tests\bdd\features | ||
| xcopy .\tests\tempFeatures\apm-master\tests\agents\gherkin-specs\* .\tests\bdd\features /Y /S | ||
| del .\tests\tempFeatures\ /F /Q /S | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| mkdir .\tests\tempSchema | ||
| curl https://codeload.github.com/elastic/apm-server/zip/master -o .\tests\tempSchema\master.zip | ||
| 7z x .\tests\tempSchema\master.zip -o.\tests\tempSchema *.json -y -r | ||
| mkdir .\tests\.schemacache | ||
| xcopy .\tests\tempSchema\apm-server-master\docs\spec\* .\tests\.schemacache /Y /S | ||
| del .\tests\tempSchema\ /F /Q /S |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| SETLOCAL EnableDelayedExpansion | ||
| set pythonVersion=%1 | ||
| set pythonExecutable=%2 | ||
| set majorVersion=!pythonVersion:~0,1! | ||
| set minorVersion=!pythonVersion:~2,1! | ||
| if %majorVersion% EQU 2 (set pyArgs=--ignore-glob="*/py3_*.py" --ignore-glob="*/asyncio/*") else ( if %minorVersion% EQU 5 (set pyArgs=--ignore-glob="*/asyncio/*")) | ||
| %pythonExecutable% -m pytest --cov --cov-report xml:coverage.xml %pyArgs% |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command " [System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this required? IIUC, the choco binary is available for the Windows CI Workers |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| SETLOCAL EnableDelayedExpansion | ||
| set pythonVersion=%1 | ||
| set pythonExecutable=%2 | ||
| set majorVersion=!pythonVersion:~0,1! | ||
| echo !majorVersion! | ||
| if %majorVersion% EQU 2 (!pythonExecutable! -m pip install -r .\tests\requirements\requirements-base.txt) else (!pythonExecutable! -m pip install -r .\tests\requirements\requirements-base.txt) | ||
| SETLOCAL DisableDelayedExpansion |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| SETLOCAL EnableDelayedExpansion | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will it be possible to add some docs/headers about how this particular script works, what arguments are required and what requirements are needed? |
||
| set pythonVersion=%1 | ||
| set pythonExecutable=%2 | ||
| set majorVersion=!pythonVersion:~0,1! | ||
| set minorVersion=!pythonVersion:~2,1! | ||
| if %majorVersion% EQU 3 (choco install python3 --version=%1 -y --force --allow-downgrade) else (choco install python2 -y --force) | ||
| if %majorVersion% EQU 3 ( if %minorVersion% NEQ 7 (move c:\%pythonExecutable%\python.exe c:\%pythonExecutable%\%pythonExecutable%.exe)) else (move c:\%pythonExecutable%\python.exe c:\%pythonExecutable%\%pythonExecutable%.exe) | ||
| SETLOCAL DisableDelayedExpansion | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.