Skip to content

Commit

Permalink
Merge branch 'main' into add_test_slack_back
Browse files Browse the repository at this point in the history
  • Loading branch information
mnokka-unikie authored Dec 10, 2024
2 parents e35cb99 + 0246bcb commit 9283a76
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ghaf-main-pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ pipeline {
dir(WORKDIR) {
script {
utils.nix_eval_jobs(targets)
target_jobs = utils.create_parallel_stages(targets,false,failedTargets,failedHWTests)
target_jobs = utils.create_parallel_stages(targets, testset='_boot_bat_', failedTargets=failedTargets)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions ghaf-nightly-pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ pipeline {
utils.nix_eval_hydrajobs(hydrajobs_targets)
targets = targets + hydrajobs_targets

target_jobs = utils.create_parallel_stages(targets, skip_hw_test=true)
target_jobs = utils.create_parallel_stages(targets, testset=null)
}
}
}
Expand All @@ -208,7 +208,7 @@ pipeline {
stage("Test ${it.target} (${it.system})") {
script {
def targetAttr = "${it.system}.${it.target}"
utils.ghaf_hw_test(targetAttr, it.hwtest_device, '_boot_bat_perf_')
utils.ghaf_hw_test(targetAttr, it.hwtest_device, '_boot_gui_bat_perf_video_logging_')
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ghaf-pre-merge-pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ pipeline {
dir(WORKDIR) {
script {
utils.nix_eval_jobs(targets)
target_jobs = utils.create_parallel_stages(targets)
target_jobs = utils.create_parallel_stages(targets, testset=null)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ghaf-release-pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ pipeline {
dir(WORKDIR) {
script {
utils.nix_eval_jobs(targets)
target_jobs = utils.create_parallel_stages(targets, skip_hw_test=true)
target_jobs = utils.create_parallel_stages(targets, testset=null)
}
}
}
Expand Down
11 changes: 5 additions & 6 deletions utils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,16 @@ def nix_eval_hydrajobs(List<Map> targets) {
"""

targets.each {
target = "${it.system}.${it.target}"
// note that this is in flipped order compared to #packages
target = "${it.target}.${it.system}"
drvPath = sh(script: "jq -r '.\"${target}\".drvPath' < results.json", returnStdout: true).trim()
evalError = sh(script: "jq -r '.\"${target}\".error' < results.json", returnStdout: true).trim()
it.drvPath = drvPath
it.error = evalError == "null" ? null : evalError
}
}

def create_parallel_stages(List<Map> targets, Boolean skip_hw_test=false, List failedTargets = null, List failedHWTests =null) {
def create_parallel_stages(List<Map> targets, String testset='_boot_bat_perf_', List failedTargets = null) {
def target_jobs = [:]
targets.each {
def timestampBegin = ""
Expand Down Expand Up @@ -380,7 +381,7 @@ def create_parallel_stages(List<Map> targets, Boolean skip_hw_test=false, List f
mkdir -p ${scsdir}
provenance ${it.drvPath} --recursive --out ${outpath}
"""
sign_file(outpath, "sig/${outpath}.sig", "INT-Ghaf-Devenv-Provenance")
sign_file(outpath, "${outpath}.sig", "INT-Ghaf-Devenv-Provenance")
}
}
}
Expand Down Expand Up @@ -418,7 +419,7 @@ def create_parallel_stages(List<Map> targets, Boolean skip_hw_test=false, List f
}
}

if (!skip_hw_test && it.hwtest_device != null) {
if (testset != null && it.hwtest_device != null) {
stage("Test ${displayName}") {
script {
errorstatus=ghaf_hw_test(targetAttr, it.hwtest_device, '_boot_bat_perf_')
Expand All @@ -440,5 +441,3 @@ def create_parallel_stages(List<Map> targets, Boolean skip_hw_test=false, List f
}

return this

////////////////////////////////////////////////////////////////////////////////

0 comments on commit 9283a76

Please sign in to comment.