summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* lint: Remove unnecessary list comprehensionsBenjamin Schubert2019-12-022-2/+2
| | | | | Newer version of pylint detect when a comprehension would not be needed. Let's remove all the ones that are indeed extraneous
* tests/frontend: Refactor tests for default targetsChandan Singh2019-11-2725-255/+197
| | | | | | | | | | | | | | | `tests/frontend/buildcheckout.py` is already very crowded with all sorts of tests. Since this test is not really about testing `bst build` but rather about testing whether BuildStream can detect the default targets correctly, move it to a separate test module. At the same time, also improve the actual tests. Currently the test compares the number of sub-directories in BuildStream log directory with the number of elements. Change it such that we directly query BuildStream about what's been built rather than trying to guess. While doing so, sanitize its project directory to make it clearer what's being tested.
* tests: non-incremental RE builds for workspacesDarius Makovsky2019-11-272-0/+313
| | | | | | 1. Check that an open workspace can be built via remote-execution. 2. Changing file content should result in a full rebuild 3. Modifying a file mtime should result in a full rebuild
* compose: Allow compose elements to run integration commandsValentin David2019-11-262-0/+43
|
* tests: enable incremental workspace config testDarius Makovsky2019-11-261-5/+25
| | | | | builds no longer affect the local copy but the buildtree can be checked for the configure results
* Fix stacktraces during element loadingTristan Maat2019-11-221-9/+1
| | | | | | | | | | These were caused by unhandled errors from plugins when calling `Source.get_consistency()`. This doesn't really solve the problem, since that interface is still used un-wrapped elsewhere, but it enables removing `Element.__schedule_tracking()` and fixes a bug. Ultimately we'd like to remove `Source.get_consistency()`, so this isn't too long-term of a problem.
* Create _initialize_state() to capture an _update_state() use caseTristan Maat2019-11-181-2/+2
|
* Only run `element.__update_source_state` when necessaryTristan Maat2019-11-181-0/+1
|
* cascache.py: Use a shebang that won't fail on /bin/bash-less systemsTristan Maat2019-11-151-4/+4
| | | | | | `#!/usr/bin/env bash` should generally be used instead to avoid breaking on systems that do not *have* a `/bin/bash`. This is just a test, but rather annoying on my machine.
* Reformat code using BlackChandan Singh2019-11-14160-9143/+7086
| | | | | | | As discussed over the mailing list, reformat code using Black. This is a one-off change to reformat all our codebase. Moving forward, we shouldn't expect such blanket reformats. Rather, we expect each change to already comply with the Black formatting style.
* _sourcecache.py: Fix reporting of capabilities for the source cacheBenjamin Schubert2019-11-121-0/+54
| | | | This also adds a test to ensure we are correctly setting the cache up
* _remote: Ensure checks done in the subclasses are propagatedBenjamin Schubert2019-11-122-45/+149
| | | | | | | | | | | Currently, the `BaseRemote` would call `_check()` on the children, which states that errors should be sent back as a string. However, `BaseRemote` doesn't check the return of `_check()`. This changes the contract so that subclasses throw `RemoteError` themselves. This also fixes the `ArtifactShare` and add a test.
* tests/frontend/completions: Fix implicit string concatenationChandan Singh2019-11-121-2/+2
| | | | | | | | | | We expect `INVALID_ELEMENTS` to be a list of element names. However we are missing a comma in between the names, so they end up being concatenated into a single strings. The test passes either way (which is not ideal) because it just checks that the suggested completion is _different_ than the expected in case of errors.
* _sandboxbwrap.py: Create /dev/shm in the sandboxThomas Coldrick2019-11-113-0/+54
| | | | | | | | | | | | Creates /dev/shm as a tmpfs in the sandbox. Before now access to /dev/shm was only available by a plugin using `Sandbox.mark_directory()` or adding to `Sandbox.DEVICES`, either of which would _mount_ /dev/shm into the sandbox, allowing pollution from the host. This adds it as a tmpfs by default, which seems sensible as it is required for POSIX support. Also adds a test which makes sure that we can open a shared memory object inside the build sandbox with some (probably poor) C code.
* _remote.py: Expand user in certificates pathsBenjamin Schubert2019-11-111-0/+76
| | | | This ensures we correctly expand "~" in paths to certificates
* Remove unnecessary ignore_workspaces kwargDarius Makovsky2019-11-061-2/+16
| | | | | | Attempting to open a workspace for the same element without closing it now raises. This makes this kwarg unnecessary and tests should close workspaces between attempts to open.
* Remove `commit`ting sources inside `Source()._generate_key`Darius Makovsky2019-11-052-2/+5
| | | | | | | | `Stream.shell()` should check that the element's sources are cached before calling the shell. If the sources are not cached raise a StreamError and recommend a fetch. closes #1182
* _context.py: Improve reporting of incorrect user configbschubert/better-reporting-on-userconfigBenjamin Schubert2019-11-051-0/+25
| | | | | | This fixes a case where, in project overrides, if a user specified a scalar/sequence instead of a mapping for a given project, the user would receive an ugly stacktrace instead of an invalid format.
* tests/artifactshare: safer cleanup_on_sigterm useaevri/testutils_artifactshareAngelos Evripiotis2019-11-051-2/+2
| | | | | | | | | | | | Use the documented path [1] to `pytest_cov.embed.cleanup_on_sigterm()`, to avoid crashing on some versions. It turns out that pytest_cov v2.6.1 on my machine doesn't like the way that we were accessing cleanup_on_sigterm(). Access it in such a way that we will either get the function or an ImportError, as per the documentation. [1]: https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html
* testutils/artifactshare: don't hang on errorAngelos Evripiotis2019-11-051-28/+33
| | | | | | | | Remove a couple of cases where it's possible to make the main test process hang, waiting for something to appear on a queue. Raise a friendlier exception, earlier, if there was a problem starting the server process.