Skip to content

Commit

Permalink
add hwtest github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tullom committed Jan 23, 2025
1 parent 7226df4 commit 092dca8
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/hwtest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow executes HW tests on an NXP RT600 EVK.
# NOTE: for now it simply executes a build on the self-hosted test runner PC.
#
permissions:
contents: read
on:
push:
branches: [main]
pull_request:

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
name: hwtest-automation
jobs:
hwtest-automation:
runs-on: self-hosted
name: Run integration tests
strategy:
matrix:
target: [thumbv8m.main-none-eabihf]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: run tests
run: |
cd examples\rt685s-evk
$sshcommand = "ssh [email protected] ./run_tests.sh " + "${{env.BRANCH_NAME}}"
Write-Output $sshcommand
Restore-VMCheckpoint -VMName "hwrunner" -Name "fresh" -Confirm:$false
# Pause for 5 seconds
Start-Sleep -Seconds 5
$output = Invoke-Expression $sshcommand
# Output the result
Write-Output $output
Restore-VMCheckpoint -VMName "hwrunner" -Name "fresh" -Confirm:$false
# Determine the success or failure based on the output
if ($output -match "Some tests failed:") {
exit 1
}
elseif ($output -match "All tests passed!") {
exit 0
}
exit 1

0 comments on commit 092dca8

Please sign in to comment.