Skip to content

Commit 6250ebd

Browse files
committed
Merge branch 'schwarz-feat-improve_cocotb_jenkins_filter' into 'devel'
Change exlude filter in automatic cocotb test finder from filtering by component to filtering by path See merge request ndk/ndk-fpga!356
2 parents d5b2495 + 9b429b5 commit 6250ebd

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

tests/jenkins/cocotb.jenkinsfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ node('preklad') {
1616
def common_run = load "tests/jenkins/common.jenkins"
1717

1818
// INCLUDE and EXCLUDE act as a filters of automatically detected cocotb tests.
19-
// INCLUDE filtering is done by names of folders in the path to the tests.
19+
// Filtering is done by names of folders in the path to the tests.
2020
// Operations 'and' (&) and 'or' (|) are also supported, however
2121
// you use only ands or only ors.
22-
def INCLUDE = "" // "" for include all
23-
// EXCLUDE filtering is done by the names of the components.
24-
def EXCLUDE = ["fpga"] // [] for exclude none
22+
def INCLUDE = "" // "" for include all
23+
def EXCLUDE = "apps|pyuvm" // "" for exclude none
2524

2625
// /////////////////////////////////////////////////////////////////////////////
2726
// BASIC-VERIFICATION

tests/jenkins/common.jenkins

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,15 +322,15 @@ def isInPath(path, keyword) {
322322
return result
323323
}
324324

325-
def fetchCocotbCompsVer(include = "", exclude = []) {
325+
def fetchCocotbCompsVer(include = "", exclude = "") {
326326
def test_paths = sh(script: "find . -name 'cocotb_test.py' -exec dirname {} + | cut -c3-", returnStdout: true).trim()
327327
def comps_ver = []
328328

329329
test_paths.readLines().each { path ->
330-
if (isInPath(path, include)) {
330+
if (isInPath(path, include) && !isInPath(path, exclude)) {
331331
def comp_name = sh(script: "grep '^TOP_LEVEL_ENT=' $path/Makefile | cut -d'=' -f2", returnStdout: true).trim()
332332

333-
if (comp_name.length() > 0 && !exclude.contains(comp_name) && comp_name != '%s') {
333+
if (comp_name.length() > 0 && comp_name != '%s') {
334334
comps_ver.add([comp_name, path])
335335
}
336336
}
@@ -339,7 +339,7 @@ def fetchCocotbCompsVer(include = "", exclude = []) {
339339
return comps_ver
340340
}
341341

342-
def fetchCocotbCompsMultiVer(include = "", exclude = []) {
342+
def fetchCocotbCompsMultiVer(include = "", exclude = "") {
343343
def comps_ver = fetchCocotbCompsVer(include, exclude)
344344
def comps_multiver = []
345345

0 commit comments

Comments
 (0)