summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests/frontend/buildcheckout.py: Enable test_build_checkout_tarball_stdoutdanielsilverstone-ct/preserve-stdoutbschubert/fix-binary-output-captureDaniel Silverstone2018-10-261-2/+1
| | | | | | | With the new support for saving the stdout FDs cleanly, and binary mode capture in runcli, enable the tarball-to-stdout test. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* tests/testutils/runcli.py: Support binary-mode capture of stdoutDaniel Silverstone2018-10-261-6/+7
| | | | | | | | In order to test things which write tarballs to stdout correctly, we need to capture the binary output cleanly. This ensures we're not potentially mismatching encodings in and out. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* Fix some ruamel warnings during testsValentin David2018-10-261-2/+2
|
* tests/testutils/artifactshare.py: Fix has_artifact() to match core codeJürg Billeter2018-10-231-3/+2
| | | | Replace path separator with '-' to match Element.normal_name.
* Fix python warnings: Use collections.abc instead collectionsjjardon/warnings_collectionsJavier Jardón2018-10-181-1/+1
| | | | | | | | Since python 3.3, collections has been moved to collections.abc module. For backwards compatibility, they continue to be visible in this module through Python 3.7. Subsequently, they will be removed entirely. See https://docs.python.org/3/library/collections.html
* _loader/loader.py: Be more explanatory in CircDep exceptionDaniel Silverstone2018-10-181-0/+1
| | | | | | | | | When a circular dependency is detected, the reported error hilights only one part of the loop in question. This change ensures that the entire loop is listed so that the user has a greater chance of easily determining the correct fix. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* Change URL to the Alpine tarballValentin David2018-10-171-1/+1
|
* Fix spelling of it's and itsRichard Dale2018-10-1610-10/+10
|
* Added tests for conf-root variableWilliam Salmon2018-10-164-0/+72
| | | | For issue #512 in Gitlab.
* Add conf-root variable to buildsWilliam Salmon2018-10-161-4/+4
| | | | | | | Adding the conf-root variable makes creating out of source builds slightly easier. For issue #512 in Gitlab.
* New Integration test for workspace command-subdirWilliam Salmon2018-10-162-0/+34
| | | | | | | | Build stream was only creating command-subdir for non workspace builds this has now been fixed, and this regression test should support the feature. For issue #512 in Gitlab.
* yamlcache.py: Add YAML cache changed file testLachlan Mackenzie2018-10-151-3/+26
| | | | | * Test in same style as test_yamlcache_used * Move of project not required so removed
* yaml.py: Add yaml cache test to yaml list composition twiceLachlan Mackenzie2018-10-151-8/+9
|
* yaml.py: Add yaml cache testing to yaml list composition testLachlan Mackenzie2018-10-151-6/+10
|
* yaml.py: Add loader for yaml test files cache optionLachlan Mackenzie2018-10-151-0/+16
| | | | * Fix to CWD issue provided by Jonathan Maw
* yamlcache.py: Add yaml cache testsJonathan Maw2018-10-151-0/+119
|
* testing: Add regression test for workspace bugJosh Smith2018-10-041-1/+23
|
* tests: Add regression test for mirroring with project.refsJonathan Maw2018-10-031-0/+76
|
* Fix outside-of-project check when project path is not canonical.Valentin David2018-09-271-0/+12
| | | | | | | | | The issue happens on Silverblue where /home is a symlink to /var/home. With this element-path is something like /var/home/user/project/elements, when the project path is /home/usr/project. Comparing canonical paths solves the issue. Fixes #673
* tests: Add regression test for pushing failed buildsrichardmaw/push-failed-build-regressionRichard Maw2018-09-271-1/+1
| | | | | | This test ensures that failed builds are pushed when set to on-error=quit. Closes https://gitlab.com/BuildStream/buildstream/issues/534
* tests/sources/git.py: Add track and fetch test with and without tagJürg Billeter2018-09-271-0/+47
|
* testutils/repo/git.py: Add add_tag() methodJürg Billeter2018-09-271-0/+3
|
* tests/artifactcache/push.py: Use Context for artifact cache creationJürg Billeter2018-09-271-6/+5
|
* tests/artifactcache/pull.py: Use Context for artifact cache creationJürg Billeter2018-09-271-6/+5
|
* tests/testutils: Use Context for artifact cache creationJürg Billeter2018-09-271-2/+1
|
* tests/frontend/rebuild.py: Add strict/non-strict rebuild testjuerg/rebuildJürg Billeter2018-09-242-0/+40
| | | | | | Test rebuild that requires staging of weakly cached dependency. This is a regression test for #607.
* _stream.py: Ensure source-bundle's source directory existsChandan Singh2018-09-213-0/+55
| | | | | | | | | | | | Currently, `source-bundle` command is entirely broken as it tries to stage the sources in a directory that doesn't exist. Fix it by ensuring that we create the necessary directories before calling any methods that try to use those directories. This fix comes with a regression test to ensure that the basic use-case of `source-bundle` continues to work in future. Fixes https://gitlab.com/BuildStream/buildstream/issues/651.
* tests/artifactcache/push.py: Ignore return value of push_directoryjmac/remote_exec_checkout_fixJim MacArthur2018-09-211-2/+2
|
* cascache.py: Move push/pull messaging to cascacheJosh Smith2018-09-191-1/+1
| | | | | | | | Pulled/Pushed messages will no longer be produced from within element.py, instead they will be produced during CasCache push() and pull() appropriately. Message consistency has also been improved.
* tests.py: Test skip on pushJosh Smith2018-09-191-0/+23
| | | | | Adds a test to ensure that BuildStream alerts the user of a skipped push when the remote already has the artifact cached.
* Rework Skipped usageJosh Smith2018-09-191-1/+2
| | | | | | | | | | The SKIPPED message type is now used to indicate the end of a task which was successful without having to perform the given task. This overhauls the use of `Queue.done()` and therefore queues do not need to provide a processed/skipped return value from `done()`. Instead this is replaced with the action of raising a `SkipJob` exception from within `Queue.process()`.
* Adding test for Invalid Yamlissue-642-Invalid_project.conf_seen_as_missingknownexus2018-09-183-0/+16
|
* tests: test that integration commands can use /devRichard Maw2018-09-182-0/+19
|
* tests/artifactcache/config.py: Added test for invalid push remote configurationTristan Van Berkom2018-09-184-0/+35
| | | | | Test that we get the expected error when configuring a client-cert without client-key, or the inverse.
* tests/artifactcache/pull.py: Do not double-initialize remotesDaniel Silverstone2018-09-181-3/+0
| | | | | | | | The initialization of remotes is done by ArtifactCache.setup_remotes() and as such it was wrong for these tests to be calling CASCache.initialize_remotes() a second time. Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* tests/format/optionoverrides.py: Added test for options in element overridesTristan Van Berkom2018-09-183-0/+49
| | | | This is a regression test for issue #658
* Cachekey update helper: Document ensuring . in PYTHONPATHRichard Maw2018-09-161-1/+1
| | | | | | | | | | The current directory isn't always in the python module search path, so we have to ensure it is for the script to work. Strictly speaking, the user may already have a modified PYTHONPATH at which point PYTHONPATH=".${PYTHONPATH+:$PYTHONPATH}" is necessary, but it's probably premature to overcomplicate the documentation like that before we discover it's a problem.
* Bump Artifact VersionRichard Maw2018-09-1628-28/+28
| | | | | Since we now set PWD in the environment of builds existing builds may behave differently so must cache differently now.
* tests/artifactcache/expiry.py: Added test_never_delete_required_track()Tristan Van Berkom2018-09-141-1/+57
| | | | | | Same test as test_never_delete_required(), except that this test ensures that we never delete required artifacts when their cache keys are discovered dynamically during the build.
* testutils/element_generators.py: Changing sized element functionsTristan Van Berkom2018-09-142-18/+77
| | | | | | | | | | | | | * create_element_size() Now uses a git Repo object instead of a local source, and returns the repo. * update_element_size() Added this function which can now resize the expected output of an element generated with create_element_size(), useful to allow testing sized elements with the tracking feature.
* testutils/repo/git.py: Added modify_file() methodTristan Van Berkom2018-09-141-0/+7
| | | | | This allows one to modify a file in an existing git repo, as opposed to adding a new one.
* tests/artifactcache/expiry.py: Assert the expected errorsTristan Van Berkom2018-09-141-0/+2
| | | | | | | These tests were not checking that we fail for the expected reasons. Added `res.assert_task_error(ErrorDomain.ARTIFACT, 'cache-too-full')` where we expect to fail because the cache is too full.
* tests/artifactcache/expiry.py: Cleanup of test for required artifactsTristan Van Berkom2018-09-141-39/+23
| | | | | | | This commit renames test_never_delete_dependencies() to test_never_delete_required(), renders the test more readable by renaming some elements and reordering some statements and makes the comments more straight forward and accurate.
* Tidy relative workspace testsRichard Maw2018-09-141-17/+21
| | | | | | | | | | | | | They were moving the whole tmpdir to move the project repository. This moves the cache directories etc. as well, meaning cli.run can't find them. This was worked around by setting configure=False, but this has the side-effect of making use of the user's caches, which it should not be doing for reproducibility reasons. By changing the tempdir layout to have the project in a subdirectory we can move the project around for the relative workspace tests without losing track of the configured state directories, so we can leave configure=True and avoid touching the user's caches.
* tests: Use cli.configure for custom logging testRichard Maw2018-09-141-3/+2
| | | | | | Overriding the config with a custom config file on the command-line prevents it merging in the test-specific configuration and can permit it to attempt to initialise the user's cache.
* tests: cover builds that make socketsRichard Maw2018-09-143-0/+63
|
* Add tests for validating configuration variablesTiago Gomes2018-09-103-0/+101
|
* tests: avoid setting max-jobsTiago Gomes2018-09-101-11/+5
| | | | Setting "max-jobs" won't be allowed anymore in a following commit.
* subprocesses: Ensure PWD is set in process environmentRichard Maw2018-09-101-15/+19
| | | | | | | | | | | | | | | Naive getcwd implementations (such as in bash 4.4) can break when bind-mounts to different paths on the same filesystem are present, since the algorithm needs to know whether it's a mount-point to know whether it can trust the inode value from the readdir result or to use stat on the directory. Less naive implementations (such as in glibc) iterate again using stat in the case of not finding the directory because the inode in readdir was wrong, though a Linux-specific implementation could use name_to_handle_at. Letting the command know what directory it is in makes it unnecessary for it to call the faulty getcwd in the first place.
* tests/artifactcache/expiry.py: Fix test case expectations.Tristan Van Berkom2018-09-101-0/+19
|