Skip to content
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

HW test pipeline support for nuc and riscv #49

Merged
merged 2 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 29 additions & 14 deletions ghaf-hw-test.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -142,33 +142,48 @@ pipeline {
println "Missing DEVICE_CONFIG_NAME parameter"
sh "exit 1"
}
if(["orin-agx"].contains(params.DEVICE_CONFIG_NAME)) {
// Determine the device name
if(params.DEVICE_CONFIG_NAME == "orin-agx") {
env.DEVICE_NAME = 'OrinAGX1'
env.DEVICE_TAG = 'orin-agx'
} else if(["orin-nx"].contains(params.DEVICE_CONFIG_NAME)) {
} else if(params.DEVICE_CONFIG_NAME == "orin-nx") {
env.DEVICE_NAME = 'OrinNX1'
env.DEVICE_TAG = 'orin-nx'
} else if(["lenovo-x1"].contains(params.DEVICE_CONFIG_NAME)) {
} else if(params.DEVICE_CONFIG_NAME == "lenovo-x1") {
env.DEVICE_NAME = 'LenovoX1-2'
env.DEVICE_TAG = 'lenovo-x1'
} else if(params.DEVICE_CONFIG_NAME == "nuc") {
env.DEVICE_NAME = 'NUC1'
} else if(params.DEVICE_CONFIG_NAME == "riscv") {
env.DEVICE_NAME = 'Polarfire1'
} else {
println "Error: unsupported device config '${params.DEVICE_CONFIG_NAME}'"
sh "exit 1"
}
hub_serial = get_test_conf_property(CONF_FILE_PATH, env.DEVICE_NAME, 'usbhub_serial')
mount_cmd = "/run/wrappers/bin/sudo AcronameHubCLI -u 0 -s ${hub_serial}; sleep 10"
unmount_cmd = "/run/wrappers/bin/sudo AcronameHubCLI -u 1 -s ${hub_serial}"
// Determine mount commands
if(params.DEVICE_CONFIG_NAME == "riscv") {
muxport = get_test_conf_property(CONF_FILE_PATH, env.DEVICE_NAME, 'usb_sd_mux_port')
dgrep = 'sdmux'
mount_cmd = "/run/wrappers/bin/sudo usbsdmux ${muxport} host; sleep 10"
unmount_cmd = "/run/wrappers/bin/sudo usbsdmux ${muxport} dut"
} else {
serial = get_test_conf_property(CONF_FILE_PATH, env.DEVICE_NAME, 'usbhub_serial')
dgrep = 'PSSD'
mount_cmd = "/run/wrappers/bin/sudo AcronameHubCLI -u 0 -s ${serial}; sleep 10"
unmount_cmd = "/run/wrappers/bin/sudo AcronameHubCLI -u 1 -s ${serial}"
}
env.DEVICE_TAG = params.DEVICE_CONFIG_NAME
// Mount the target disk
sh "${mount_cmd}"
// Read the device name
dev = run_cmd("lsblk -o model,name | grep 'PSSD' | rev | cut -d ' ' -f 1 | rev | grep .")
dev = run_cmd("lsblk -o model,name | grep '${dgrep}' | rev | cut -d ' ' -f 1 | rev | grep .")
println "Using device '$dev'"
if(["lenovo-x1"].contains(params.DEVICE_CONFIG_NAME)) {
// Wipe possible ZFS leftovers, more details here:
// https://github.com/tiiuae/ghaf/blob/454b18bc/packages/installer/ghaf-installer.sh#L75
// TODO: use ghaf flashing scripts or installers?
if(params.DEVICE_CONFIG_NAME == "lenovo-x1") {
echo "Wiping filesystem..."
def SECTOR = 512
def MIB_TO_SECTORS = 20480
SECTOR = 512
MIB_TO_SECTORS = 20480
// Disk size in 512-byte sectors
def SECTORS = sh(script: "/run/wrappers/bin/sudo blockdev --getsz /dev/${dev}", returnStdout: true).trim()
SECTORS = sh(script: "/run/wrappers/bin/sudo blockdev --getsz /dev/${dev}", returnStdout: true).trim()
// Unmount possible mounted filesystems
sh "sync; /run/wrappers/bin/sudo umount -q /dev/${dev}* || true"
// Wipe first 10MiB of disk
Expand Down
4 changes: 2 additions & 2 deletions ghaf-main-pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ pipeline {
utils.nix_build('.#packages.x86_64-linux.nvidia-jetson-orin-nx-debug-from-x86_64', 'archive')
utils.nix_build('.#packages.x86_64-linux.lenovo-x1-carbon-gen11-debug', 'archive')
utils.nix_build('.#packages.x86_64-linux.microchip-icicle-kit-debug-from-x86_64', 'archive')
// Build, but don't archive the build results:
utils.nix_build('.#packages.x86_64-linux.generic-x86_64-debug')
utils.nix_build('.#packages.x86_64-linux.generic-x86_64-debug', 'archive')
utils.nix_build('.#packages.x86_64-linux.doc')
}
}
Expand All @@ -80,6 +79,7 @@ pipeline {
utils.ghaf_hw_test('.#packages.x86_64-linux.nvidia-jetson-orin-nx-debug-from-x86_64', 'orin-nx', jenkins_url)
utils.ghaf_hw_test('.#packages.aarch64-linux.nvidia-jetson-orin-nx-debug', 'orin-nx', jenkins_url)
utils.ghaf_hw_test('.#packages.x86_64-linux.lenovo-x1-carbon-gen11-debug', 'lenovo-x1', jenkins_url)
utils.ghaf_hw_test('.#packages.x86_64-linux.generic-x86_64-debug', 'nuc', jenkins_url)
}
}
}
Expand Down
31 changes: 16 additions & 15 deletions ghaf-nightly-pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,6 @@ pipeline {
}
}
}
stage('HW test') {
steps {
dir(WORKDIR) {
script {
jenkins_url = "https://ghaf-jenkins-controller-dev.northeurope.cloudapp.azure.com"
testset = "_boot_bat_perf_"
utils.ghaf_hw_test('.#packages.x86_64-linux.nvidia-jetson-orin-agx-debug-from-x86_64', 'orin-agx', jenkins_url, testset)
utils.ghaf_hw_test('.#packages.aarch64-linux.nvidia-jetson-orin-agx-debug', 'orin-agx', jenkins_url, testset)
utils.ghaf_hw_test('.#packages.x86_64-linux.nvidia-jetson-orin-nx-debug-from-x86_64', 'orin-nx', jenkins_url, testset)
utils.ghaf_hw_test('.#packages.aarch64-linux.nvidia-jetson-orin-nx-debug', 'orin-nx', jenkins_url, testset)
utils.ghaf_hw_test('.#packages.x86_64-linux.lenovo-x1-carbon-gen11-debug', 'lenovo-x1', jenkins_url, testset)
}
}
}
}
stage('Provenance') {
steps {
dir(WORKDIR) {
Expand Down Expand Up @@ -140,6 +125,22 @@ pipeline {
}
}
}
stage('HW test') {
steps {
dir(WORKDIR) {
script {
jenkins_url = "https://ghaf-jenkins-controller-dev.northeurope.cloudapp.azure.com"
testset = "_boot_bat_perf_"
utils.ghaf_hw_test('.#packages.x86_64-linux.nvidia-jetson-orin-agx-debug-from-x86_64', 'orin-agx', jenkins_url, testset)
utils.ghaf_hw_test('.#packages.aarch64-linux.nvidia-jetson-orin-agx-debug', 'orin-agx', jenkins_url, testset)
utils.ghaf_hw_test('.#packages.x86_64-linux.nvidia-jetson-orin-nx-debug-from-x86_64', 'orin-nx', jenkins_url, testset)
utils.ghaf_hw_test('.#packages.aarch64-linux.nvidia-jetson-orin-nx-debug', 'orin-nx', jenkins_url, testset)
utils.ghaf_hw_test('.#packages.x86_64-linux.lenovo-x1-carbon-gen11-debug', 'lenovo-x1', jenkins_url, testset)
utils.ghaf_hw_test('.#packages.x86_64-linux.generic-x86_64-debug', 'nuc', jenkins_url, testset)
}
}
}
}
}
}

Expand Down
Loading