-
Notifications
You must be signed in to change notification settings - Fork 477
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
251 changed files
with
19,979 additions
and
5,990 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
# pyocd functional test pipeline | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- '*' | ||
paths: | ||
include: | ||
- '.azure' | ||
- 'pyocd' | ||
- 'test' | ||
- 'pyproject.toml' | ||
- 'setup.cfg' | ||
- 'setup.py' | ||
|
||
pr: | ||
branches: | ||
include: | ||
- '*' | ||
paths: | ||
include: | ||
- '.azure' | ||
- 'pyocd' | ||
- 'test' | ||
- 'pyproject.toml' | ||
- 'setup.cfg' | ||
- 'setup.py' | ||
|
||
jobs: | ||
- job: functional_tests | ||
displayName: "Functional tests" | ||
timeoutInMinutes: 200 | ||
|
||
# Fully clean workspaces before testing. | ||
workspace: | ||
clean: all | ||
|
||
# Matrix. | ||
strategy: | ||
matrix: | ||
Mac: | ||
test_os: Darwin | ||
Linux: | ||
test_os: Linux | ||
Win: | ||
test_os: Windows_NT | ||
|
||
# Agent pool and requirements. | ||
pool: | ||
name: functional-test | ||
demands: | ||
- Agent.OS -equals $(test_os) | ||
|
||
steps: | ||
# Configure shallow checkout. | ||
- checkout: self | ||
fetchDepth: 1 | ||
|
||
# Linux/Mac: Activate venv and install dependencies. | ||
- script: | | ||
python3 -m venv .venv | ||
source .venv/bin/activate | ||
python -m pip install --upgrade pip setuptools wheel | ||
pip install .[test] | ||
name: install_dependencies_posix | ||
displayName: 'Install dependencies (Posix)' | ||
condition: and(in(variables['agent.os'], 'Darwin', 'Linux'), succeeded()) | ||
# Windows: Activate venv and install dependencies. | ||
- script: | | ||
python -m venv .venv | ||
call .venv\Scripts\activate.bat | ||
python -m pip install --upgrade pip setuptools wheel | ||
pip install .[test] | ||
name: install_dependencies_win | ||
displayName: 'Install dependencies (Win)' | ||
condition: and(eq(variables['agent.os'], 'Windows_NT'), succeeded()) | ||
# Download pyocd.yaml config file into test directory. | ||
- task: UniversalPackages@0 | ||
name: install_test_config | ||
inputs: | ||
command: download | ||
vstsFeed: 'pyocd/config' | ||
vstsFeedPackage: 'pyocd-test-config' | ||
vstsPackageVersion: '*' | ||
downloadDirectory: 'test' | ||
verbosity: 'debug' | ||
displayName: 'Install test config' | ||
|
||
# Linux/Mac: Activate venv and run automated test suite. | ||
- script: | | ||
source .venv/bin/activate | ||
cd test | ||
python ./automated_test.py --quiet | ||
name: run_tests_posix | ||
displayName: 'Run tests (Posix)' | ||
condition: and(in(variables['agent.os'], 'Darwin', 'Linux'), succeeded()) | ||
# Windows: Activate venv and run automated test suite. | ||
- script: | | ||
call .venv\Scripts\activate.bat | ||
cd test | ||
python automated_test.py --quiet | ||
name: run_tests_win | ||
displayName: 'Run tests (Win)' | ||
condition: and(eq(variables['agent.os'], 'Windows_NT'), succeeded()) | ||
# Publish JUnit-format test results. | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFiles: test/output/*.xml | ||
testRunTitle: "$(Agent.OS) functional tests" | ||
platform: "$(Agent.OS)" # Doesn't show up anywhere in Azure UI. | ||
condition: succeededOrFailed() | ||
displayName: "Publish test results" | ||
|
||
# Publish test outputs. | ||
- task: PublishPipelineArtifact@1 | ||
inputs: | ||
targetPath: "test/output" | ||
artifactName: outputs_$(test_os) | ||
condition: succeededOrFailed() | ||
displayName: "Publish test output files" | ||
|
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 |
---|---|---|
@@ -1,14 +1,27 @@ | ||
# EditorConfig: https://editorconfig.org/ | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
# 4 space indentation for all files | ||
# No trailing whitespace | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
|
||
# 4 space indentation for Python | ||
[*.py] | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = false | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
max_line_length = 120 | ||
|
||
# Exceptions to the rule... | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[*.bat] | ||
end_of_line = crlf | ||
|
||
[*.{yaml,yml,xml,svd}] | ||
indent_size = 2 |
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
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
Oops, something went wrong.