summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests/integration/shell.py: Adding tests for env var expansions in `host-files`tristan/shell-enhancementsTristan Van Berkom2018-03-061-0/+25
|
* integration tests: Refactoring for dynamic project configurationsTristan Van Berkom2018-03-064-56/+83
| | | | | | | | | | | | | | o CliIntegration.run() now takes a `project_config` option, this will be composited on top of the existing, substituted project.conf o Removing gnomesdk alias from integration tests project.conf o Using `sysroot` alias instead of `gnome7` alias o Make base-alpine.bst use the `sysroot` alias now o Removed `create_project_config()` from shell.py tests, now use the new built-in feature for this which is cleaner.
* tests/integration/shell.py: Updated shell testsTristan Van Berkom2018-03-041-32/+34
| | | | | | | | | | | o Added new test for `bst shell --mount` o Removed the test that a directory is refused in `host-files`, this is no longer a requirement o Updated names of the `host-files` mount specification members o Test the new `optional` feature of the mount specifications
* tests: Add filter element testsJonathan Maw2018-03-0114-0/+168
|
* Add a test for default and custom loggingJim MacArthur2018-03-011-0/+81
|
* Update expected cache keys in testsJames Ennis2018-02-286-6/+6
|
* tests/integration/shell.py: Added tests for host-filesTristan Van Berkom2018-02-282-0/+98
| | | | | | | | | | | | | | | | | Newly added tests: o Test that bind mounting a file works o Test that bind mounting a file into a non-existing directory works o Test that bind mounting is disabled in an isolated shell o Test that the shell still works, but a warning is printed and the mount is refused in case the specified file on the host was found to be a directory o Test that the shell still works, but a warning is printed in the case that the file specified on the host does not exist
* tests/integration/shell.py: Generate project.conf on the flyTristan Van Berkom2018-02-282-7/+28
|
* tests/frontend/workspace.py: Add cache key checks to test_buildJürg Billeter2018-02-271-0/+2
| | | | Regression test for #273
* tests/frontend/pull.py: Do not use a workspace for the non-strict testJürg Billeter2018-02-271-2/+3
| | | | | The cache status of reverse dependencies of workspaced elements cannot always be determined upfront.
* Integration tests: Removing some dead codeTristan Van Berkom2018-02-278-29/+4
| | | | | | | | | | o Removing format_files() helper in testutils o Removing imports of format_files() o Removing imports of walk_dir() where it's not used o Removing `element_path` variables that are unused
* tests/frontend/push.py: Test that we don't push stuff that we just pulledSam Thursfield2018-02-262-0/+67
|
* tests/frontend: Summarize the existing push and pull testsSam Thursfield2018-02-262-0/+27
| | | | | These tests are too long to understand at a glance so a summary is needed of each.
* tests/integration/shell.py: Added tests for inheriting environment variablesTristan Van Berkom2018-02-252-3/+44
|
* tests/integration/shell.py: Dont use shlex, use command vectorsTristan Van Berkom2018-02-251-9/+15
| | | | | | | | | Using shlex messes with the argv we want to pass to a shell, this was not working for the newly added test which passes "${var}" strings as arguments to the shell. Also, removed a redundant line to explicitly build something in the 'no_shell' test; that is taken care of by the helper.
* testutils/runcli.py: Print something helpful if BuildStream fails to exit ↵Tristan Van Berkom2018-02-251-0/+1
| | | | | | | | properly When testing a recent patch, I had missed a return of the exit code in `bst shell` resulting in the CLI exiting with `None`; this patch makes the fixture more helpful, where previously it just printed `None`
* tests/integration/base/generate-base.sh: Typo fix in commentSam Thursfield2018-02-211-1/+1
|
* tests/integration: Use a minimal custom base sysrootSam Thursfield2018-02-219-29/+83
| | | | | | | | | | | | | | | We have been using the Freedesktop SDK binaries to provide a base system to run the integration tests. This works OK but it weighs in at 985MB of content, and there is no simple way to customize it so that we only download the bits we actually need. This commit changes the tests to use a custom sysroot based on the Alpine Linux distribution. The sysroot is 155MB unpacked, and packs down to a 27MB .tar.xz. This speeds up the integration tests significantly as we greatly reduce the amount of network traffic required and the amount of data that gets copied around when creating the staging area.
* tests/integration: Do not use C++ compiler in workspace-mount testJürg Billeter2018-02-213-8/+8
| | | | | | | This means that the integration test suite no longer requires a C++ compiler, and in practice this can allow us to avoid depending on the GNU C/C++ compilers altogether and instead use the vastly smaller Tiny C Compiler.
* tests/integration: Use a simpler CMake test projectSam Thursfield2018-02-215-31/+17
| | | | | | | | | | | The 'step7' tutorial was fine, but it requires a C++ compiler to build. I have replaced it with a simpler testcase which is based on the existing amhello testcase. This means that the integration test suite no longer requires a C++ compiler, and in practice this can allow us to avoid depending on the GNU C/C++ compilers altogether and instead use the vastly smaller Tiny C Compiler.
* 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
|
* testutils: Add support for git source controlling submodule checkoutJonathan Maw2018-02-191-6/+11
|
* tests: fix erroneous comment in git testJonathan Maw2018-02-191-1/+1
|
* _yaml.py: Prevent ruamel from removing underscoresPhillip Smyth2018-02-154-18/+44
| | | | | | | | | | The ruamel parser interprets values such as 1_2_3 as numbers, ignoring the underscores. However, for `track` we need the value as a verbatim string. This change configures ruamel to parse all values as strings, leaving potential conversions to node_get() with the `expected_type` parameter. This fixes #166 and adds tests
* test: Add tests that bzr workspace initialization acts as expectedJonathan Maw2018-02-121-0/+19
|
* Add integration tests for edge cases involving symlinks and overlapsSam Thursfield2018-02-125-0/+152
|
* Add test for project-specific artifact shares with junctionsJürg Billeter2018-02-0810-0/+121
|
* Add junction testsJürg Billeter2018-02-0847-0/+435
|
* Pass Project instance to LoaderJürg Billeter2018-02-085-23/+26
| | | | Project access will be required for junctions.
* Move cli_options from Context to ProjectJürg Billeter2018-02-086-11/+11
| | | | cli_options are project-specific.
* Add workspace mount integration test175-refactor-integration-testsTristan Maat2018-02-073-0/+50
|
* Merge integration tests into general testsTristan Maat2018-02-0730-2/+903
|
* Add bzr testTristan Maat2018-02-073-0/+49
|
* Add test utilities for integration testsTristan Maat2018-02-073-25/+131
|
* runcli.py: Allow setting individual config settingsTristan Maat2018-02-071-4/+8
|
* tests/frontend/overlaps.py: Add test for runtime dependency stagingJürg Billeter2018-02-072-0/+19
| | | | This test covers #225.
* tests/cachekey: Updating cache key test for new artifact versioncache-keys-os-archTristan Van Berkom2018-02-0724-24/+24
|
* Add tests for workspace config format conversionChandan Singh2018-02-051-0/+54
|
* tests: Add overlap testsJonathan Maw2018-01-2518-15/+125
|
* tests: Move test_overlaps test filesJonathan Maw2018-01-255-4/+5
| | | | | This was done so that the files can be re-used with different project.conf.
* tests: Remove stray printing during overlap testJonathan Maw2018-01-251-1/+0
|
* tests/frontend/pull.py: Add track+pull test for non-strict build planJürg Billeter2018-01-231-0/+44
|
* tests/frontend/pull.py: Add pull test for non-strict build planJürg Billeter2018-01-231-0/+51
|
* Make artifact cache tests work in python3.4jonathan/fix-tests-python34Jonathan Maw2018-01-121-3/+3
| | | | | | | | A LocalPath was being passed into os.path.isabs, which failed when it tried to call the path's startswith method. Converting it to a string before using _yaml.dump seemed to solve the problem.
* tests: Exercise the new multiple cache supportSam Thursfield2018-01-115-132/+248
| | | | | | | | | | | This adds a new test for parsing artifact cache configuration, which calls the helper function from the 'artifactcache' module directly rather than trying to assert based on blind push and pull commands whether or not we got the complex precedence rules exactly right. This means frontend push/pull tests no longer need to be so thorough about testing precedence but they are instead expanded to assert that multiple caches work correctly.
* Add support for multiple remote cachesSam Thursfield2018-01-114-55/+47
| | | | | | | | | | | | | | | | | | | | | | This extends the 'artifacts' configuration block such that a list of `url` mappings can be given instead of a single entry. For example: artifacts: - url: http://example.com/artifacts1 - url: ssh://ostree@example.com/artifacts2 The OSTreeCache class is updated to set up multiple remotes and query remote refs from all of them. There are no automated tests for this yet. Empty URLs ('') now raise an exception. They cause breakages internally if we allow them through, and they can only occur if the user or our tests are misconfiguring things somehow. We report failure to fetch from the cache by printing a message to stderr for now. This is because BuildStream's actual logging functionality can't be used during frontend init -- see issue #168.
* tests/frontend: Assert cached state in a single lineSam Thursfield2018-01-112-16/+8
| | | | | Minor tweak to hopefully make the test cases a bit shorter and more readable, in preparation for adding more.
* tests/cachekey/cachekey.py: Manually create a symlink for our testsTristan Van Berkom2018-01-101-0/+10
| | | | | | | | This works around an inconsistent behavior with setuptools. Newer versions of setuptools fail to preserve symbolic links when creating a source distribution, meaning that tests run from the dist tarball will fail.
* tests/cachekey: Enhanced tests to consider local sources with multiple files.Tristan Van Berkom2018-01-1016-13/+16
| | | | | | | We had a cache key instability issue with local sources generating inconsistent cache keys due to iterating over their files in a random order. Tests did not catch this previously due to the local source sample only using one file to iterate over.