summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests/format/optionarch.py: Add tests for architecture aliasesJürg Billeter2019-01-105-0/+81
|
* tests/frontend/buildcheckout.py: Fix bad filename issue for WindowsChandan Singh2019-01-033-5/+24
| | | | | | | | | | | | | | | | | | | | | In BuildStream/buildstream!1028, we added a test specifically to test that BuildStream correctly raises an warning when the name of an element contains characters that are invalid on Windows. Unfortunately, we didn't see it coming that it would make it impossible to checkout this branch on Windows. Fix it by generating this file, only if we are not running on Windows. * tests/testutils/site.py: Add `IS_WINDOWS` check * tests/frontend/buildcheckout.py: Generate file with invalid filename on the fly * Remove tests/frontend/project/elements/invalid-chars. Fixes #842. Note that this may still cause issues on WSL when running tests on a shared filesystem, but that seems to be a generic issue on WSL with `os.rename`.
* Use pycodestyle instead of pep8Javier Jardón2019-01-021-1/+1
| | | | | | | | pep8 package was renamed to pycodestyle to reduce confusion. Disabled warnings: W504 - Line break after binary operator (seems people like this) W605 - Invalid escape sequence (some of our regexes use these)
* tests/buildcheckout.py: Add tests for invalid chars in filenameChandan Singh2018-12-314-0/+27
|
* tests/loader/junctions.py: Test the error we expect when a cross junction ↵Tristan Van Berkom2018-12-312-1/+23
| | | | element is not found
* tests/loader/junctions.py: Use Result checking APIs instead of manuallyTristan Van Berkom2018-12-311-39/+24
| | | | Better to use the same API everywhere for thecking CLI results.
* tests/sources/tar.py: Test that we don't crash when HOME is unsetTristan Van Berkom2018-12-261-0/+16
| | | | | This happens when the netrc module is searching for a ~/.netrc file and it doesnt find any HOME set.
* tests/testutils/runcli.py: Fixed broken environment handlingTristan Van Berkom2018-12-261-2/+5
| | | | | Treat None values in the passed dictionary as keys to be removed from the environment, this was already happening at restoration time.
* tests/frontend/logging.py: Fix regex Deprecation WarningChandan Singh2018-12-201-2/+2
| | | | | | | | | | | | | | | | | Use raw strings for regex searches, which is the preferred way to do regular expressions in Python. Without this patch, currently we get the following warnings: ``` tests/frontend/logging.py:44 /builds/BuildStream/buildstream/dist/buildstream/tests/frontend/logging.py:44: DeprecationWarning: invalid escape sequence \[ m = re.search("\[\d\d:\d\d:\d\d\]\[\]\[\] SUCCESS Checking sources", result.stderr) tests/frontend/logging.py:80 /builds/BuildStream/buildstream/dist/buildstream/tests/frontend/logging.py:80: DeprecationWarning: invalid escape sequence \d m = re.search("\d\d:\d\d:\d\d,\d\d:\d\d:\d\d.\d{6},\d\d:\d\d:\d\d,,,SUCCESS,Checking sources", result.stderr) ```
* tests/sources: Test that fetch() is not called for cached sourcesJürg Billeter2018-12-204-0/+98
|
* Basic options for shell --build to use buildtreesWilliam Salmon2018-12-192-5/+133
| | | | Fixes issue #740
* Introduce new "source" command groupChandan Singh2018-12-1424-152/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following the message thread https://mail.gnome.org/archives/buildstream-list/2018-November/msg00106.html, implement a new command group called `source`. Move existing `track`, `fetch`, and the recently added `source-checkout` commands under this group. For `track` and `fetch`, this is a BREAKING change, as the old commands have been marked as obsolete. Using them will result in an error message that refers people to use the new versions, like `bst source fetch` instead of old `bst fetch`. `source-checkout` will now become `source checkout` (the dash has turned into a space), and is not a breaking change as it was added in the current development cycle. Note that the functionality to hide commands from help output was added only recently in Click, so the minimum version of Click that we now require is 7.0. Summary of changes: * _frontend/cli.py: Add `source` command group, mark previous versions as obsolete and hide them from the help output. * _frontend/complete.py: Fix completion for hidden commands. * setup.py: Bump Click minimum version to 7.0. * tests: Update to cope with the new command names. Fixes #814.
* Mock storage space checks for tests.BenjaminSchubert/fix-quota-testsBenjamin Schubert2018-12-133-53/+43
| | | | | | | | | | | Fix #530 - Extract free space computation in a function for easier mocking - Mock space computation during cache quota tests - Mock cache size during cachque quota tests - Add two more tests when the configuration would require to much storage space
* tests: Add tests for artifact group commandsRichard Maw2018-12-121-0/+68
|
* cli: Add artifact command groupRichard Maw2018-12-121-0/+1
|
* Remove source bundle commandPhil Dawson2018-12-123-50/+0
| | | | This is part of the work towards #672
* Add option to source-checkout command to generate build scriptsPhil Dawson2018-12-121-0/+35
|
* Add --force / -f option to source-checkout commandPhil Dawson2018-12-121-0/+17
|
* Add --tar option to source-checkout commandPhil Dawson2018-12-121-0/+18
| | | | This commit is part of the work towards #672
* tests: Add tests for guessing element namesJonathan Maw2018-12-113-25/+61
| | | | This is a part of #222
* tests: Test bst commands from an external workspaceJonathan Maw2018-12-113-5/+188
| | | | This is a part of #222
* Force updating tags when fetching git repositoryvalentindavid/git_force_fetch_tagsValentin David2018-12-112-1/+102
| | | | | | | | | When using aliases there are multiple remotes used in the cache repository. When fetching, tags are not updated if the were previously fetched from a different remote. Commits that not in a branch and only tagged do not get fetched if the tag is not fetched. Fixes #812
* buildstream/data/projectconfig.yaml: Remove default strip-binariesJavier Jardón2018-12-099-47/+23
| | | | | | | | | They are too specific to be included by default Recommendation is if you are building in Linux is to use the ones begin used in the freedesktop-sdk project, for example See #645
* tests/format/project.py: Added new regression test for empty dependency ↵Tristan Van Berkom2018-12-073-0/+11
| | | | | | dictionaries This adds a regression test for issue #803
* Fix bst source-checkout not working with open workspacesJonathan Maw2018-12-061-1/+8
|
* tests/sources/git.py: Test invalid submodules warning appearing after trackTristan Van Berkom2018-12-061-0/+61
|
* tests/sources/git.py: Test unlisted submodules warning appearing after trackTristan Van Berkom2018-12-061-0/+63
|
* tests/sources/git.py: Testing the git:invalid-submodule warningTristan Van Berkom2018-12-061-0/+71
| | | | | | | | | | | | | | | o Test that it is not triggered in show before fetch, because we don't know the submodules yet so we cannot know if they are valid or not. o Test that it is triggered by a fetch command o Test that it is triggered by `show` after having completed a fetch command, since now we have the repository and know which specified submodules are invalid o Test all of this under warning or error conditions (parameterized for fatal-warnings)
* tests/sources/git.py: Testing the git:unlisted-submodule warningTristan Van Berkom2018-12-061-0/+73
| | | | | | | | | | | | | | o Test that it is not triggered in show before fetch, because we don't know about the unlisted submodules yet o Test that it is triggered by a fetch command o Test that it is triggered by `show` after having completed a fetch command, since now we have the repository and know about the unlisted submodule o Test all of this under warning or error conditions (parameterized for fatal-warnings)
* tests/testutils/repo/git.py: Adding remove_path() helperTristan Van Berkom2018-12-061-0/+6
| | | | | A function for removing paths from a git repo, can also be used to remove submodules.
* tests/sources/git.py: Refactor ref-not-in-track test to use parameterizationTristan Van Berkom2018-12-061-41/+17
| | | | | Instead of duplicating the whole test body, run it twice while checking for a warning or an error depending on the parameter.
* optionos.py: Add tests for OptionOSRaoul Hidalgo Charman2018-12-053-0/+99
| | | | Same format as OptionArch tests, but with OS's.
* optionarch.py: update to use same arch names as SandboxConfigRaoul Hidalgo Charman2018-12-0515-36/+37
| | | | Also update tests to be consistent with this
* _config.py: Use os and architecture settingsRaoul Hidalgo Charman2018-12-0529-29/+29
| | | | | | In element, platform asks for host os and architecture to default to when SandboxConfig is initialised. This changes element cache keys so those have been updated in the tests.
* git source plugin: Track git tags and save them to reproduce a minimum ↵Valentin David2018-12-056-1/+182
| | | | | | | | | | | | | | | shallow repository Instead of tag information being fetched which can change with time, they are tracked and saved in the projects.refs/.bst. Then we re-tag automatically the closest tag so that `git describe` works and is reproducible. This new feature is opt-in with the new `track-tags` configuration, and must be used to fix modules which are broken by our new policy of omitting the `.git/` repository when staging git sources. This fixes issue #487
* tests/loader/junctions.py: Test that we can build a junction that is ↵jonathan/fix-identical-elementJames Ennis2018-12-0317-0/+69
| | | | | | | referred differently, twice. Test required to close #795 - We should be able to build a project which refers to the same junction twice, but with two different filenames.
* Add `--deps build` option to `bst checkout`Chandan Singh2018-12-031-2/+12
| | | | | | | | | | | | | | | As discussed in https://mail.gnome.org/archives/buildstream-list/2018-September/msg00064.html, add `--deps build` option to `bst checkout`. This will allow users to checkout the all build dependencies of a given element using a single command. - _frontend/cli.py: Add `--deps build` option for `bst checkout`. - element.py: Support `deps='build'` in Element._prepare_sandbox(). - tests/frontend/buildcheckout.py: Ensure `--deps build` works as expected.
* Ensure `--deps=none` option works for `bst checkout`Chandan Singh2018-12-031-12/+8
| | | | | | | | | | | | | | Currently, `bst checkout --deps none` command always produces empty output. Fix this issue and add regression test for the same. - element_enums.py: Add Scope.NONE. - element.py: Ensure Scope.NONE works correctly in addition to Scope.RUN/Scope.ALL in Element.dependencies() and Element.search(). - tests/frontend/buildcheckout.py: Fix tests for `--deps none`. Fixes #670.
* Added tests for .bst suffix and completionsPhillip Smyth2018-11-307-6/+91
| | | | | | | | buildcheckout.py: Add mandatory .bst suffix tests completions.py: Add test for fail on invalid suffix Added required files for testing integration/source-determinism.py: renamed test elements to end with .bst loader/__init__.py: initialised context properly with load and a message handler
* _stream.py: Ability to pull missing buildtrees outside of pull/buildTom Pollard2018-11-301-1/+28
| | | | | | | | | | | | | | | | | | Adds helper function _buildtree_pull_required() to determine if a pullqueue should be constructed, for commands outside of bst pull and build where it is determined that an element's buildtree artifact is to be required given the respective semantics and config. Utilised in push() to attempt to mitigate skipping the push of partial elements without the user having to have preceded it with an explicit pull. cli.py: Add new behaviour to push command description element.py: Move _cached_buildtree() to be non local private method, use _KeyStrength types to reduce duplication. tests/integration/pullbuildtrees.py also updated to cover this use-case.
* Add support for .netrc in remote/tar/zip pluginsValentin David2018-11-296-0/+349
| | | | Fixes #723.
* Cleanup cache in cas server more agressivelyValentin David2018-11-282-4/+21
| | | | | When there is less than 2GB left, it cleans up have 10GB available. These values are configurable.
* Update mtimes of objects for requested references.Valentin David2018-11-281-0/+9
| | | | | This also remove references when some objects are missing. This is in preparation for the move from reference to object garbage collection.
* tests/sandboxes/remote-exec-config.py: New test.Jim MacArthur2018-11-274-0/+102
| | | | | Tests that we get a sensible error message when we specify incomplete or wrong information in the configuration for remote execution.
* buildelement.py: Support batching for integration and build commandsJürg Billeter2018-11-271-1/+1
|
* tests/integration/manual.py: Add test for command loggingJürg Billeter2018-11-271-0/+25
|
* tests: Avoid hangs due to exceptions in subprocessesJim MacArthur2018-11-273-27/+55
|
* Workspace CLI updateWilliam Salmon2018-11-218-22/+156
| | | | | | | This is to update the workspace CLI to as agreed on the mailing list https://mail.gnome.org/archives/buildstream-list/2018-September/msg00046.html This patch also introduces the default workspace directory.
* tests/frontend/workspace.py: Refactor support functionWilliam Salmon2018-11-211-51/+105
| | | | | The Refactor now makes it possible to test for the forth coming multi element workspace open commands and to test for failure.
* tests/plugin/pipeline.py: Avoid using host user conftpollard/pipelinehostconfigTom Pollard2018-11-211-1/+1
| | | | | | create_pipeline was passing no config parameter to context.load, leading to _context.py loading in the host's buildstream user conf when running tests locally, potentially leading to unwanted errors.