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
Select Git revision
  • 108-integration-tests-not-idempotent-and-self-contained
  • 131-behavior-of-except-argument-is-frustrating-and-confusing
  • 132-loading-external-plugins-works-without-explicit-requirement-in-project-conf
  • 135-expire-artifacts-in-local-cache
  • 135-expire-artifacts-in-local-cache-clean
  • 138-aborting-bst-push-command-causes-stack-trace-3
  • 142-potentially-printing-provenance-more-than-once-in-loaderrors
  • 188-trigger-external-commands-on-certain-events
  • 214-filter-workspacing-rework
  • 218-allow-specifying-the-chroot-binary-to-use-for-sandboxes-on-unix-platforms
  • 239-use-pylint-for-linting
  • 372-allow-queues-to-run-auxilliary-jobs-after-an-element-s-job-finishes
  • 380-untagged-bst
  • 463-make-dependency-type-default-to-build
  • 537-mirror-fallback-does-not-work-for-git
  • 64-clarify-about-plugins-importing-other-plugins
  • 716-add-example-with-build-directory-outside-of-source-directory
  • 716-add-example-with-build-directory-outside-of-source-directory-2
  • 81-non-empty-read-only-directories-not-handled-during-bst-build-and-others
  • BenjaminSchubert/fix-quota-tests
  • Qinusty/235-manifest
  • Qinusty/397
  • Qinusty/470-bst-track-yaml-indent
  • Qinusty/553-backport-1.2
  • Qinusty/663-missing-cache-key-workspace-open
  • Qinusty/backport-576
  • Qinusty/backport-skipped-562
  • Qinusty/gitlab-ci
  • Qinusty/gitlab-ci-duration
  • Qinusty/message-helpers
  • Qinusty/pytest_cache_gitignore
  • abderrahim/cached-failure
  • abderrahim/cachekey-strictrebuild
  • abderrahim/cleanup-speedup
  • abderrahim/makemaker
  • abderrahim/resolve-remotes
  • abderrahim/source-cache
  • abderrahim/stage-artifact-scriptelement
  • abderrahim/virtual-extract
  • adamjones/contributing
  • adamjones/contribution-guide
  • aevri/assert_no_unexpected_size_writes
  • aevri/casdprocessmanager2
  • aevri/check_spawn_ci_working
  • aevri/enable_spawn_ci_4
  • aevri/enable_spawn_ci_6
  • aevri/enable_spawn_ci_7
  • aevri/json_artifact_meta
  • aevri/picklable_jobs
  • aevri/plugin_venvs
  • aevri/provenance_scope
  • aevri/pylint_ignore_argsdiff
  • aevri/safe_noninteractive
  • aevri/win32
  • aevri/win32_minimal
  • aevri/win32_minimal_seemstowork_20190829
  • aevri/win32_receive_signals
  • aevri/win32_temptext
  • alexfazakas/add-bst-init-argument
  • alexfazakas/use-merge-trains
  • always-do-linting
  • another-segfault
  • becky/locally_downloaded_files
  • becky/shell_launch_errors
  • bschubert/add-isolated-tests
  • bschubert/isort
  • bschubert/merge-parent-child-job
  • bschubert/more-mypy
  • bschubert/no-multiprocessing-bak
  • bschubert/no-multiprocessing-full
  • bschubert/optimize-deps
  • bschubert/optimize-element-init
  • bschubert/optimize-loader-sorting
  • bschubert/optimize-mapping-node
  • bschubert/optimize-splits
  • bschubert/remove-multiline-switch-for-re
  • bschubert/remove-parent-child-pipe
  • bschubert/remove-pip-source
  • bschubert/standardize-source-tests
  • bschubert/test-plugins
  • bschubert/update-coverage
  • bst-1
  • bst-1.0
  • bst-1.2
  • bst-1.4
  • bst-pull
  • bst-push
  • buildbox-pre-will
  • cache-key-v0
  • caching_build_trees
  • cascache_timeouts
  • chandan/automate-pypi-release
  • chandan/cli-deps
  • chandan/contrib-dependencies
  • chandan/element-cache
  • chandan/enums
  • chandan/extras-require
  • chandan/macos-multiprocessing
  • chandan/moar-parallelism
  • chandan/moar-runners
  • 1.0.0
  • 1.0.1
  • 1.1.0
  • 1.1.1
  • 1.1.2
  • 1.1.3
  • 1.1.4
  • 1.1.5
  • 1.1.6
  • 1.1.7
  • 1.2.0
  • 1.2.1
  • 1.2.2
  • 1.2.3
  • 1.2.4
  • 1.2.5
  • 1.2.6
  • 1.2.7
  • 1.2.8
  • 1.3.0
  • 1.3.1
  • 1.4.0
  • 1.4.1
  • 1.4.2
  • 1.4.3
  • 1.5.0
  • 1.5.1
  • 1.6.0
  • 1.6.1
  • 1.91.0
  • 1.91.1
  • 1.91.2
  • 1.91.3
  • 1.93.0
  • 1.93.1
  • 1.93.2
  • 1.93.3
  • 1.93.4
  • 1.93.5
  • CROSS_PLATFORM_SEPT_2017
  • PRE_CAS_MERGE_JULY_2018
  • bst-1-branchpoint
  • bst-1.2-branchpoint
  • bst-1.4-branchpoint
144 results

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
Select Git revision
  • 108-integration-tests-not-idempotent-and-self-contained
  • 131-behavior-of-except-argument-is-frustrating-and-confusing
  • 132-loading-external-plugins-works-without-explicit-requirement-in-project-conf
  • 135-expire-artifacts-in-local-cache
  • 135-expire-artifacts-in-local-cache-clean
  • 138-aborting-bst-push-command-causes-stack-trace-3
  • 142-potentially-printing-provenance-more-than-once-in-loaderrors
  • 188-trigger-external-commands-on-certain-events
  • 214-filter-workspacing-rework
  • 218-allow-specifying-the-chroot-binary-to-use-for-sandboxes-on-unix-platforms
  • 239-use-pylint-for-linting
  • 372-allow-queues-to-run-auxilliary-jobs-after-an-element-s-job-finishes
  • 380-untagged-bst
  • 463-make-dependency-type-default-to-build
  • 537-mirror-fallback-does-not-work-for-git
  • 64-clarify-about-plugins-importing-other-plugins
  • 716-add-example-with-build-directory-outside-of-source-directory
  • 716-add-example-with-build-directory-outside-of-source-directory-2
  • 81-non-empty-read-only-directories-not-handled-during-bst-build-and-others
  • BenjaminSchubert/fix-quota-tests
  • Qinusty/235-manifest
  • Qinusty/397
  • Qinusty/470-bst-track-yaml-indent
  • Qinusty/553-backport-1.2
  • Qinusty/663-missing-cache-key-workspace-open
  • Qinusty/backport-576
  • Qinusty/backport-skipped-562
  • Qinusty/gitlab-ci
  • Qinusty/gitlab-ci-duration
  • Qinusty/message-helpers
  • Qinusty/pytest_cache_gitignore
  • abderrahim/cached-failure
  • abderrahim/cachekey-strictrebuild
  • abderrahim/cleanup-speedup
  • abderrahim/makemaker
  • abderrahim/resolve-remotes
  • abderrahim/source-cache
  • abderrahim/stage-artifact-scriptelement
  • abderrahim/virtual-extract
  • adamjones/contributing
  • adamjones/contribution-guide
  • aevri/assert_no_unexpected_size_writes
  • aevri/casdprocessmanager2
  • aevri/check_spawn_ci_working
  • aevri/enable_spawn_ci_4
  • aevri/enable_spawn_ci_6
  • aevri/enable_spawn_ci_7
  • aevri/json_artifact_meta
  • aevri/picklable_jobs
  • aevri/plugin_venvs
  • aevri/provenance_scope
  • aevri/pylint_ignore_argsdiff
  • aevri/safe_noninteractive
  • aevri/win32
  • aevri/win32_minimal
  • aevri/win32_minimal_seemstowork_20190829
  • aevri/win32_receive_signals
  • aevri/win32_temptext
  • alexfazakas/add-bst-init-argument
  • alexfazakas/use-merge-trains
  • always-do-linting
  • another-segfault
  • becky/locally_downloaded_files
  • becky/shell_launch_errors
  • bschubert/add-isolated-tests
  • bschubert/isort
  • bschubert/merge-parent-child-job
  • bschubert/more-mypy
  • bschubert/no-multiprocessing-bak
  • bschubert/no-multiprocessing-full
  • bschubert/optimize-deps
  • bschubert/optimize-element-init
  • bschubert/optimize-loader-sorting
  • bschubert/optimize-mapping-node
  • bschubert/optimize-splits
  • bschubert/remove-multiline-switch-for-re
  • bschubert/remove-parent-child-pipe
  • bschubert/remove-pip-source
  • bschubert/standardize-source-tests
  • bschubert/test-plugins
  • bschubert/update-coverage
  • bst-1
  • bst-1.0
  • bst-1.2
  • bst-1.4
  • bst-pull
  • bst-push
  • buildbox-pre-will
  • cache-key-v0
  • caching_build_trees
  • cascache_timeouts
  • chandan/automate-pypi-release
  • chandan/cli-deps
  • chandan/contrib-dependencies
  • chandan/element-cache
  • chandan/enums
  • chandan/extras-require
  • chandan/macos-multiprocessing
  • chandan/moar-parallelism
  • chandan/moar-runners
  • 1.0.0
  • 1.0.1
  • 1.1.0
  • 1.1.1
  • 1.1.2
  • 1.1.3
  • 1.1.4
  • 1.1.5
  • 1.1.6
  • 1.1.7
  • 1.2.0
  • 1.2.1
  • 1.2.2
  • 1.2.3
  • 1.2.4
  • 1.2.5
  • 1.2.6
  • 1.2.7
  • 1.2.8
  • 1.3.0
  • 1.3.1
  • 1.4.0
  • 1.4.1
  • 1.4.2
  • 1.4.3
  • 1.5.0
  • 1.5.1
  • 1.6.0
  • 1.6.1
  • 1.91.0
  • 1.91.1
  • 1.91.2
  • 1.91.3
  • 1.93.0
  • 1.93.1
  • 1.93.2
  • 1.93.3
  • 1.93.4
  • 1.93.5
  • CROSS_PLATFORM_SEPT_2017
  • PRE_CAS_MERGE_JULY_2018
  • bst-1-branchpoint
  • bst-1.2-branchpoint
  • bst-1.4-branchpoint
144 results
Show changes
......@@ -89,7 +89,7 @@ def test_simple_file_build(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=[
'checkout', 'target.bst', checkoutdir
'artifact', 'checkout', 'target.bst', '--directory', checkoutdir
])
result.assert_success()
# Note that the url of the file in target.bst is actually /dir/file
......@@ -122,7 +122,7 @@ def test_simple_file_custom_name_build(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=[
'checkout', 'target.bst', checkoutdir
'artifact', 'checkout', 'target.bst', '--directory', checkoutdir
])
result.assert_success()
assert(not os.path.exists(os.path.join(checkoutdir, 'file')))
......@@ -136,18 +136,25 @@ def test_unique_key(cli, tmpdir, datafiles):
'''
project = os.path.join(datafiles.dirname, datafiles.basename)
generate_project(project, tmpdir)
assert cli.get_element_state(project, 'target.bst') == "fetch needed"
assert cli.get_element_state(project, 'target-custom.bst') == "fetch needed"
assert cli.get_element_state(project, 'target-custom-executable.bst') == "fetch needed"
states = cli.get_element_states(project, [
'target.bst', 'target-custom.bst', 'target-custom-executable.bst'
])
assert states['target.bst'] == "fetch needed"
assert states['target-custom.bst'] == "fetch needed"
assert states['target-custom-executable.bst'] == "fetch needed"
# Try to fetch it
result = cli.run(project=project, args=[
'source', 'fetch', 'target.bst'
])
# We should download the file only once
assert cli.get_element_state(project, 'target.bst') == 'buildable'
assert cli.get_element_state(project, 'target-custom.bst') == 'buildable'
assert cli.get_element_state(project, 'target-custom-executable.bst') == 'buildable'
states = cli.get_element_states(project, [
'target.bst', 'target-custom.bst', 'target-custom-executable.bst'
])
assert states['target.bst'] == 'buildable'
assert states['target-custom.bst'] == 'buildable'
assert states['target-custom-executable.bst'] == 'buildable'
# But the cache key is different because the 'filename' is different.
assert cli.get_element_key(project, 'target.bst') != \
......@@ -169,7 +176,7 @@ def test_executable(cli, tmpdir, datafiles):
])
result = cli.run(project=project, args=[
'checkout', 'target-custom-executable.bst', checkoutdir
'artifact', 'checkout', 'target-custom-executable.bst', '--directory', checkoutdir
])
mode = os.stat(os.path.join(checkoutdir, 'some-custom-file')).st_mode
assert (mode & stat.S_IEXEC)
......@@ -202,7 +209,7 @@ def test_use_netrc(cli, datafiles, server_type, tmpdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
checkout_file = os.path.join(checkoutdir, 'file')
......
......@@ -139,7 +139,7 @@ def test_stage_default_basedir(cli, tmpdir, datafiles, srcdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '*')
......@@ -168,7 +168,7 @@ def test_stage_no_basedir(cli, tmpdir, datafiles, srcdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the full content of the tarball is checked out (base-dir: '')
......@@ -197,7 +197,7 @@ def test_stage_explicit_basedir(cli, tmpdir, datafiles, srcdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '*')
......@@ -233,7 +233,7 @@ def test_stage_contains_links(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '*')
......@@ -262,7 +262,7 @@ def test_stage_default_basedir_lzip(cli, tmpdir, datafiles, srcdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target-lz.bst'])
result.assert_success()
result = cli.run(project=project, args=['checkout', 'target-lz.bst', checkoutdir])
result = cli.run(project=project, args=['artifact', 'checkout', 'target-lz.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '*')
......@@ -348,7 +348,7 @@ def test_use_netrc(cli, datafiles, server_type, tmpdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
original_dir = os.path.join(str(datafiles), 'content', 'a')
......
......@@ -123,7 +123,7 @@ def test_stage_default_basedir(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '*')
......@@ -151,7 +151,7 @@ def test_stage_no_basedir(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the full content of the tarball is checked out (base-dir: '')
......@@ -179,7 +179,7 @@ def test_stage_explicit_basedir(cli, tmpdir, datafiles):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
# Check that the content of the first directory is checked out (base-dir: '*')
......@@ -221,7 +221,7 @@ def test_use_netrc(cli, datafiles, server_type, tmpdir):
result.assert_success()
result = cli.run(project=project, args=['build', 'target.bst'])
result.assert_success()
result = cli.run(project=project, args=['checkout', 'target.bst', checkoutdir])
result = cli.run(project=project, args=['artifact', 'checkout', 'target.bst', '--directory', checkoutdir])
result.assert_success()
original_dir = os.path.join(str(datafiles), 'content', 'a')
......
from setuptools.sandbox import run_setup
import os
import pytest
import re
import shutil
import subprocess
SETUP_TEMPLATE = '''\
......@@ -88,7 +88,9 @@ def generate_pip_package(tmpdir, pypi, name, version='0.1'):
f.write(INIT_TEMPLATE.format(name=name))
os.chmod(main_file, 0o644)
run_setup(setup_file, ['sdist'])
# Run sdist with a fresh process
p = subprocess.run(['python3', 'setup.py', 'sdist'], cwd=tmpdir)
assert p.returncode == 0
# create directory for this package in pypi resulting in a directory
# tree resembling the following structure:
......
......@@ -245,8 +245,14 @@ class Cli():
def remove_artifact_from_cache(self, project, element_name,
*, cache_dir=None):
# Read configuration to figure out where artifacts are stored
if not cache_dir:
cache_dir = os.path.join(project, 'cache', 'artifacts')
default = os.path.join(project, 'cache', 'artifacts')
if self.config is not None:
cache_dir = self.config.get('artifactdir', default)
else:
cache_dir = default
cache_dir = os.path.join(cache_dir, 'cas', 'refs', 'heads')
......@@ -375,6 +381,9 @@ class Cli():
# Fetch an element state by name by
# invoking bst show on the project with the CLI
#
# If you need to get the states of multiple elements,
# then use get_element_states(s) instead.
#
def get_element_state(self, project, element_name):
result = self.run(project=project, silent=True, args=[
'show',
......@@ -385,6 +394,24 @@ class Cli():
result.assert_success()
return result.output.strip()
# Fetch the states of elements for a given target / deps
#
# Returns a dictionary with the element names as keys
#
def get_element_states(self, project, targets, deps='all'):
result = self.run(project=project, silent=True, args=[
'show',
'--deps', deps,
'--format', '%{name}||%{state}',
] + targets)
result.assert_success()
lines = result.output.splitlines()
states = {}
for line in lines:
split = line.split(sep='||')
states[split[0]] = split[1]
return states
# Fetch an element's cache key by invoking bst show
# on the project with the CLI
#
......
......@@ -2,6 +2,7 @@
# so we dont have to repeat this everywhere
#
import os
import subprocess
import sys
from buildstream import _site, utils, ProgramNotFoundError
......@@ -16,8 +17,12 @@ except ProgramNotFoundError:
try:
utils.get_host_tool('git')
HAVE_GIT = True
out = str(subprocess.check_output(['git', '--version']), "utf-8")
version = tuple(int(x) for x in out.split(' ', 2)[2].split('.'))
HAVE_OLD_GIT = version < (1, 8, 5)
except ProgramNotFoundError:
HAVE_GIT = False
HAVE_OLD_GIT = False
try:
utils.get_host_tool('ostree')
......
......@@ -65,11 +65,11 @@ deps =
[testenv:docs]
commands =
make -C doc
# Currently sphinx_rtd_theme does not support Sphinx >1.8, this breaks search functionality
# sphinx_rtd_theme < 0.4.2 breaks search functionality for Sphinx >= 1.8
deps =
sphinx==1.7.9
sphinx
sphinx-click
sphinx_rtd_theme
sphinx_rtd_theme >= 0.4.2
-rrequirements/requirements.txt
-rrequirements/plugin-requirements.txt
passenv =
......@@ -80,3 +80,13 @@ passenv =
LC_ALL
whitelist_externals =
make
#
# (re-)Generating man pages
#
[testenv:man]
commands =
python3 setup.py --command-packages=click_man.commands man_pages
deps =
click-man
-rrequirements/requirements.txt