diff --git a/jenkins/vs/buildimage-vs-all-pr/Jenkinsfile b/jenkins/vs/buildimage-vs-all-pr/Jenkinsfile index d9cac21ed8c9..017b13bd16d4 100644 --- a/jenkins/vs/buildimage-vs-all-pr/Jenkinsfile +++ b/jenkins/vs/buildimage-vs-all-pr/Jenkinsfile @@ -33,17 +33,26 @@ pipeline { git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git' make configure PLATFORM=vs +make SONIC_CONFIG_BUILD_JOBS=1 target/docker-sonic-vs.gz -touch target/debs/stretch/*.deb +''' + } + } -make SONIC_CONFIG_BUILD_JOBS=1 target/docker-sonic-vs.gz + stage('Test') { + steps { + wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'xterm']) { + lock(resource: "vstest_${env.NODE_NAME}") { + sh ''' +#!/bin/bash -xe docker load < target/docker-sonic-vs.gz cd platform/vs/tests sudo py.test -v --junitxml=tr.xml -# pavelsh added -s to see output from the pytest ''' + } + } } } diff --git a/jenkins/vs/buildimage-vs-all/Jenkinsfile b/jenkins/vs/buildimage-vs-all/Jenkinsfile index dc7d853ecf1c..ef1d6486958a 100644 --- a/jenkins/vs/buildimage-vs-all/Jenkinsfile +++ b/jenkins/vs/buildimage-vs-all/Jenkinsfile @@ -36,11 +36,24 @@ git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --rel make configure PLATFORM=vs make SONIC_CONFIG_BUILD_JOBS=1 target/docker-sonic-vs.gz +''' + } + } + + stage('Test') { + steps { + wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'xterm']) { + lock(resource: "vstest_${env.NODE_NAME}") { + sh ''' +#!/bin/bash -xe + docker load < target/docker-sonic-vs.gz cd platform/vs/tests sudo py.test -v --junitxml=tr.xml ''' + } + } } }