Skip to content

Commit

Permalink
Merge pull request #403 from xross/feat/tests_xccm
Browse files Browse the repository at this point in the history
Remove use of view file
  • Loading branch information
xross authored Oct 4, 2024
2 parents f49b02d + 760a99b commit bbe571c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
40 changes: 22 additions & 18 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
// This file relates to internal XMOS infrastructure and should be ignored by external users

@Library('xmos_jenkins_shared_library@develop') _
@Library('[email protected]') _

def clone_test_deps() {
dir("${WORKSPACE}") {
sh "git clone [email protected]:xmos/test_support"
sh "git -C test_support checkout c820ebe67bea0596dabcdaf71a590c671385ac35"
}
}

getApproval()

Expand All @@ -10,7 +17,6 @@ pipeline {
}
environment {
REPO = 'lib_xud'
VIEW = getViewName(REPO)
}
options {
buildDiscarder(xmosDiscardBuildSettings())
Expand All @@ -26,11 +32,7 @@ pipeline {
}

stages {
stage('Get view') {
steps {
xcorePrepareSandbox("${VIEW}", "${REPO}")
}
}

stage('Build examples') {
steps {
println "Stage running on ${env.NODE_NAME}"
Expand All @@ -49,21 +51,26 @@ pipeline {

stage('Library checks') {
steps {
runLibraryChecks("${WORKSPACE}/${REPO}")
runLibraryChecks("${WORKSPACE}/${REPO}", "v2.0.1")
}
}

stage('Tests')
{
steps {
dir("${REPO}/tests"){
viewEnv(){
withVenv{

// Note, moves to WORKSPACE
clone_test_deps()

withTools(params.TOOLS_VERSION) {
dir("${REPO}/tests") {
createVenv(reqFile: "requirements.txt")
withVenv{
runPytest('--numprocesses=8 --smoke --enabletracing')
}
}
}
}
}
} // dir
} // withTools
} // steps
post
{
failure
Expand All @@ -74,9 +81,6 @@ pipeline {
}
}
post {
success {
updateViewfiles()
}
cleanup {
xcoreCleanSandbox()
}
Expand Down
15 changes: 6 additions & 9 deletions requirements.txt → tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# python_version 3.7.6
# python_version 3.12.1
# pip_version 24.2
#
# The parse_version_from_requirements() function in the installPipfile.groovy
# file of the Jenkins Shared Library uses the python_version comment to set
Expand All @@ -17,12 +18,9 @@
# pip-install this one as editable using this repository's setup.py file. The
# same modules should appear in the setup.py list as given below.

black==21.5b1
filelock==3.0.12
# Pin importlib-metadata to <5 due to https://github.com/python/importlib_metadata/issues/409.
importlib-metadata==4.13.0
pytest==6.2.4
pytest-xdist==2.3.0
flake8==7.1.1
pytest==8.3.2
pytest-xdist==3.6.1
filelock==3.0.12

# Development dependencies
Expand All @@ -37,5 +35,4 @@ filelock==3.0.12
# If this repository uses the setup functionality (e.g., script entry points)
# of its own setup.py file, then this list must include an entry for that
# setup.py file, e.g., '-e .' or '-e ./python' (without the quotes).
-e ./python
-e ./../test_support
-e ./../../test_support

0 comments on commit bbe571c

Please sign in to comment.