summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* tests/remoteexecution/partial.py: Test building all dependenciesbuild-all-optionRaoul Hidalgo Charman2019-09-121-2/+12
|
* tests/artifactcache/expiry.py: Add test for cache usage monitorjuerg/cache-usageJürg Billeter2019-09-101-0/+33
|
* Add tests/frontend/large_directory.pyJürg Billeter2019-09-102-0/+90
|
* Change unfitting function nameTristan Maat2019-09-0610-20/+20
|
* Allow splitting artifact cachesTristan Maat2019-09-067-46/+272
| | | | | | | This is now split into storage/index remotes, where the former is expected to be a CASRemote and the latter a BuildStream-specific remote with the extensions required to store BuildStream artifact protos.
* Remove cache-specifc spec classesTristan Maat2019-09-061-7/+8
| | | | This was almost entirely just historical code duplication.
* buildcheckout.py: Add tests which checkout artifact depsjennis/update_checkoutJames Ennis2019-09-051-0/+37
| | | | | | These tests ensure that we can checkout the build dependencies of an artifact and that if we try to checkout the runtime dependencies the command will fail.
* cli.py: Allow checkout to handle artifact refsJames Ennis2019-09-051-1/+1
|
* _stream.py: Remove separate handling of ArtifactElementsJames Ennis2019-09-051-1/+1
| | | | | | | | | | | ArtifactElement inherits Element, both have an Artifact object as a member, thus we should not need to handle these separately. This change has resulted in introducing a configure_sandbox() method in ArtifactElement. The method is similar to BuildElement.configure_sandbox() but does not configure the sandbox to actually be used for building.
* tests/workspaces: Test edge case when linking files to RO directoryShahwat Dalal2019-09-051-0/+14
| | | | | | | When we open a workspace, we are linking the sources to the directory specified. As such testing that we are able to open a workspace on a read-only directory should show that we are able to link files to a RO directory when we are staging complex sources (eg. Docker source).
* tests/tar: Add test for unreadable and unwritable content tar sourceShahwat Dalal2019-09-052-3/+5
| | | | | This test was added to consider the edge case when a unreadable file is being added to CAS.
* cli.py: Allow pull to handle artifact refsJames Ennis2019-09-051-0/+42
| | | | | This patch adds support for the handling of artifact refs in bst artifact pull. A test for this has also been added.
* _project.py: Don't only load cached artifactsJames Ennis2019-09-051-1/+1
| | | | | | | | Previously, before loading artifact refs (ArtifactElements) we were checking that they were cached before loading them. This obviously becomes a problem when we want to try and pull an artifact. This patch removes the check for cached artifacts as we should still be able to contruct an ArtifactElement regardless of whether it is cached or not.
* cli.py: Allow push to handle artifact refsJames Ennis2019-09-051-0/+102
| | | | | | | | This patch extends support for bst artifact push so that is now able to handle artifact refs. If --deps all is selected and a ref is given, BuildStream will error.
* tests: Add autouse fixture to reset global state in node.pyxjuerg/synthetic-file-indexJürg Billeter2019-09-041-1/+1
|
* tests/testutils/http_server.py: Drop queue to avoid lingering threadjuerg/http-test-serverJürg Billeter2019-09-031-10/+1
| | | | | | | | | | Some CI jobs still sporadically encounter a thread that wasn't cleaned up in tests that use the HTTP server, despite calling Queue.close() and Queue.join_thread(). As a simple SIGTERM signal should suffice to properly terminate the HTTP server child process, this simply removes the queue and also the extra thread for serving requests.
* tests: Catch tests that don't shut down background threadsjuerg/forkJürg Billeter2019-09-031-0/+1
|
* 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
|
* Addition of --long option to list-contents:becky/list_contents_long_optionRebecca Grayson2019-09-021-0/+42
| | | | | | | | | --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
* 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.
* tests/format/dependencies.py: Test errors when explicitly setting strict to Truetristan/strict-rebuildTristan Van Berkom2019-08-312-0/+17
|
* 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
|
* 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.
* tests: Implement and register in_subprocess pytest markTom Mewett2019-08-301-0/+22
|
* 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.
* 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.
* 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.
* Addition of --out option to bst artifact log:becky/artifact_log_file_optionRebecca Grayson2019-08-291-2/+33
| | | | | | | | 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.
* frontend: Remove build --all flag in favour of --deps all/plantmewett/build-deps-cliTom Mewett2019-08-282-2/+3
|
* tests/frontend/artifact.py: Add tests for bst artifact showJames Ennis2019-08-271-1/+104
|
* cli.py: Introduce bst artifact showJames Ennis2019-08-271-0/+1
| | | | | | bst artifact show can be used to determine which element names, artifact refs (also by glob expression) are present within the artifact cache.
* tests/frontend/artifact.py: test artifact delete with --deps optionsJames Ennis2019-08-271-0/+91
|
* Load artifact refs the same way we load element namesJames Ennis2019-08-271-4/+4
|
* testing/sources: Automatically register plugin sourcesBenjamin Schubert2019-08-261-4/+4
| | | | | This fixes a bug where third party plugins cannot get tested automatically because they are not part of BuildStream.
* casserver.py: Use quota instead of headroomJürg Billeter2019-08-202-55/+15
|
* tests/artifactcache/expiry.py: Fix test_cleanup_firstJürg Billeter2019-08-201-14/+0
| | | | | | | Remove check for order of events as cache cleanup is now handled by buildbox-casd, not BuildStream scheduler jobs. The test still verifies that build succeeds when the cache disk usage is larger than the configured quota.
* tests/artifactcache/expiry.py: Fix test_never_delete_requiredJürg Billeter2019-08-201-17/+5
| | | | | | buildbox-casd checks disk usage against the quota before actually committing a new blob to the local cache and thus, the disk usage will never outgrow the quota.
* tests/artifactcache/expiry.py: Limit to single fetcherJürg Billeter2019-08-201-0/+2
| | | | | Parallel fetching leads to sporadic test failures due to scheduling differences.
* _context.py: Pass cache quota to CASCacheJürg Billeter2019-08-201-5/+0
|
* tests/artifactcache/artifactservice.py: Enable write access via casdJürg Billeter2019-08-201-1/+1
|
* tests/testutils/artifactshare.py: Allow write access via casdJürg Billeter2019-08-201-4/+8
|
* cascache.py: Start buildbox-casd and set up channelJürg Billeter2019-08-204-11/+38
|
* tests/internals/storage_vdir_import.py: Terminate casd at end of testJürg Billeter2019-08-201-128/+150
|
* tests/internals/storage.py: Use context manager for casd terminationJürg Billeter2019-08-201-16/+19
|
* tests/testutils/artifactshare.py: Call CASCache.release_resources()Jürg Billeter2019-08-201-0/+2
|
* casserver.py: Call CASCache.release_resources() on exitJürg Billeter2019-08-201-11/+11
| | | | | Install a signal handler to execute cleanup also on SIGTERM. This will be used to terminate the buildbox-casd child process.