summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tests: Catch tests that don't shut down background threadsjuerg/forkJürg Billeter2019-09-033-0/+49
|
* testing/_forked.py: Update _MAIN_PID for tests running in subprocessesJürg Billeter2019-09-031-0/+6
| | | | | This reduces the difference between regular execution and the test environment.
* cascache.py: Remove fork_disabled mechanismJürg Billeter2019-09-031-12/+0
| | | | The fork safeguard is now handled by Context.is_fork_allowed().
* casserver.py: Remove notify_fork_disabled() callJürg Billeter2019-09-031-4/+0
| | | | The fork safeguard is now handled by Context.is_fork_allowed().
* _context.py: Remove unused disable_fork() methodJürg Billeter2019-09-031-12/+0
|
* _stream.py: Remove disable_fork() callsJürg Billeter2019-09-031-5/+0
| | | | The fork safeguard is now handled by Context.is_fork_allowed().
* scheduler.py: Use Context.is_fork_allowed()Jürg Billeter2019-09-031-1/+1
|
* _context.py: Add is_fork_allowed() methodJürg Billeter2019-09-031-0/+17
|
* _basecache.py: Add has_open_grpc_channels() methodJürg Billeter2019-09-031-0/+12
|
* cascache.py: Add has_open_grpc_channels() methodJürg Billeter2019-09-031-0/+8
|
* utils.py: Add _is_single_threaded() methodJürg Billeter2019-09-031-0/+20
| | | | | This will be used to safeguard against fork issues with multiple threads.
* tests/testutils/http_server.py: Close queue to stop background threadJürg Billeter2019-09-031-0/+2
|
* tests/artifactcache: Use context manager for gRPC channelsJürg Billeter2019-09-031-50/+50
|
* _sandboxremote.py: Use context manager for CASRemote instancesJürg Billeter2019-09-031-43/+45
|
* _sandboxremote.py: Use context manager for gRPC channelsJürg Billeter2019-09-031-28/+30
|
* _context.py: Release artifactcache and sourcecache resourcesJürg Billeter2019-09-031-0/+6
|
* _basecache.py: Add release_resources() methodJürg Billeter2019-09-031-0/+10
|
* casremote.py: Add close() method to close gRPC channelJürg Billeter2019-09-031-0/+12
| | | | Also support use as context manager.
* cascache.py: Close gRPC channel in release_resources()Jürg Billeter2019-09-031-0/+5
|
* requirements: Update grpcio to 1.23.0Jürg Billeter2019-09-031-1/+1
| | | | | I see aborts and hangs related to gRPC locks with grpcio 1.17.1. Updating grpcio to 1.23.0 fixes these issues.
* Merge branch 'chandan/mypy' into 'master'bst-marge-bot2019-09-0322-330/+567
|\ | | | | | | | | Add type hints to public API code See merge request BuildStream/buildstream!1459
| * .gitlab-ci.yml: Run mypy for validating changeschandan/mypyChandan Singh2019-09-021-0/+8
| |
| * .gitignore: Add mypy cache directoryChandan Singh2019-09-021-0/+3
| |
| * Add initial mypy configuration and typesChandan Singh2019-09-0220-329/+555
| | | | | | | | | | | | | | | | | | | | As a first step, add type hints to variables whose type `mypy` cannot infer automatically. This is the minimal set of type hints that allow running `mypy` without any arguments, and having it not fail. We currently ignore C extensions that mypy can't process directly. Later, we can look into generating stubs for such modules (potentially automatically).
| * buildstream/utils.py: Fix parameter types for calendar.timegmChandan Singh2019-09-021-1/+1
|/ | | | | `calendar.timegm()` accepts a tuple, but we were giving it a list. This was highlighted by `mypy`.
* Merge branch 'coldtom/validate-patch' into 'master'bst-marge-bot2019-09-021-0/+1
|\ | | | | | | | | plugins/sources/patch.py: Validate keys See merge request BuildStream/buildstream!1569
| * plugins/sources/patch.py: Validate keysThomas Coldrick2019-09-021-0/+1
|/ | | | | | Currently we don't validate the keys on a `patch` source, leading to nastier-looking error messages when `path` is missing. This simply makes us validate the yaml, as we do for other plugins.
* Merge branch 'tmewett/cli-defaults' into 'master'bst-marge-bot2019-09-021-35/+35
|\ | | | | | | | | | | | | cli.py: Use Click's show_default for defaults in help text Closes #1110 See merge request BuildStream/buildstream!1572
| * cli.py: Use Click's show_default for defaults in help textTom Mewett2019-09-021-35/+35
|/
* Merge branch 'becky/list_contents_long_option' into 'master'bst-marge-bot2019-09-027-22/+147
|\ | | | | | | | | | | | | Addition of --long option to list-contents Closes #773 See merge request BuildStream/buildstream!1555
| * 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.