summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add Git source test for depth=1 fetch with exact tag reftmewett/git-sourceTom Mewett2020-01-241-0/+28
|
* testing: Add functions to generate yaml filesThomas Coldrick2020-01-248-136/+95
| | | | | | | Adds functions to the `buildstream.testing` package to allow plugins to dump elements and projects on the fly. Before this plugins were just accessing the private yaml API for tests and loading/dumping directly. I also allow access to just `_yaml.load()` from testing.
* exceptions: Expose ErrorDomain, ErrorLoadReasonThomas Coldrick2020-01-2362-62/+66
| | | | | | | Plugin tests are already accessing this API, but using imports from private modules. For motivation for this to be exposed publicly, note that ErrorDomain is an argument for most things in runcli.py, and LoadErrorReason may be another.
* _frontend/cli.py: Make show() --use-buildtree respect pull semanticsTom Pollard2020-01-211-7/+27
| | | | | | | Ensure that if a buildtree isn't cached locally, it's only fetched if --pull and pull-buildtrees config are set. Also, only attempt to fetch if it's plausible that it could be pulled, with appropriate messaging based on local cached state.
* Remove "deb" surce plugin, it has beem moved to bst-plugins-experimentaljjardon/move_deb_sourceJavier Jardón2020-01-1724-202/+0
|
* element.py: Compute whether an element is cached only on `is_cached`Benjamin Schubert2020-01-161-2/+6
| | | | | | | | | | | This removes the early call to get whether sources are locally cached in `_update_source_state` by delegating it to the call of `is_cached`. Once it is cached, the element is assumed to stay that way for the duration of the pipeline, we can therefore cache the result once it is true. Also remove `Consistency.IS_CACHED`, which is not used anywhere else.
* source.py: Remove 'get_consistency' completelyBenjamin Schubert2020-01-1611-51/+17
| | | | | This is not needed now that we have 'is_resolved' and 'is_cached'. We can therefore drop all calling places and implementations of it.
* source.py: Remove the reliance on consistency to get whether a source is cachedBenjamin Schubert2020-01-168-2/+20
| | | | | | | | | | | | | | | | | This removes the need to use consistency in Sources, by asking explicitely whether the source is cached or not. This introduces a new public method on source: `is_cached` that needs implementation and that should return whether the source has a local copy or not. - On fetch, also reset whether the source was cached or set if as cached when we know it was. - Validate the cache's source after fetching it This doesn't need to be run in the scheduler's process and can be offloaded to the child, which will allow better multiprocessing
* source.py: Add a new 'is_resolved' to get whether a source is resolved.Benjamin Schubert2020-01-165-1/+16
| | | | | | | | | | | | | | | `get_consistency` is coarse grained and hard to optimize, in addition to being un-userfriendly. This adds a new `is_resolved` that has for default implementation `get_ref() is not None`, which is true for most sources in BuildStream. Sources for which this is not true can override the method to give a more accurate description. Checking for this before looking whether the source is cached can reduce the amount of work necessary in some pipeline and opens the door for more optimizations and the removal of the source state check.
* element.py: Rename '_source_cached' to '_has_all_sources_in_source_cache'Benjamin Schubert2020-01-163-11/+11
| | | | | | '_source_cached' is not explicit enough as it doesn't distinguishes between sources in their respective caches and sources in the global sourcecache.
* tests/integration/project.conf: Remove unused external pluginschandan/remove-bst-experimental-unusedChandan Singh2020-01-151-6/+0
| | | | | There are no tests that rely on these plugins anymore, so remove the corresponding declarations from project.conf.
* tox.ini: Add a external plugins environment test and run it in CIBenjamin Schubert2020-01-131-1/+14
| | | | | | | | | | | This runs two versions of the plugins: - The latest stable is not allowed failures and is run on every platform - The master version is allowed failure, and only runs on a single architecture This also adds a new entrypoint to register source tests to run against BuildStream.
* tox.ini: Remove external plugins testsBenjamin Schubert2020-01-131-84/+0
| | | | | These tests don't do anything, as they have no plugins registered at all.
* tests: Remove some ostree stuffThomas Coldrick2020-01-132-2/+0
|
* Tests: Remove bst-plugins-experimental dependencyThomas Coldrick2020-01-1313-98/+2
| | | | This stops the tests from being interlinked for BuildStream itself.
* Remove integration tests for moved pluginsThomas Coldrick2020-01-137-150/+0
|
* tests/integration/workspace.py: Relax assert for buildbox-runjuerg/batch-command-loggingJürg Billeter2020-01-131-2/+2
| | | | | When commands are batched, the failure message can't include the command group label with buildbox-run.
* _sandboxreapi.py: Improve batch command loggingJürg Billeter2020-01-132-3/+0
| | | | | | | | This adds a timed activity message to bring batch command logging for REAPI-based sandboxes in line with the default sandbox as far as possible. Thix fixes 3 xfails with buildbox-run.
* _frontend/widget.py: show_pipeline() Don't show buildable for junctionTom Pollard2020-01-091-0/+9
| | | | | Instead output "junction" in magenta for info. Also include test in format/junctions.py
* tests/artifactcache/config.py: Cast our tmpdir to a stringtlater/fix-monkeypatch-warningTristan Daniël Maat2020-01-081-1/+1
| | | | Monkeypatch is *really* scared of non-str values. Let's calm it down.
* tests: Drop chroot xfail/skipifJürg Billeter2019-12-316-12/+0
|
* _platform/platform.py: Add alias for IBM AIX 7 powerpcChandan Singh2019-12-231-2/+2
| | | | | | | | | | | * `uname -m` is unusable in case of IBM AIX 7 as it reports the serial number of the machine. As a workaround, special case it and use the reported processor identifier. * tests/format/optionos.py: Don't use AIX for unsupported architecture `AIX` is special-cased in BuildStream, so use a different system for testing unsupported architectures.
* tests/integration/shell.py: xfail for buildbox-run-userchrootJürg Billeter2019-12-171-1/+5
| | | | buildbox-run-userchroot requires a shell.
* tests/integration/script.py: xfail for buildbox-run-userchrootJürg Billeter2019-12-171-2/+15
| | | | | | | | The root directory is not allowed to be writable by userchroot. + sh -c -e echo 'I can write to root' > /test sh: can't create /test: Permission denied
* tests/integration/filter.py: xfail for buildbox-run-userchrootJürg Billeter2019-12-171-1/+5
| | | | | | | The root directory is not allowed to be writable by userchroot. + sh -e -c touch /foo touch: /foo: Permission denied
* tests/integration/compose.py: xfail for buildbox-run-userchrootJürg Billeter2019-12-171-1/+5
| | | | | | | | The root directory is not allowed to be writable by userchroot. + sh -e -c mkdir -p /tests mkdir: can't create directory '/tests': Permission denied Command 'mkdir -p /tests' failed with exitcode 1
* tests: source_determinism.py: Skip flaky test with buildbox-runJürg Billeter2019-12-171-0/+4
| | | | | The tests are flaky due to non-deterministic timestamps in the output of `ls -l`. See https://gitlab.com/BuildStream/buildstream/issues/1218
* tests/sources/git.py: Add recursive submodule testTom Mewett2019-12-131-0/+40
|
* tests: Drop buildbox xfailsJürg Billeter2019-12-1012-21/+5
|
* tests/integration/interactive_build.py: Increase timeoutJürg Billeter2019-12-101-1/+1
|
* tests/sources/tar.py: Use `utils._force_rmtree` instead of chmodTristan Maat2019-12-101-11/+3
| | | | | | | | | While this is deep in our test suite, and should therefore never create files that leak information, our code security linter complains about setting broad file permissions. We should really be using `utils._force_rmtree` here anyway, to stop duplicating code, so that's what we do.
* tests/integration/workspace.py: xfail logging for buildbox-runJürg Billeter2019-12-101-0/+1
| | | | Individual commands are not logged with command batching.
* tests/integration/messages.py: xfail logging for buildbox-runJürg Billeter2019-12-101-0/+2
| | | | Individual commands are not logged with command batching.
* tests/integration/manual.py: xfail logging for buildbox-runJürg Billeter2019-12-101-0/+1
| | | | Individual commands are not logged with command batching.
* tests/integration/interactive_build.py: xfail logging for buildbox-runJürg Billeter2019-12-101-1/+1
| | | | Logging differs with command batching.
* tests/integration/shell.py: xfail bind mount for buildbox-runJürg Billeter2019-12-101-4/+4
| | | | Bind mounting is not supported.
* tests/integration/script.py: xfail read-only-root for buildbox-runJürg Billeter2019-12-101-0/+3
| | | | The root directory can't be marked read-only with buildbox-run.
* tests/integration/script.py: Relax error message checkJürg Billeter2019-12-101-1/+1
|
* tests/integration/sandbox.py: Do not limit shm test to bwrap sandboxJürg Billeter2019-12-103-10/+43
| | | | | | The purpose of the test is to ensure POSIX shared memory objects are supported in the sandbox. On Linux this requires /dev/shm to be a tmpfs. However, this should be supported by any full featured sandbox.
* Add test for junction option interactioncoldtom/fix-junction-remotesThomas Coldrick2019-12-101-0/+47
| | | | | | Makes sure that `cache-junction-elements` and `ignore-junction-remotes` work together correctly, and that setting `ignore-junction-remotes` doesn't just remove all remote caches.
* tests/internals/cascache.py: Stop using non-posix shell featuresTristan Maat2019-12-091-4/+4
|
* Add tests for failed build in interactive modeChandan Singh2019-12-052-0/+115
|
* Add tests for interactive `bst init`Chandan Singh2019-12-052-0/+49
| | | | | Add tests for interactive `bst init` command using [pexpect](https://pexpect.readthedocs.io).
* tests: source_determinism.py: Do not use too restrictive test umasksjuerg/casd-separate-userJürg Billeter2019-12-031-2/+7
| | | | | | | | To protect the local cache of buildbox-casd from corruption without the use of FUSE, buildbox-casd has to run as a different user. Use less restrictive umasks in the source determinism tests to allow buildbox-casd to function when it is running as a separate user.
* tests/integration/filter.py: Do not use checkout --hardlinksJürg Billeter2019-12-031-1/+1
| | | | This is not necessary and doesn't work with CASD_SEPARATE_USER.
* tests/frontend/pull.py: Do not use checkout --hardlinksJürg Billeter2019-12-031-2/+2
| | | | This is not necessary and doesn't work with CASD_SEPARATE_USER.
* tests/frontend/buildcheckout.py: Cannot hardlink with CASD_SEPARATE_USERJürg Billeter2019-12-031-1/+7
| | | | | Linux does not allow hardlinks to read-only files of other users by default since Linux 3.6 (see /proc/sys/fs/protected_hardlinks).
* Remove newly unused API surfaces in CASCacheTristan Maat2019-12-033-11/+21
| | | | | | This also involves a number of changes to tests and other parts of the codebase since they were hacking about wit API that shouldn't have existed.
* Update all python dependenciesBenjamin Schubert2019-12-021-1/+1
| | | | | | | | This updates all dependencies on the project, which is mainly needed by python3.8 but can be done independentely. This also disables multiple false positive lint errors and disable a new check that we don't need.
* tests: Use pytest.raise() instead of checking for return codeBenjamin Schubert2019-12-023-8/+8
| | | | | | This gives a potentially more explicit understanding of what went wrong, and pytest can give better information about that exception than just us asserting the return code.