-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'isa_ver_pcie_cfg_clone' into 'devel'
Update dma medusa verification See merge request ndk/ndk-fpga!121
- Loading branch information
Showing
4 changed files
with
162 additions
and
8 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
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
Submodule dma-medusa
updated
from 9aebc2 to 3ce185
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,81 @@ | ||
/* | ||
* ver_dma_medusa.jenkins: Jenkins configuration script | ||
* Copyright (C) 2021 CESNET z. s. p. o. | ||
* Author(s): Jakub Cabal <[email protected]> | ||
*/ | ||
|
||
// ///////////////////////////////////////////////////////////////////////////// | ||
// Add engines for automatic Jenkins verifications into the following list | ||
// FORMAT: | ||
// [ 'name' , 'path_to_ver' , 'fdo_file.fdo' , 'test_pkg.sv/.vhd' , 'settings.py' ] | ||
def COMPONENTS = [\ | ||
['Basic Tests' , 'extra/dma-medusa/ver' , 'top_level.fdo' , 'tbench/test_pkg.sv' , 'ver_setings_new.py' ],\ | ||
] | ||
// ///////////////////////////////////////////////////////////////////////////// | ||
|
||
library 'liberouter' | ||
|
||
// Set triggering only once every 2 days | ||
properties([ | ||
pipelineTriggers([cron('H H(0-2) */2 * *')]) | ||
]) | ||
|
||
// Jenkins configuration for multiple modules | ||
node('preklad') { | ||
lock(label:"resources-${env.NODE_NAME}", quantity: 1) { | ||
// Clean old builds | ||
cleanBuilds() | ||
|
||
// fetch sources from GIT | ||
checkout scm | ||
// clean artifacts possibly left by previous builds | ||
sh "git clean -df" | ||
|
||
def failed = [] | ||
// run verification of every component | ||
for(c in COMPONENTS) { | ||
// parse | ||
def name = c[0] | ||
def path = c[1] | ||
def fdo = c[2] | ||
def pkg = c[3] | ||
def settings = c[4] | ||
def repo_root = pwd() | ||
def multi_ver = "$repo_root/build/scripts/multi_ver/multi_ver.py" | ||
// exec vsim | ||
try { // try-catch is a hack to continue even after the first failed verification | ||
timeout(time: 12, unit: 'HOURS') { | ||
stage("$name") { | ||
dir("$path") { | ||
sh "python3 $multi_ver -p \"$name\" $fdo $pkg $settings" | ||
} | ||
} | ||
} | ||
} catch(err) { | ||
currentBuild.result = 'FAILURE' // still propagate failure status to Jenkins | ||
failed.add("$name") | ||
} finally { // collect interesting files | ||
archiveArtifacts "$path/transcript*" // verification log | ||
} | ||
} | ||
|
||
// send out emails if failure is detected | ||
if(currentBuild.result == "FAILURE") { | ||
println "FAILED on components: ${failed}." | ||
emailext \ | ||
recipientProviders: [culprits(), developers()], | ||
to: '[email protected], [email protected]', | ||
subject: "[Jenkins] ${currentBuild.currentResult} ${env.JOB_NAME} #${currentBuild.number}", | ||
body: """\ | ||
The build of the repository ${env.JOB_NAME} #${currentBuild.number} ends up with status ${currentBuild.currentResult} on components: ${failed}. You can find build log in the attachments. | ||
|
||
For more details see ${env.BUILD_URL}. | ||
|
||
Yours sincerely | ||
Jenkins\ | ||
""".stripIndent(), | ||
attachLog: true, | ||
compressLog: true | ||
} | ||
} | ||
} |