summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* setup.cfg: make xfail marks strict by defaulttraveltissues/strictxfailDarius Makovsky2019-10-098-16/+16
| | | | tests: remove strict kwargs from xfail marks
* tests: unmark tests passing with buildboxDarius Makovsky2019-10-092-2/+2
|
* _artifactcache.py: Don't push artifact blobs when no files are presentBenjamin Schubert2019-10-081-0/+43
| | | | | | | | | | Previously, if an artifact proto had no files at all in it, we would fail at pushing it, making BuildStream crash. When no files are part of an artifact proto, we can short-circuit the call and avoid pushing them unecessarily. - Add a test to ensure this doesn't come back.
* tests/frontend/buildcheckout.py: Create required symlinks on the flybschubert/fix-windows-symlinkBenjamin Schubert2019-10-082-1/+16
| | | | | | | | | Windows checks out symlinks as a file with content is the path of the symlink. This makes it impossible to mount the buildstream folder in a docker container and run the tests. This removes the symlink, and creates it on the fly for tests that use it, which fixes the problem.
* Defer committing workspace files to cachetraveltissues/1159Darius Makovsky2019-10-081-1/+0
| | | | | | | | | Remove XFAIL mark from test_workspace_visible and remove the explicit SourceCache.commit() in the workspace source plugin. Allow buildstream to handle the commit logic. Add handling for non-cached workspace sources in `source.Source._generate_keys()`.
* setup.cfg: Fix xdg env vars to not affect the hostbschubert/fix-xdg-temppathsBenjamin Schubert2019-10-081-0/+18
| | | | | | | | | | | | | | | | A fix was made in https://gitlab.com/BuildStream/buildstream/merge_requests/1244 in order to set xdg_* env variables inside of the test's directory to avoid importing data from the host. There was however still two problems: - When a variable was not set, it was set with a relative path, which would create a configuration for BuildStream that is invalid. - When a variable was set and running with pytest directly, we would still use the variable's value, which would be the host one. This ensure this can never happen, by not relying on the same variable's name and always overriding them.
* element.py: remove call to _source_cached()traveltissues/benchmarkDarius Makovsky2019-10-0529-28/+29
| | | | | | | Remove call to Element._source_cached() in _calculate_cache_key and do not recalculate workspace keys. tests: shell browsing of workspaces is currently broken
* element.py: remove concept of key instabilityDarius Makovsky2019-10-051-10/+35
| | | | | | | Workspace keys are determined by contained files at time of opening and are not forcibly reset tests: workspaces have keys when they're opened and are not recalculated
* cascache.py: Save casd logs in a file for retrievalBenjamin Schubert2019-10-041-0/+39
| | | | | Save all casd logs in a log file under its cas/ directory, and keep only the last 10 of them.
* cascache.py: Send message in case of unclean termination of buildbox-casdBenjamin Schubert2019-10-021-0/+63
| | | | | | | This adds messages in the various mis-termination of Buildbox-casd, to notify users that something might have gone wrong there. It also adds a few tests to validate the various behaviors.
* tests: Remove xfails from buildbox integration testsDarius Makovsky2019-09-242-6/+0
| | | | Workspace changes are now detectable when using BuildBox as the sandbox
* tests: Remove xfails from buildbox integration testsDarius Makovsky2019-09-242-2/+0
| | | | | Opening and building workspaces when buildbox is the sandbox is now supported.
* Remove workspace mounting for sandboxesDarius Makovsky2019-09-241-0/+2
| | | | | | | | Workspaces will be handled via the workspace source plugin methods. This does not currently support reflecting build artifacts in the open workspace. tests: Mark incremental workspace builds as xfail (strict)
* element.py: always check sources for cachingDarius Makovsky2019-09-2429-31/+48
| | | | | | | | | | | | | | | | | | | | | | Check that sources are cached even if they are workspaced and do not reset workspace cache data partially reverts !1470 closes #1088 element.py: remove workspaces in cache key calc Using the workspace source plugin, workspaces should now be handled like sources for the purpose of calculating element cache keys. partially reverts !1470 works towards #1073 Since the source keys are now calculated using the unique keys of the workspace source, this change will break external tracking for open workspaces. In future attempting to track an open workspace might raise a SourceError. The test is rewritten to close the workspace before tracking.
* tests: Add some missing integration markscoldtom/mark-filter-test-integrationThomas Coldrick2019-09-232-0/+6
|
* tests/testutils/artifactshare.py: Add SIGTERM handler to subprocessjuerg/artifactshareJürg Billeter2019-09-161-0/+6
| | | | | | | | pytest-cov 2.7 calls os._exit() in its SIGTERM handler, skipping cleanup, unless another SIGTERM handler was already registered. Add our own SIGTERM handler to the subprocess to ensure proper cleanup such as terminating buildbox-casd.
* tests/integration: Add test for filter elementcoldtom/filter-element-improvementsThomas Coldrick2019-09-164-4/+73
| | | | | Adds an integration test to check the `pass-integration` option for filter elements works.
* element.py: Abstract not producing artifactsThomas Coldrick2019-09-161-1/+1
| | | | | | | | Currently the stack element does not produce an artifact, and sometimes has to be treated differently because of this. It is conceivable that someone will write a plugin that must be treated similarly and doesn't produce an artifact. As a result this commit abstracts this "not producing an artifact" feature of elements.
* filter.py: Fail if parent element is a stackThomas Coldrick2019-09-163-0/+15
| | | | | | | | | | | As stack elements do not provide any artifacts, it is misleading to allow them as dependencies for filter elements. This commit makes a dependency on a stack element a failure with a descriptive error message. Additionally adds a test to make sure this works. Addresses #1104
* filter.py: Allow passing integration commandsThomas Coldrick2019-09-164-0/+44
| | | | | | | | | | | | | It is tedious to manually copy the integration commands of the parent element into a filter element, so this allows it to be done automatically. Here we modify FilterElement.integrate() to allow us to pass through the parent's integration commands, iff an option is set. Also adds a test for the new feature, but this is not as comprehensive as would be idea, as getting to the integration commands which are run is a little more difficult. Addresses #1107
* cli.py: Allow checkout to handle --deps allJames Ennis2019-09-131-3/+3
| | | | | | | | source checkout supports --deps all, so we should be consistent. Additionally, a user may want to have build deps in a potential chroot so you could rebuild any component.
* source_checkout.py: Add --compression tests for source checkoutJames Ennis2019-09-121-0/+34
|
* source_checkout.py: Add test for --tar/--directory conflictJames Ennis2019-09-121-0/+17
|
* cli.py: Make source checkout more consistent with artifact checkoutJames Ennis2019-09-122-16/+27
| | | | | | | | | | | | This MR changes the behaviour of source checkout so that it is more like artifact checkout. That is, a --directory option can be provided, rather than a mandatory LOCATION. In addition to this, the --tar option is no longer a boolean flag, rather it expects a tarfile name (just like artifact checkout) The appropriate tests have also been altered so that they support the new API
* source_checkout.py: Remove commented out touch() and add commentJames Ennis2019-09-121-1/+1
| | | | | | In "test_source_checkout_force()" we had a commented out line of code. This has been removed and a more useful comment has been added.
* Use distutils plugin from bst-plugins-experimentalJavier Jardón2019-09-122-0/+2
|
* Fail if we try to build a BST_FORMAT_VERSION we do not support anymorejjardon/BST_FORMAT_VERSIONJavier Jardón2019-09-122-2/+2
| | | | | bst-1.x support BST_FORMAT_VERSION == 17, as that is not supported by master I think is ok to set BST_FORMAT_VERSION_MIN = 18
* 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