summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* tests/artifactcache: Add pull unit-testsjmac/remote_execution_clientMartin Blanchard2018-09-071-0/+320
| | | | https://gitlab.com/BuildStream/buildstream/issues/454
* tests/artifactcache: Add push unit-testsMartin Blanchard2018-09-072-0/+330
| | | | https://gitlab.com/BuildStream/buildstream/issues/454
* tests/artifactcache: Add a simple test projectMartin Blanchard2018-09-077-0/+48
| | | | https://gitlab.com/BuildStream/buildstream/issues/454
* tests/sources/git.py: Add tests for REF_NOT_IN_TRACKtpollard/483Tom Pollard2018-09-031-0/+68
| | | | | Add tests that cover assert_ref_in_track & the configurable CoreWarnings REF_NOT_IN_TRACK warnings token.
* source.py: Added `primary` argument to URL marking APIsTristan Van Berkom2018-09-021-3/+15
| | | | | | | | | | | | | The Source must now mention whether the marked or translated URL is "primary" or not. Even when a Source may have multiple URLs, the auxilliary URLs are derived from the primary one, not only is this true for git, but it is mandated by our tracking API which assumes there is a primary URL. This adjusts the `git` source and the test `fetch_source.py` source to behave properly and advertize it's primary URL properly. This is a part of #620
* tests: Modify tests to ensure retry FAILUREJosh Smith2018-08-313-3/+3
|
* Replacing string 'bzr' with value from host toolsbzr_fixknownexus2018-08-301-5/+7
|
* Report processing errors from trackingValentin David2018-08-301-0/+34
| | | | | | Failures to write files when tracking were not reported. Fixes #533.
* tests/frontend/mirror.py: Reenable test_mirror_fetch_upstream_absent[ostree]tristan/538-reenable-ostree-testTristan Van Berkom2018-08-301-4/+0
| | | | | This test was skipped because of issue #538, but #538 was fixed and the test was still not reenabled.
* tests/plugins/filter.py: Don't run redundant testsTristan Van Berkom2018-08-301-15/+10
| | | | | | | | | There is no reason that the filter element codepaths can behave differently depending on the Source implementation used in the test, as the Source implementation does not have any filter specific virtual methods. Removing the redundant tests and just performing these tests with the git source.
* Add tests for cyclic variables checkJosh Smith2018-08-294-2/+40
| | | | | Note: This modifies the docker containers used for testing to supply the pytest-timeout package.
* Add tests that not-found objects in cache are shown as SKIPPEDbschubert/log-missed-cacheBenjamin Schubert2018-08-291-0/+19
|
* Fix E305 warningsJavier Jardón2018-08-283-0/+3
|
* tests/frontend/workspaces.py: Removing some redundant testsTristan Van Berkom2018-08-281-4/+4
| | | | | Removed redundant tests from recently merged !740, this new test does not need to run for every different source kind.
* tests/frontend/workspace.py: Add test for workspaced dependenciesValentin David2018-08-281-0/+70
| | | | This adds a regression test for #461.
* tar.py: Add test for a tarball containing a read-only dirjmac/tempfile-extraction-bugJames Ennis2018-08-241-0/+45
|
* tar tests: Add tarball which contains a read-only dirJames Ennis2018-08-242-0/+6
|
* tests/integration/project: Use the same alias for the alpine tarballTristan Van Berkom2018-08-242-2/+2
| | | | | | | | This makes the integration tests use the same 'alpine' alias for the tests as we use in the examples, this avoids a redundant download of an extra alpine tarball in integration tests. This is a part of #603
* tests/integration/source-determinism.py: Use cli_integration.valentindavid/cli_integration_source_determinismValentin David2018-08-242-7/+14
|