Add unit test infrastructure

This commit is contained in:
mbanth
2021-05-19 16:07:40 +01:00
parent 1ddbfdd8c1
commit 9b2efd07ad
6 changed files with 508 additions and 1 deletions

53
Jenkinsfile vendored
View File

@@ -27,7 +27,7 @@ pipeline {
xcoreLibraryChecks("${REPO}")
}
}
stage('Tests') {
stage('XS2 Tests') {
failFast true
parallel {
stage('Legacy tests') {
@@ -35,6 +35,57 @@ pipeline {
runXmostest("${REPO}", 'legacy_tests')
}
}
stage('Unit tests') {
steps {
dir("${REPO}") {
dir('tests') {
dir('xua_unit_tests') {
viewEnv() {
withVenv {
runWaf('.', "configure clean build --target=xcore200")
runWaf('.', "configure clean build --target=xcoreai")
stash name: 'xua_unit_tests', includes: 'bin/*xcoreai.xe, '
runPython("TARGET=XCORE200 pytest -n 1")
}
}
}
}
}
}
}
}
}
stage('xcore.ai Verification') {
agent {
label 'xcore.ai-explorer'
}
stages{
stage('Get View') {
steps {
xcorePrepareSandbox("${VIEW}", "${REPO}")
}
}
stage('Unit tests') {
steps {
dir("${REPO}") {
dir('tests') {
dir('xua_unit_tests') {
viewEnv() {
withVenv {
unstash 'xua_unit_tests'
runPython("TARGET=XCOREAI pytest -n 1 --junitxml pytest_result.xml")
}
}
}
}
}
}
}
} // stages
post {
cleanup {
cleanWs()
}
}
}
stage('xCORE builds') {