summaryrefslogtreecommitdiff
path: root/tests/sources
Commit message (Collapse)AuthorAgeFilesLines
* tests: Add a git test that project overrides workJonathan Maw2018-02-194-0/+52
|
* tests: Add tests to verify git sources obey submodule checkout configJonathan Maw2018-02-192-0/+208
|
* tests: fix erroneous comment in git testJonathan Maw2018-02-191-1/+1
|
* Add bzr testTristan Maat2018-02-073-0/+49
|
* local & patch source tests: Preflight errors now report PipelineErrorTristan Van Berkom2018-01-062-3/+3
|
* tests/sources/local.py: Adding test for staging a symlink.Tristan Van Berkom2018-01-024-0/+34
| | | | | This has remained without test coverage mostly due to upstream pytest-datafiles bug https://github.com/omarkohl/pytest-datafiles/issues/1
* tests/sources/local.py: Testing failures to create staging directoriesTristan Van Berkom2018-01-024-0/+28
| | | | | | | | Seems that local.py is an appropriate plugin to use for testing errors which originate from the abstract Source class. This test checks that we raise the appropriate error in the case that we attempt to stage to a directory that is a regular file.
* tests/sources: Use new error checking tools for source testsTristan Van Berkom2018-01-016-82/+91
| | | | | | Also added a test case for the `patch` plugin which checks for graceful failure when the specified patch file is not a regular file (but a block device or a named pipe instead).
* Adapting test cases to expect logs in stderrTristan Van Berkom2017-12-132-2/+2
| | | | And also adapted them to remove any occurrences of HAVE_ROOT.
* Remove unused imports in test filesGökçen Nurlu2017-12-072-2/+2
|
* Add a test for tar lzipValentin David2017-11-302-0/+52
|
* tests/sources/tar.py: Test for tarballs containing linksTristan Van Berkom2017-11-173-0/+43
| | | | This reproduces issue #155
* tests/sources/tar.py: Removing some unused test dataTristan Van Berkom2017-11-062-8/+0
|
* tests/sources/zip.py: Adding tests for zip source edge casesTristan Van Berkom2017-11-0613-0/+221
|
* tests/sources/fixture.py: Removing the old deprecated fixtureTristan Van Berkom2017-11-061-55/+0
|
* tests/sources/bzr.py: Removing bzr source testTristan Van Berkom2017-11-0613-238/+0
| | | | | | | | This does not test much more than the regular frontend tests against the bzr source, and was presenting difficulty to migrate to the proper new CLI fixtures. This was also the last source test using the older deprecated fixture.
* Updating all test cases for the removal of architecture conditionals and optionsTristan Van Berkom2017-11-061-2/+2
|
* tests/sources/git.py: Converted to use newer CLI fixturesTristan Van Berkom2017-11-055-373/+63
|
* tests/sources/patch.py: Converted to use CLI fixturesTristan Van Berkom2017-11-048-103/+82
|
* tests/sources/local.py: Removed some more unneeded steps in the testTristan Van Berkom2017-11-041-10/+2
|
* tests/sources/local.py: Remove one line of deadcodeTristan Van Berkom2017-11-041-1/+0
|
* Adjust tests to new APITristan Maat2017-11-041-2/+2
|
* tests/sources/local.py: Migrated test to use frontend fixturesTristan Van Berkom2017-11-043-40/+45
|
* tests/sources/tar.py: Converted tar test to use the CLI and enhancedTristan Van Berkom2017-11-0314-107/+134
| | | | | | Now test to also ensure that base-dir expressions always behave the same way regardless of whether the tarball was created with a leading '.' or not.
* tests/sources/generic.py: Removing test, no tests should ever be added hereTristan Van Berkom2017-10-224-37/+0
| | | | | | | | | New tests only via the frontend cli, never mucking about with source APIs directly, this whole directory needs to eventually be removed. This test was also testing the wrong condition, it's okay that a source stage to a non-empty directory, it's not okay that an element stages it's group of sources to a non-empty directory.
* Add warnings when staging to /buildstream/build74-prevent-artifacts-from-containing-files-in-buildstream-buildTristan Maat2017-10-194-0/+37
|
* Updated test cases for internal API changes stemming from project optionsTristan Van Berkom2017-10-101-3/+3
|
* Updating test cases to construct the project/loader properly again.Tristan Van Berkom2017-10-081-2/+1
| | | | | This had changed when we added project variants and had to split up the loading steps a bit, now all is back to normal without variants.
* Fix affected test cases24-better-validation-for-loaded-yamlTristan Maat2017-09-141-3/+3
|
* tar.py source test case: Stop using tar's private _sha256sum() methodTristan Van Berkom2017-09-121-4/+5
| | | | | That was removed anyway, now use utils.sha256sum() to calculate the expected tar ref.
* Add patch source pluginChandan Singh2017-09-0921-6/+234
| | | | Fixes #63
* tests/sources/ostree.py: Removed test and data.Tristan Van Berkom2017-09-046-193/+0
| | | | | | | | This was testing nothing whatsoever about the behavior of the plugin but just running for the sake of running. Removing this does not effect the coverage report of the ostree.py plugin.
* tests/source/git.py: Skip if git is not availableTristan Van Berkom2017-09-041-0/+12
|
* tests/sources/bzr.py: Use site.py to determine presence of bzrTristan Van Berkom2017-09-041-8/+1
|
* tests/sources/ostree.py: Removed http server testTristan Van Berkom2017-09-041-22/+0
| | | | | | | | | | | This was failing intermittently if the test suite is run multiple times (as it takes some time for the port 8000 to become available again). Further, this test case was immaterial and not testing any ostree functionality whatsoever. Presumably this was a remnant from a time when the test case attempts to fetch the payload over a local http connection.
* local source tests: Removed test case for get_unique_key()Tristan Van Berkom2017-09-011-18/+0
| | | | | | | | This somewhat arbitrarily tests what the local source generates as a unique key but is not really the requirements of a unique key. This is also subject to change and is a pain to update. Instead this is pretty much handled by the cache key test anyway.
* Fix testsTristan Maat2017-07-171-1/+1
|
* Test Cases: Updated for new Project / Loader API changesTristan Van Berkom2017-07-171-5/+7
|
* Add --host-arch and --target-arch, and 'host-arches' conditionalSam Thursfield2017-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This command adds initial cross-compilation support to BuildStream. It has been tested against a converted version of the Baserock compiler bootstrap and used to cross build sysroots for armv8l64 and ppc64l from an x86_64 host. For example, to build a sysroot for ARM v8 64-bit you can do this: bst build --target-arch=armv8b64 gnu-toolchain/stage2.bst This would cause the adapted Baserock definitions to produce a stage1 simple cross compiler that runs on the native architecture and produces armv8b64 binaries, and then cross build a stage2 sysroot that executes on armv8b64. Currently the --host-arch option does nothing of use. It will one day enable host-incompatible builds using a QEMU-powered cross sandbox. The `--arch=` option is now shorthand for `--host-arch= --target-arch=`. Elements have 2 new variables available, %{bst-host-arch} and %{bst-target-arch}. The 'arches' conditional now follows %{bst-target-arch}, while the new 'host-arches' conditional follows %{bst-host-arch}. All of --arch, --host-arch and --target-arch default to the output of `uname -a`. There's no magic here that would make all BuildStream elements suddenly able to cross compile. It is up to an individual element to support this by honouring %{bst-target-arch} in whatever way makes sense.
* test/sources/ostree.py: Fix ResourceWarning when calling subprocessSam Thursfield2017-06-221-6/+1
| | | | | | | | | | | | This switches the code from using subprocess.Popen() manually to using subprocess.call(), which achieves the same thing and also handles resource cleanup for us. I also removed an unused variable. Fixes warnings like these that the test suite was producing: tests/sources/ostree.py::test_ostree_shell_exe /home/shared/src/buildstream/tests/sources/ostree.py:79: ResourceWarning: unclosed file <_io.BufferedReader name=13> ret = run_ostree_bash_script()
* tests/sources/bzr.py: Skip bzr source tests if `bzr` program isn't foundSam Thursfield2017-06-221-0/+18
|
* Add some basic bzr testsJonathan Maw2017-05-2513-0/+227
| | | | Coverage isn't perfect, but it seems to cover most use-cases.
* Added/fixed tar source tests.Tristan Van Berkom2017-05-145-2/+35
| | | | | | | | | Fixed original staging test to expect the content of the first encountered subdirectory to be extracted/staged. Added additional test to override the base-dir configuration with an empty string and instead extract the root of the tarball directly.
* Add tests for the tar sourceJonathan Maw2017-04-1311-0/+167
|
* Add some default repo aliases to the test fixtureJonathan Maw2017-04-131-0/+4
| | | | | These repo aliases should make it possible for sources to fetch from local files (assuming they use a file:/// URL)
* Refactor: Untangling element/source namesTristan Van Berkom2017-03-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | o The metaelements and metasources now carry the name, the loader resolves source names now. o Element/Source factories dont require a name anymore as they are already in the meta objects o Pipeline no longer composes names o Element.name is now the original project relative filename, this allows plugins to identify that name in their dependencies, allowing one to express configuration which identifies elements by the same name that the user used in the dependencies. o Removed plugin._get_display_name() in favor of the plugin.name o Added Element.normal_name, for the cases where we need to have a normalized name for creating directories and log files o Updated frontend and test cases and all callers to use the new naming
* source test fixture: Create a context with a log handler.Tristan Van Berkom2017-02-251-0/+7
| | | | Log handlers are now a hard requirement for a context object.
* Remove apostrophes from grammatically incorrect instances of "it's"Paul Sherwood2017-02-111-1/+1
|
* Fixed tests for new Project() constructor argument.Tristan Van Berkom2017-02-021-1/+1
|
* ostree.py test case: Commented out another testTristan Van Berkom2017-01-191-17/+18
| | | | | Sadly the tests arent working but the plugin is, need to take time to revisit these tests.