Skip to content

Commit

Permalink
[jenkins]: Lock vs tests (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
stcheng authored Jul 26, 2019
1 parent 2bbe0c0 commit 8191332
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
15 changes: 12 additions & 3 deletions jenkins/vs/buildimage-vs-all-pr/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
'''
}
}
}
}

Expand Down
13 changes: 13 additions & 0 deletions jenkins/vs/buildimage-vs-all/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
'''
}
}
}
}

Expand Down

0 comments on commit 8191332

Please sign in to comment.