Permalink
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (26 sloc) 1.31 KB
summary: Run project static and unit tests
restore: |
rm -rf /tmp/static-unit-tests
execute: |
mkdir -p /tmp/static-unit-tests/src/github.com/snapcore
cp -ar "$PROJECT_PATH" /tmp/static-unit-tests/src/github.com/snapcore
chown -R test:12345 /tmp/static-unit-tests
# remove leftovers
rm -r /tmp/static-unit-tests/src/github.com/snapcore/snapd/vendor/*/
rm -rf /tmp/static-unit-tests/src/github.com/snapcore/snapd/cmd/{autom4te.cache,configure,test-driver,config.status,config.guess,config.sub,config.h.in,compile,install-sh,depcomp,build,missing,aclocal.m4,Makefile,Makefile.in}
su -l -c "cd /tmp/static-unit-tests/src/github.com/snapcore/snapd && PATH=$PATH GOPATH=/tmp/static-unit-tests ./run-checks --static" test
su -l -c "cd /tmp/static-unit-tests/src/github.com/snapcore/snapd && \
TRAVIS_BUILD_NUMBER=$TRAVIS_BUILD_NUMBER \
TRAVIS_BRANCH=$TRAVIS_BRANCH \
TRAVIS_COMMIT=$TRAVIS_COMMIT \
TRAVIS_JOB_NUMBER=$TRAVIS_JOB_NUMBER \
TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST \
TRAVIS_JOB_ID=$TRAVIS_JOB_ID \
TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG \
TRAVIS_TAG=$TRAVIS_TAG \
PATH=$PATH \
COVERMODE=$COVERMODE \
TRAVIS=true \
CI=true \
GOPATH=/tmp/static-unit-tests \
./run-checks --unit" test