Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
buildstream
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
BuildStream
buildstream
Commits
02357e38
There was a problem fetching the pipeline summary.
Commit
02357e38
authored
7 years ago
by
Tristan Maat
Browse files
Options
Downloads
Patches
Plain Diff
.gitlab-ci.yml: Drop root privileges for some tests
parent
c1c20402
No related branches found
No related tags found
Loading
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+21
-3
21 additions, 3 deletions
.gitlab-ci.yml
setup.cfg
+1
-0
1 addition, 0 deletions
setup.cfg
with
22 additions
and
3 deletions
.gitlab-ci.yml
+
21
−
3
View file @
02357e38
...
@@ -15,16 +15,22 @@ before_script:
...
@@ -15,16 +15,22 @@ before_script:
-
df -h
-
df -h
# Store cache in the project directory
# Store cache in the project directory
-
mkdir -p
"$(pwd)/cache"
-
if [ -d "$(pwd)/cache" ]; then chmod -R a+rw
"$(pwd)/cache"
; fi
-
export XDG_CACHE_HOME="$(pwd)/cache"
-
export XDG_CACHE_HOME="$(pwd)/cache"
-
adduser -m buildstream
# Run premerge commits
# Run premerge commits
#
#
pytest
:
pytest
:
stage
:
test
stage
:
test
script
:
script
:
-
python3 setup.py test
-
chmod -R a+rw .
# We run as a simple user to test for permission issues
-
su buildstream -c 'python3 setup.py test'
-
mkdir -p coverage-pytest/
-
mkdir -p coverage-pytest/
-
chmod -R a+rw coverage-pytest/
-
cp .coverage.* coverage-pytest/coverage.pytest
-
cp .coverage.* coverage-pytest/coverage.pytest
artifacts
:
artifacts
:
paths
:
paths
:
...
@@ -37,10 +43,16 @@ integration_linux:
...
@@ -37,10 +43,16 @@ integration_linux:
script
:
script
:
-
pip3 install --no-index .
-
pip3 install --no-index .
-
chown -R buildstream:buildstream integration-tests
-
chown -R buildstream:buildstream /home/buildstream/.gnupg
-
cd integration-tests
-
cd integration-tests
-
./run-test.sh --arg --colors --cov ../.coveragerc --sources ${XDG_CACHE_HOME}/buildstream/sources test
# We run as a simple user to test for permission issues
-
su buildstream -c './run-test.sh --arg --colors --cov ../.coveragerc --sources ${XDG_CACHE_HOME}/buildstream/sources test'
-
cd ..
-
cd ..
-
mkdir -p coverage-linux/
-
mkdir -p coverage-linux/
-
chmod -R a+rw coverage-linux/
-
cp integration-tests/.coverage coverage-linux/coverage.linux
-
cp integration-tests/.coverage coverage-linux/coverage.linux
-
cp -a integration-tests/tmp/logs logs-linux
-
cp -a integration-tests/tmp/logs logs-linux
...
@@ -59,7 +71,10 @@ pytest_unix:
...
@@ -59,7 +71,10 @@ pytest_unix:
# disappear unless we mark it as user-installed.
# disappear unless we mark it as user-installed.
-
dnf mark install fuse-libs
-
dnf mark install fuse-libs
-
dnf erase -y bubblewrap ostree
-
dnf erase -y bubblewrap ostree
# Since the unix platform is required to run as root, no user change required
-
python3 setup.py test
-
python3 setup.py test
-
mkdir -p coverage-pytest-unix
-
mkdir -p coverage-pytest-unix
-
cp .coverage.* coverage-pytest-unix/coverage.pytest-unix
-
cp .coverage.* coverage-pytest-unix/coverage.pytest-unix
artifacts
:
artifacts
:
...
@@ -73,7 +88,10 @@ integration_unix:
...
@@ -73,7 +88,10 @@ integration_unix:
script
:
script
:
-
pip3 install --no-index .
-
pip3 install --no-index .
-
cd integration-tests
-
cd integration-tests
# Since the unix platform is required to run as root, no user change required
-
./run-test.sh --arg --colors --cov ../.coveragerc --sources ${XDG_CACHE_HOME}/buildstream/sources test
-
./run-test.sh --arg --colors --cov ../.coveragerc --sources ${XDG_CACHE_HOME}/buildstream/sources test
-
cd ..
-
cd ..
-
mkdir -p coverage-unix/
-
mkdir -p coverage-unix/
-
cp integration-tests/.coverage coverage-unix/coverage.unix
-
cp integration-tests/.coverage coverage-unix/coverage.unix
...
...
This diff is collapsed.
Click to expand it.
setup.cfg
+
1
−
0
View file @
02357e38
...
@@ -3,6 +3,7 @@ test=pytest
...
@@ -3,6 +3,7 @@ test=pytest
[tool:pytest]
[tool:pytest]
addopts
=
--verbose --basetemp ./tmp --pep8 --cov=buildstream --cov-config .coveragerc
addopts
=
--verbose --basetemp ./tmp --pep8 --cov=buildstream --cov-config .coveragerc
norecursedirs
=
integration-tests*
python_files
=
tests/*/*.py
python_files
=
tests/*/*.py
pep8maxlinelength
=
119
pep8maxlinelength
=
119
pep8ignore
=
pep8ignore
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment