Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • willsalmon/buildstream
  • CumHoleZH/buildstream
  • tchaik/buildstream
  • DCotyPortfolio/buildstream
  • jesusoctavioas/buildstream
  • patrickmmartin/buildstream
  • franred/buildstream
  • tintou/buildstream
  • alatiera/buildstream
  • martinblanchard/buildstream
  • neverdie22042524/buildstream
  • Mattlk13/buildstream
  • PServers/buildstream
  • phamnghia610909/buildstream
  • chiaratolentino/buildstream
  • eysz7-x-x/buildstream
  • kerrick1/buildstream
  • matthew-yates/buildstream
  • twofeathers/buildstream
  • mhadjimichael/buildstream
  • pointswaves/buildstream
  • Mr.JackWilson/buildstream
  • Tw3akG33k/buildstream
  • AlexFazakas/buildstream
  • eruidfkiy/buildstream
  • clamotion2/buildstream
  • nanonyme/buildstream
  • wickyjaaa/buildstream
  • nmanchev/buildstream
  • bojorquez.ja/buildstream
  • mostynb/buildstream
  • highpit74/buildstream
  • Demo112/buildstream
  • ba2014sheer/buildstream
  • tonimadrino/buildstream
  • usuario2o/buildstream
  • Angelika123456/buildstream
  • neo355/buildstream
  • corentin-ferlay/buildstream
  • coldtom/buildstream
  • wifitvbox81/buildstream
  • 358253885/buildstream
  • seanborg/buildstream
  • SotK/buildstream
  • DouglasWinship/buildstream
  • karansthr97/buildstream
  • louib/buildstream
  • bwh-ct/buildstream
  • robjh/buildstream
  • we88c0de/buildstream
  • zhengxian5555/buildstream
51 results
Show changes
Commits on Source (3)
  • Chandan Singh's avatar
    Add tox.ini from master branch · 898cd9d1
    Chandan Singh authored
    `tox.ini` has seen heavy churn lately, and backporting individual
    commits is turning out to be a more involved process as the two branches
    have diverged a bit. So, this is more or less copy-pasted from the
    master branch, without a separate lint job.
    
    Since switching to `pycodestyle` will require some code formatting
    changes, that does not seem reasonable to apply to this branch. So,
    let's stick with running the linters via `pytest`.
    898cd9d1
  • Chandan Singh's avatar
    9d9b73e7
  • Chandan Singh's avatar
    .gitlab-ci.yml: Run tests using tox · 0a51e0b1
    Chandan Singh authored
    This commit a backport of a handful of merge requests to master. As
    these two branches have diverged a bit and the master branch has seen a
    fair bit of churn lately, it was not trivial to simply cherry-pick the
    changes.
    
    Some related merge reqtests are: !1027, !1037 and !1051.
    0a51e0b1
......@@ -13,9 +13,12 @@ tests/**/*.pyc
integration-cache/
tmp
.coverage
.coverage-reports/
.coverage.*
.cache
.pytest_cache/
*.bst/
.tox/
# Pycache, in case buildstream is ran directly from within the source
# tree
......
image: buildstream/testsuite-debian:9-master-114-4cab18e3
image: buildstream/testsuite-debian:9-5da27168-32c47d1c
cache:
key: "$CI_JOB_NAME-"
......@@ -6,49 +6,13 @@ cache:
- cache/
stages:
- prepare
- test
- post
#####################################################
# Prepare stage #
#####################################################
# Create a source distribution
#
source_dist:
stage: prepare
script:
# Generate the source distribution tarball
#
- python3 setup.py sdist
- tar -ztf dist/*
- tarball=$(cd dist && echo $(ls *))
# Create an installer script
- |
cat > dist/install.sh << EOF
#!/bin/sh
tar -zxf ${tarball}
cd ${tarball%.tar.gz}
pip3 install --no-index .
EOF
# unpack tarball as `dist/buildstream` directory
- |
cat > dist/unpack.sh << EOF
#!/bin/sh
tar -zxf ${tarball}
mv ${tarball%.tar.gz} buildstream
EOF
# Make our helpers executable
- chmod +x dist/install.sh
- chmod +x dist/unpack.sh
artifacts:
paths:
- dist/
variables:
INTEGRATION_CACHE: "${CI_PROJECT_DIR}/cache/integration-cache"
TEST_COMMAND: "tox -- --color=yes --integration"
COVERAGE_PREFIX: "${CI_JOB_NAME}."
#####################################################
......@@ -57,66 +21,53 @@ source_dist:
# Run premerge commits
#
.linux-tests-template: &linux-tests
.tests-template: &tests
stage: test
variables:
PYTEST_ADDOPTS: "--color=yes"
script:
before_script:
# Diagnostics
- mount
- df -h
script:
- mkdir -p "${INTEGRATION_CACHE}"
- useradd -Um buildstream
- chown -R buildstream:buildstream .
- export INTEGRATION_CACHE="$(pwd)/cache/integration-cache"
# Unpack and get into dist/buildstream
- cd dist && ./unpack.sh
- chown -R buildstream:buildstream buildstream
- cd buildstream
# Run the tests from the source distribution, We run as a simple
# user to test for permission issues
- su buildstream -c 'python3 setup.py test --index-url invalid://uri --addopts --integration'
# Run the tests as a simple user to test for permission issues
- su buildstream -c "${TEST_COMMAND}"
# Go back to the toplevel and collect our reports
- cd ../..
- mkdir -p coverage-linux/
- cp dist/buildstream/.coverage.* coverage-linux/coverage."${CI_JOB_NAME}"
except:
- schedules
artifacts:
paths:
- coverage-linux/
- .coverage-reports
tests-debian-9:
image: buildstream/testsuite-debian:9-master-117-aa3a33b3
<<: *linux-tests
image: buildstream/testsuite-debian:9-5da27168-32c47d1c
<<: *tests
tests-fedora-27:
image: buildstream/testsuite-fedora:27-master-117-aa3a33b3
<<: *linux-tests
image: buildstream/testsuite-fedora:27-5da27168-32c47d1c
<<: *tests
tests-fedora-28:
image: buildstream/testsuite-fedora:28-master-117-aa3a33b3
<<: *linux-tests
image: buildstream/testsuite-fedora:28-5da27168-32c47d1c
<<: *tests
tests-ubuntu-18.04:
image: buildstream/testsuite-ubuntu:18.04-master-117-aa3a33b3
<<: *linux-tests
image: buildstream/testsuite-ubuntu:18.04-5da27168-32c47d1c
<<: *tests
tests-unix:
# Use fedora here, to a) run a test on fedora and b) ensure that we
# can get rid of ostree - this is not possible with debian-8
image: buildstream/testsuite-fedora:27-master-117-aa3a33b3
stage: test
image: buildstream/testsuite-fedora:27-5da27168-32c47d1c
<<: *tests
variables:
BST_FORCE_BACKEND: "unix"
PYTEST_ADDOPTS: "--color=yes"
script:
- export INTEGRATION_CACHE="$(pwd)/cache/integration-cache"
script:
# We remove the Bubblewrap and OSTree packages here so that we catch any
# codepaths that try to use them. Removing OSTree causes fuse-libs to
......@@ -124,39 +75,19 @@ tests-unix:
- dnf mark install fuse-libs
- dnf erase -y bubblewrap ostree
# Unpack and get into dist/buildstream
- cd dist && ./unpack.sh && cd buildstream
# Since the unix platform is required to run as root, no user change required
- python3 setup.py test --index-url invalid://uri --addopts --integration
# Go back to the toplevel and collect our reports
- cd ../..
- mkdir -p coverage-unix/
- cp dist/buildstream/.coverage.* coverage-unix/coverage.unix
except:
- schedules
artifacts:
paths:
- coverage-unix/
- logs-unix/
- ${TEST_COMMAND}
# Automatically build documentation for every commit, we want to know
# if building documentation fails even if we're not deploying it.
# Note: We still do not enforce a consistent installation of python3-sphinx,
# as it will significantly grow the backing image.
docs:
stage: test
variables:
BST_FORCE_SESSION_REBUILD: 1
script:
- export BST_SOURCE_CACHE="$(pwd)/cache/integration-cache/sources"
- pip3 install sphinx
- pip3 install sphinx-click
- pip3 install sphinx_rtd_theme
- cd dist && ./unpack.sh && cd buildstream
- make BST_FORCE_SESSION_REBUILD=1 -C doc
- cd ../..
- mv dist/buildstream/doc/build/html public
- env BST_SOURCE_CACHE="$(pwd)/cache/integration-cache/sources" tox -e docs
- mv doc/build/html public
except:
- schedules
artifacts:
......@@ -170,7 +101,8 @@ docs:
bst_ext_ref: 1d6ab71151b93c8cbc0a91a36ffe9270f3b835f1 # 0.5.1
fd_sdk_ref: 88d7c22c2281b987faa02edd57df80d430eecf1f # 18.08.12
before_script:
- (cd dist && ./unpack.sh && cd buildstream && pip3 install .)
- pip3 install -r requirements/requirements.txt -r requirements/plugin-requirements.txt
- pip3 install --no-index .
- pip3 install --user -e ${bst_ext_url}@${bst_ext_ref}#egg=bst_ext
- git clone https://gitlab.com/freedesktop-sdk/freedesktop-sdk.git
- git -C freedesktop-sdk checkout ${fd_sdk_ref}
......@@ -253,21 +185,15 @@ coverage:
stage: post
coverage: '/TOTAL +\d+ +\d+ +(\d+\.\d+)%/'
script:
- cd dist && ./unpack.sh && cd buildstream
- pip3 install --no-index .
- mkdir report
- cd report
- cp ../../../coverage-unix/coverage.unix .
- cp ../../../coverage-linux/coverage.* .
- ls coverage.*
- coverage combine --rcfile=../.coveragerc -a coverage.*
- coverage report --rcfile=../.coveragerc -m
- cp -a .coverage-reports/ ./coverage-sources
- tox -e coverage
- cp -a .coverage-reports/ ./coverage-report
dependencies:
- tests-debian-9
- tests-fedora-27
- tests-fedora-28
- tests-ubuntu-18.04
- tests-unix
- source_dist
except:
- schedules
......@@ -276,7 +202,6 @@ coverage:
pages:
stage: post
dependencies:
- source_dist
- docs
script:
- find public/
......
#
# Tox global configuration
#
[tox]
envlist = py35,py36,py37
skip_missing_interpreters = true
#
# Defaults for all environments
#
# Anything specified here is iherited by the sections
#
[testenv]
commands =
pytest --basetemp {envtmpdir} {posargs}
mkdir -p .coverage-reports
mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
deps =
-rrequirements/requirements.txt
-rrequirements/dev-requirements.txt
-rrequirements/plugin-requirements.txt
passenv =
BST_FORCE_BACKEND
GI_TYPELIB_PATH
INTEGRATION_CACHE
#
# These keys are not inherited by any other sections
#
setenv =
py{35,36,37}: COVERAGE_FILE = {envtmpdir}/.coverage
whitelist_externals =
py{35,36,37}:
mv
mkdir
#
# Coverage reporting
#
[testenv:coverage]
commands =
- coverage combine --rcfile={toxinidir}/.coveragerc {toxinidir}/.coverage-reports/
coverage report --rcfile={toxinidir}/.coveragerc -m
deps =
-rrequirements/requirements.txt
-rrequirements/dev-requirements.txt
setenv =
COVERAGE_FILE = {toxinidir}/.coverage-reports/.coverage
#
# Building documentation
#
[testenv:docs]
commands =
make -C doc
# sphinx_rtd_theme < 0.4.2 breaks search functionality for Sphinx >= 1.8
deps =
sphinx
sphinx-click
sphinx_rtd_theme >= 0.4.2
-rrequirements/requirements.txt
-rrequirements/plugin-requirements.txt
passenv =
BST_FORCE_SESSION_REBUILD
BST_SOURCE_CACHE
HOME
LANG
LC_ALL
whitelist_externals =
make