Jenkinsfile: Add runCommand() helper function.
Some checks failed
Build / host (3.10.0, map[os:ubuntu shell:bash]) (push) Failing after 6s
Build / host (3.16.0, map[os:ubuntu shell:bash]) (push) Failing after 7s
Build / host (3.21.0, map[os:ubuntu shell:bash]) (push) Failing after 7s
Build / host (4.0.0, map[os:ubuntu shell:bash]) (push) Failing after 4s
Build / host (latest, map[os:ubuntu shell:bash]) (push) Failing after 3s
Build / firmware (HACKRF_ONE, 3.10.0, ubuntu) (push) Failing after 2s
Build / firmware (HACKRF_ONE, latest, ubuntu) (push) Failing after 2s
Build / firmware (JAWBREAKER, 3.10.0, ubuntu) (push) Failing after 5s
Build / firmware (JAWBREAKER, latest, ubuntu) (push) Failing after 3s
Build / firmware (PRALINE, 3.10.0, ubuntu) (push) Failing after 4s
Build / firmware (PRALINE, latest, ubuntu) (push) Failing after 6s
Build / firmware (RAD1O, 3.10.0, ubuntu) (push) Failing after 6s
Build / firmware (RAD1O, latest, ubuntu) (push) Failing after 4s
Check code style / clang-format (push) Failing after 5s
Check code style / clang-format-1 (push) Failing after 5s
Check code style / clang-format-2 (push) Failing after 4s
Check code style / clang-format-3 (push) Failing after 3s
Build / host (3.16.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.21.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (3.21.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (RAD1O, 3.10.0, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, windows) (push) Has been cancelled
Build / host (3.10.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (4.0.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (4.0.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (latest, --install-prefix=/usr/local, map[os:windows shell:msys2]) (push) Has been cancelled
Build / host (latest, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (latest, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, windows) (push) Has been cancelled
Build / firmware (JAWBREAKER, 3.10.0, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, windows) (push) Has been cancelled
Some checks failed
Build / host (3.10.0, map[os:ubuntu shell:bash]) (push) Failing after 6s
Build / host (3.16.0, map[os:ubuntu shell:bash]) (push) Failing after 7s
Build / host (3.21.0, map[os:ubuntu shell:bash]) (push) Failing after 7s
Build / host (4.0.0, map[os:ubuntu shell:bash]) (push) Failing after 4s
Build / host (latest, map[os:ubuntu shell:bash]) (push) Failing after 3s
Build / firmware (HACKRF_ONE, 3.10.0, ubuntu) (push) Failing after 2s
Build / firmware (HACKRF_ONE, latest, ubuntu) (push) Failing after 2s
Build / firmware (JAWBREAKER, 3.10.0, ubuntu) (push) Failing after 5s
Build / firmware (JAWBREAKER, latest, ubuntu) (push) Failing after 3s
Build / firmware (PRALINE, 3.10.0, ubuntu) (push) Failing after 4s
Build / firmware (PRALINE, latest, ubuntu) (push) Failing after 6s
Build / firmware (RAD1O, 3.10.0, ubuntu) (push) Failing after 6s
Build / firmware (RAD1O, latest, ubuntu) (push) Failing after 4s
Check code style / clang-format (push) Failing after 5s
Check code style / clang-format-1 (push) Failing after 5s
Check code style / clang-format-2 (push) Failing after 4s
Check code style / clang-format-3 (push) Failing after 3s
Build / host (3.16.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.21.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (3.21.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (RAD1O, 3.10.0, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, windows) (push) Has been cancelled
Build / host (3.10.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (4.0.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (4.0.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (latest, --install-prefix=/usr/local, map[os:windows shell:msys2]) (push) Has been cancelled
Build / host (latest, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (latest, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, windows) (push) Has been cancelled
Build / firmware (JAWBREAKER, 3.10.0, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, windows) (push) Has been cancelled
This commit is contained in:
parent
dc79c298a2
commit
601a77a9da
1 changed files with 26 additions and 71 deletions
97
Jenkinsfile
vendored
97
Jenkinsfile
vendored
|
|
@ -37,31 +37,14 @@ pipeline {
|
|||
}
|
||||
sh 'sleep 1s'
|
||||
script {
|
||||
try {
|
||||
// Allow 5 minutes for the test to run
|
||||
timeout(time: 5, unit: 'MINUTES') {
|
||||
sh '''python3 ci-scripts/hackrf_test.py --ci --log log \
|
||||
--hostdir host/build/hackrf-tools/src/ \
|
||||
--fwupdate firmware/hackrf_usb/build/ \
|
||||
--tester 0000000000000000325866e629a25623 \
|
||||
--eut RunningFromRAM --unattended --rev r4'''
|
||||
}
|
||||
} catch (FlowInterruptedException err) {
|
||||
// Check if the cause was specifically an exceeded timeout
|
||||
def cause = err.getCauses().get(0)
|
||||
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
|
||||
echo "HackRF One Test timeout limit reached."
|
||||
throw err // Re-throw the exception to fail the build
|
||||
} else {
|
||||
echo "Build interrupted for another reason."
|
||||
throw err // Re-throw the exception to fail the build
|
||||
}
|
||||
} catch (Exception err) {
|
||||
echo "An unrelated error occurred: ${err.getMessage()}"
|
||||
throw err
|
||||
}
|
||||
}
|
||||
script {
|
||||
// Allow 5 minutes for the test to run
|
||||
runCommand(5, 'MINUTES', "HackRF One Test",
|
||||
'''python3 ci-scripts/hackrf_test.py --ci --log log \
|
||||
--hostdir host/build/hackrf-tools/src/ \
|
||||
--fwupdate firmware/hackrf_usb/build/ \
|
||||
--tester 0000000000000000325866e629a25623 \
|
||||
--eut RunningFromRAM --unattended --rev r4'''
|
||||
)
|
||||
allOff()
|
||||
}
|
||||
}
|
||||
|
|
@ -103,29 +86,14 @@ pipeline {
|
|||
}
|
||||
sh 'sleep 1s'
|
||||
script {
|
||||
try {
|
||||
// Allow 5 minutes for the test to run
|
||||
timeout(time: 5, unit: 'MINUTES') {
|
||||
sh '''python3 ci-scripts/hackrf_pro_test.py --ci --log log \
|
||||
--hostdir host/build/hackrf-tools/src \
|
||||
--fwupdate firmware/hackrf_usb/build \
|
||||
--tester 0000000000000000a06063c82338145f \
|
||||
--eut RunningFromRAM -p --rev r1.2'''
|
||||
}
|
||||
} catch (FlowInterruptedException err) {
|
||||
// Check if the cause was specifically an exceeded timeout
|
||||
def cause = err.getCauses().get(0)
|
||||
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
|
||||
echo "HackRF Pro Test timeout limit reached."
|
||||
throw err // Re-throw the exception to fail the build
|
||||
} else {
|
||||
echo "Build interrupted for another reason."
|
||||
throw err // Re-throw the exception to fail the build
|
||||
}
|
||||
} catch (Exception err) {
|
||||
echo "An unrelated error occurred: ${err.getMessage()}"
|
||||
throw err
|
||||
}
|
||||
// Allow 5 minutes for the test to run
|
||||
runCommand(5, 'MINUTES', "HackRF Pro Test",
|
||||
'''python3 ci-scripts/hackrf_pro_test.py --ci --log log \
|
||||
--hostdir host/build/hackrf-tools/src \
|
||||
--fwupdate firmware/hackrf_usb/build \
|
||||
--tester 0000000000000000a06063c82338145f \
|
||||
--eut RunningFromRAM -p --rev r1.2'''
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -142,38 +110,25 @@ pipeline {
|
|||
}
|
||||
|
||||
def allOff() {
|
||||
try {
|
||||
// Allow 20 seconds for the USB hub port power server to respond
|
||||
timeout(time: 20, unit: 'SECONDS') {
|
||||
sh 'hubs all off'
|
||||
}
|
||||
} catch (FlowInterruptedException err) {
|
||||
// Check if the cause was specifically an exceeded timeout
|
||||
def cause = err.getCauses().get(0)
|
||||
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
|
||||
echo "USB hub port power server command timeout reached."
|
||||
throw err // Re-throw the exception to fail the build
|
||||
} else {
|
||||
echo "Build interrupted for another reason."
|
||||
throw err // Re-throw the exception to fail the build
|
||||
}
|
||||
} catch (Exception err) {
|
||||
echo "An unrelated error occurred: ${err.getMessage()}"
|
||||
throw err
|
||||
}
|
||||
// Allow 20 seconds for the USB hub port power server to respond
|
||||
runCommand(20, 'SECONDS', 'USB hub port power server command', "hubs all off")
|
||||
}
|
||||
|
||||
def reset(devices) {
|
||||
// Allow 20 seconds for the USB hub port power server to respond
|
||||
runCommand(20, 'SECONDS', 'USB hub port power server command', "hubs ${devices} reset")
|
||||
}
|
||||
|
||||
def runCommand(time, unit, title, cmd) {
|
||||
try {
|
||||
// Allow 20 seconds for the USB hub port power server to respond
|
||||
timeout(time: 20, unit: 'SECONDS') {
|
||||
sh "hubs ${devices} reset"
|
||||
timeout(time: time, unit: unit) {
|
||||
sh "${cmd}"
|
||||
}
|
||||
} catch (FlowInterruptedException err) {
|
||||
// Check if the cause was specifically an exceeded timeout
|
||||
def cause = err.getCauses().get(0)
|
||||
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
|
||||
echo "USB hub port power server command timeout reached."
|
||||
echo "${title} timeout reached."
|
||||
throw err // Re-throw the exception to fail the build
|
||||
} else {
|
||||
echo "Build interrupted for another reason."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue