summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Addition of --long option to list-contents:becky/list_contents_long_optionRebecca Grayson2019-09-027-22/+147
| | | | | | | | | --long or -l will provide the user with extra information about the contents of the artifacts, including permission mode, file type, size and name. In order for this to work, the way in which list-contents works has been modified. A test and NEWS entry have also been added within this commit
* Merge branch 'becky/cleanup_artifact_tests' into 'master'bst-marge-bot2019-09-024-241/+334
|\ | | | | | | | | Cleanup: splitting artifact.py into separate test files See merge request BuildStream/buildstream!1570
| * Splitting up tests/frontend/artifact.pyRebecca Grayson2019-09-024-241/+334
|/ | | | | | | Artifact.py consists of multiple tests for the different artifact subcommands all grouped together. This MR splits the tests relevant to each subcommand up into separate test files, making it easier to find the relevant test.
* Merge branch 'tristan/strict-rebuild' into 'master'bst-marge-bot2019-08-3116-16/+173
|\ | | | | | | | | | | | | Support strict build dependencies Closes #254 See merge request BuildStream/buildstream!1542
| * tests/format/dependencies.py: Test errors when explicitly setting strict to Truetristan/strict-rebuildTristan Van Berkom2019-08-312-0/+17
| |
| * _loader/types.pyx: Disallow explicitly setting 'strict' to FalseTristan Van Berkom2019-08-311-0/+13
| | | | | | | | | | | | | | | | This is in order to keep the door open to allowing the project.conf set the default of dependency 'strict'-ness which might be useful for projects which use mostly static linking and the like, in which case we can later interpret explicitly non-strict dependencies as an override of the project default.
| * tests/frontend/show.py: Test that strict dependencies behave as expectedTristan Van Berkom2019-08-316-0/+71
| | | | | | | | | | | | | | | | | | This tests that the target which depends on a common dependency strictly in non strict mode needs to be rebuilt after this common dependency changes, while it is not the case when depending on the same common target non strictly. This is a regression test for #254
| * tests/format/dependencies.py: Testing for error of invalid strict runtime depsTristan Van Berkom2019-08-312-0/+16
| |
| * doc/source/format_declaring.rst: Documenting strict dependenciesTristan Van Berkom2019-08-312-0/+13
| | | | | | | | | | | | This adds documentation on the new keyword `strict` in dependency declarations, and adds a link to the strict mode user config section.
| * Implement strict dependency semanticsTristan Van Berkom2019-08-315-16/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows specifying a dependency as `strict`, e.g.: build-depends: - filename: element.bst strict: true This allows finer tuning of projects which want to leverage the non-strict build mode; dependencies which are statically linked to, or who's content is otherwise included verbatim in the resulting output, should be marked `strict` to ensure these bits get reassembled if necessary when building in non-strict mode. This fixes #254 Change summary: o _loader/loadelement.pyx: Added 'strict' attribute to Dependency o _loader/types.pyx: Added 'strict' attribute to Dependency do the parsing work. o _loader/metaelement.py: Added 'strict_dependencies' list o _loader/loader.py: Resolve the 'strict_dependencies' list o element.py: Added __strict_dependencies list, and use this to conditionally use weak cache keys in place of names for the purpose of building the weak cache key (in the case of dependencies which are marked as strict).
| * element.py: Use recursive element names for strict rebuild dependenciesTristan Van Berkom2019-08-311-1/+1
|/ | | | | | | | As discussed with Jürg on gitlab[0], it makes more sense to store the recursive element names and record the shape of the dependencies for non strict cache keys as well as strict ones. [0]: https://gitlab.com/BuildStream/buildstream/merge_requests/1542#note_205598556
* Merge branch 'tmewett/test-in-subprocess' into 'master'bst-marge-bot2019-08-308-495/+287
|\ | | | | | | | | | | | | Add in_subprocess pytest mark and modify tests which run in another process to use it Closes #1108 See merge request BuildStream/buildstream!1557
| * tests/internals/storage_vdir_import.py: Reduce number of test casestmewett/test-in-subprocessTom Mewett2019-08-301-9/+4
| | | | | | | | | | | | | | | | In changing the tests to use in_subprocess, they were modified to do parametrization over both variables instead of looping over one in the test itself. The purpose of the original code was to reduce the number of test cases printed in the output. I have hence attempted to remove superfluous test cases.
| * tests: Modify all tests using subprocesses to use in_subprocess markTom Mewett2019-08-305-486/+163
| | | | | | | | | | | | | | Additionally, test code that was previous executed by a subfunction (in the forked process) has been folded into the test function itself, as separating it is now redundant. This removes some duplicate code for setting up the context and project, etc.
| * setup.cfg: Register our already-existing pytest marksTom Mewett2019-08-301-0/+2
| |
| * tests: Implement and register in_subprocess pytest markTom Mewett2019-08-303-0/+118
|/
* Merge branch 'juerg/cache-quota' into 'master'bst-marge-bot2019-08-302-48/+13
|\ | | | | | | | | Cache quota configuration fixes See merge request BuildStream/buildstream!1566
| * tests/artifactcache/expiry.py: Partially reactivate cache quota testJürg Billeter2019-08-301-46/+1
| | | | | | | | | | | | test_invalid_cache_quota was marked as xfail as part of the migration to buildbox-casd. This reactivates the test but removes the checks for too large quotas as that aspect is better handled by buildbox-casd.
| * _context.py: Fix quota error when cas directory does not exist yetJürg Billeter2019-08-301-2/+6
| | | | | | | | | | | | If the quota is configured as percentage of total disk space, we need to make sure that _get_volume_size() does not fail if the cas directory does not exist yet.
| * _context.py: Ensure paths in user configuration are absoluteJürg Billeter2019-08-301-0/+6
|/ | | | | | Relative paths don't make sense in user configuration. The exception is workspacedir where `.` is useful as it will be combined with the name specified on the command line.
* Merge branch 'juerg/tox-home' into 'master'bst-marge-bot2019-08-304-6/+19
|\ | | | | | | | | tests: Set HOME environment variable and work around bzr race condition See merge request BuildStream/buildstream!1571
| * tests/testutils/repo/bzr.py: Work around race condition in bzrjuerg/tox-homeJürg Billeter2019-08-301-0/+5
| | | | | | | | | | This works around a TOCTTOU race condition in bzr's creation of ~/.bazaar in ensure_config_dir_exists() when running tests in parallel.
| * Set HOME environment variable for testsJürg Billeter2019-08-302-0/+2
| | | | | | | | This fixes host contamination for tools that use HOME, e.g., bzr.
| * tests/testutils/repo/git.py: Do not ignore environment variablesJürg Billeter2019-08-301-1/+4
| | | | | | | | | | Merge `os.environ` and `GIT_ENV` instead of replacing the existing (tox) environment variables such as HOME and XDG_CONFIG_HOME.
| * tests/testutils/repo/bzr.py: Do not ignore environment variablesJürg Billeter2019-08-301-5/+8
|/ | | | | Merge `os.environ` and `BZR_ENV` instead of replacing the existing (tox) environment variables such as HOME and XDG_CONFIG_HOME.
* Merge branch 'becky/artifact_log_file_option' into 'master'bst-marge-bot2019-08-293-13/+71
|\ | | | | | | | | | | | | Addition of --out option to bst artifact log Closes #1106 See merge request BuildStream/buildstream!1552
| * Addition of --out option to bst artifact log:becky/artifact_log_file_optionRebecca Grayson2019-08-293-13/+71
|/ | | | | | | | A --out option has been added, allowing an artifact log to be written to a logfile. This is particularly useful when more than one artifact's log is wanting to be read; It will write a file for each log. A test and NEWS entry have also been added.
* Merge branch 'juerg/cas' into 'master'bst-marge-bot2019-08-292-20/+3
|\ | | | | | | | | Remove code duplication in casremote.py See merge request BuildStream/buildstream!1567
| * casremote.py: Remove unused _fetch_blob() methodJürg Billeter2019-08-291-19/+0
| | | | | | | | This removes code duplication with _CASBatchRead.
| * cascache.py: Use _CASBatchRead in _ensure_blob()Jürg Billeter2019-08-291-1/+3
|/ | | | _ensure_blob() was the only caller of _fetch_blob().
* Merge branch 'tmewett/build-deps-cli' into 'master'bst-marge-bot2019-08-285-15/+21
|\ | | | | | | | | | | | | Remove build --all flag in favour of --deps all/plan Closes #1078 See merge request BuildStream/buildstream!1559
| * frontend: Remove build --all flag in favour of --deps all/plantmewett/build-deps-cliTom Mewett2019-08-285-15/+21
|/
* Merge branch 'jennis/bst_artifact_show' into 'master'bst-marge-bot2019-08-2810-4/+261
|\ | | | | | | | | Introduce `bst artifact show` See merge request BuildStream/buildstream!1560
| * NEWS: Add NEWS entry for bst artifact showjennis/bst_artifact_showJames Ennis2019-08-271-0/+5
| |
| * tests/frontend/artifact.py: Add tests for bst artifact showJames Ennis2019-08-271-1/+104
| |
| * _artifactcache.py: Add remote support to bst artifact showJames Ennis2019-08-275-0/+77
| | | | | | | | | | | | If remotes exist, each remote will be checked for the target artifacts. If an artifact is cached remotely, we make a record of this.
| * casremote.py: Remove main process assertion in init()James Ennis2019-08-271-3/+0
| | | | | | | | | | Seeing as we always call get_local_cas() in CasRemote.init() this assertion will be asserted there
| * cli.py: Introduce bst artifact showJames Ennis2019-08-274-0/+75
|/ | | | | | bst artifact show can be used to determine which element names, artifact refs (also by glob expression) are present within the artifact cache.
* Merge branch 'jennis/load_artifact_dependencies' into 'master'bst-marge-bot2019-08-279-16/+293
|\ | | | | | | | | Add the ability to load (build) deps from an artifact ref See merge request BuildStream/buildstream!1553
| * tests/frontend/artifact.py: test artifact delete with --deps optionsJames Ennis2019-08-271-0/+91
| |
| * cli.py: Implement --deps for artifact deleteJames Ennis2019-08-272-4/+8
| |
| * _stream.py: Validate selection for target artifacts in _load()James Ennis2019-08-271-3/+6
| |
| * _stream.py: Don't say we're loading elements if we're notJames Ennis2019-08-271-3/+6
| |
| * Load artifact refs the same way we load element namesJames Ennis2019-08-275-6/+102
| |
| * element.py: Add _add_build_dependency() methodJames Ennis2019-08-271-0/+10
| | | | | | | | | | | | This method explicitly adds a build dependency to an Element instance's __build_dependency list. This is required when determining the build dependencies of an artifact
| * _artifactelement.py: Add get_dependency_refs() methodJames Ennis2019-08-271-0/+15
| |
| * element.py: Add _get_artifact() methodJames Ennis2019-08-271-0/+11
| | | | | | | | | | | | | | Add a getter for Element's __artifact (Artifact object). This is required by ArtifactElement. The ArtifactElement should have access to its Artifact.
| * _artifact.py: Add get_dependency_refs() methodJames Ennis2019-08-271-0/+44
|/
* Merge branch 'bschubert/register-sources-on-test' into 'master'bst-marge-bot2019-08-2711-171/+235
|\ | | | | | | | | testing/sources: Automatically register plugin sources See merge request BuildStream/buildstream!1537
| * sourcetests/track: Don't overwrite project configurationbschubert/register-sources-on-testBenjamin Schubert2019-08-263-17/+10
| | | | | | | | | | | | | | | | We need to keep the project configuration to use the expected plugins as configured by the `kind` fixture. This adds a utility method `update_project_configuration` that allows updated part of the project.conf.