summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: Migrate protected variable handling tests to tests/format/variables.pyTristan Van Berkom2019-01-164-102/+89
|
* tests: Removing tests/pipeline/load.pyTristan Van Berkom2019-01-163-26/+0
| | | | | | The remaining test simply loads a project with one element and asserts a value on it. This is already sufficiently tested in tests/format/project.py.
* tests: Renaming some tests in tests/format/project.pyTristan Van Berkom2019-01-161-5/+5
| | | | Remove some redundancy from the test lines.
* tests: Migrate preflight error handling check to tests/format/project.pyTristan Van Berkom2019-01-166-19/+7
| | | | | | This is where other load time related plugin error handling is checked, and is the last thing to remove in the `tests/pipeline` directory.
* tests: Migrate test for load_ref() unsupporting plugins into format/project.pyTristan Van Berkom2019-01-165-32/+32
| | | | | | | The tests/format/project.py test already has some tests about how we error gracefully for bad plugins and bad plugin configurations, lets put it there rather than tests/pipeline/load.py which we will remove.
* tests: Migrate dependency order/iteration testing to the format testsTristan Van Berkom2019-01-1630-107/+108
| | | | | | Created new `tests/format/iteration.py` which tests the order in which elements are iterated over in various scopes in a loaded data model.
* tests: Migrate dependencies test to tests/formatTristan Van Berkom2019-01-1625-292/+168
| | | | This used to be an internal test, converted this to use the `cli` fixture.
* tests: Migrate internal Loader basic test to internals directoryTristan Van Berkom2019-01-167-2/+15
|
* tests: Rename `plugins` directory to `elements` directoryTristan Van Berkom2019-01-1618-0/+0
| | | | | | Now that the remaining test "filter.py" in the plugins directory tests a specific element, it makes sense to create a place for testing elements, just like we do for sources.
* tests: Removing tests/plugins/third_party.pyTristan Van Berkom2019-01-165-79/+0
| | | | | | This tests exactly the same thing that is tested in tests/internals/pluginfactory.py (the new location of tests/plugins/basics.py).
* tests: Migrate plugin loading test to internals directoryTristan Van Berkom2019-01-1617-1/+1
|
* tests: Migrate plugin factory test to internals directoryTristan Van Berkom2019-01-1621-1/+1
|
* tests: Migrate context test into the internals directoryTristan Van Berkom2019-01-165-1/+1
|
* tests: Migrate utils tests into internals directoryTristan Van Berkom2019-01-164-0/+0
|
* tests: Migrate yaml test to the internals directoryTristan Van Berkom2019-01-1614-1/+1
|
* tests: Migrate storage test to the internals directoryTristan Van Berkom2019-01-164-1/+1
|
* tests: Migrate virtual directory storage test to internals directoryTristan Van Berkom2019-01-161-0/+0
| | | | Grouping bits of internal testing together here
* tests: Migrate `--except` testing to tests/frontend/show.pyTristan Van Berkom2019-01-1615-88/+86
| | | | | | | | | The tests/pipeline directory will be removed, and this test is the better of the two but also redundant with the one in tests/frontend/show. Renamed existing test in show.py to `test_show_except_simple` and added the better test as `test_show_except` below it.
* tests: Migrate completions test to tests/frontendTristan Van Berkom2019-01-1624-1/+4
|
* tests/frontend/order.py: Enable the test for build and fix the fetch testsTristan Van Berkom2019-01-161-18/+19
| | | | | | With the scheduler changes, fetch jobs get automatically skipped so the output is changed, using a separate repo for each element fixes the test such that every fetch job gets a job launched.
* conftest.py: Use different artifact directory for integration testsTristan Van Berkom2019-01-162-4/+4
| | | | | | | | To ensure we can run integration tests in parallel, use a tempdir for the artifact cache of each separate integration test run. This makes it possible to run multiple full test runs including integration tests in parallel under detox.
* source-determinism.py integration test: Dont use integration_cache fixtureTristan Van Berkom2019-01-161-1/+1
| | | | This was just deadcode, it's not really used here.
* _cas: Rename artifactcache folder and move that to a root moduleRaoul Hidalgo Charman2019-01-166-9/+8
| | | | | | | | | Other components will start to reply on cas modules, and not the artifact cache modules so it should be organized to reflect this. All relevant imports have been changed. Part #802
* buildstream/_gitsourcebase.py: Fix case where HEAD is taggedValentin David2019-01-161-0/+111
| | | | | `git rev-list --boundary HEAD..HEAD` does not return any boundary. So in this case we need to manually tag the HEAD as a boundary.
* buildstream/_gitsourcebase.py: Reduce git history for git describe.Valentin David2019-01-161-0/+78
| | | | | | | | | | | | Found during #833. `git rev-list --boundary tag..HEAD` unfortunately gives boundaries that are deeper than should when there is a merge commit between `tag` and `HEAD`. The common ancestory of the two parents of the merge is a boundary instead of the parent of the branch that is not traversed. `--ancestry-path` fixes this issue by restricting `git` traversing those branches.
* completions.py: Add a test for our artifact ref autocompletionsjennis/add_artifacts_completionJames Ennis2019-01-141-0/+41
| | | | | | | Since the artifact subcommand group has been created, we have been able to tab complete both element names and artifact refs as arguments to the artifact subcommands (e.g. bst artifact log), this commit adds a test for this.
* tests/frontend/order.py: Adding tests ensuring stable element processing orderTristan Van Berkom2019-01-101-0/+109
| | | | | | | | | | | | | For each sample project and expected result order, this test ensures that: * bst show --deps plan: Always shows the expected build order. * bst source fetch: Always executes in the expected build order. * bst build: Always builds in the expected order (disabled). The build part of the test is currently disabled as the scheduler seems to be messing with the order even in a `--builders 1` scenario.
* testutils/runcli.py: Added Result.get_start_order()Tristan Van Berkom2019-01-101-0/+17
| | | | | Added a function to report the list of elements which appeared in a given queue in the order of their first appearance.
* 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