summaryrefslogtreecommitdiff
path: root/tests/cachekey
Commit message (Collapse)AuthorAgeFilesLines
* Cache Keys: Update to use JSON rather than pickledanielsilverstone-ct/json-cache-keyDaniel Silverstone2019-02-1429-29/+29
| | | | | | | | This affects the cache key version (updated to 7) and introduces a dependency on `ujson` which is BSD licenced as of the version locked in `requirements.txt` Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* utils.py: Return all directories in list_relative_paths()Jürg Billeter2019-02-1314-14/+14
| | | | | | | | | | | | | | | Returning only empty directories leads to inconsistencies when computing a manifest by combining results from multiple list_relative_paths() calls as done by the compose plugin. I.e., the same directory may be empty in one dependency and non-empty in another dependency. The merged file list will still contain that directory even though it's no longer empty. This inconsistency causes problems when calculating differences between manifests. Returning all directories fixes these inconsistencies. This is a change in API behavior.
* projectconfig.yaml: Consistently include directories in split rulesJürg Billeter2019-02-1329-29/+29
| | | | | | | | | Most split rules already included the relevant directories themselves in addition to the directory contents. Add the missing bin, sbin, and libexec directories. This is required to fix tests with the following commit that changes list_relative_paths() to return all directories.
* Expose basic api for testing external plugins.phil/plugin-testing-apiPhil Dawson2019-02-082-2/+2
| | | | | | | | | | | | | | | | | | We want external plugins to be able to make use of the core testing utils. This commit exposes the basic utilities which are currently in use in bst-external plugins. If necessary, more utilities could be exposed in the future. Moves the following files from tests/testutils/ to buildstream/plugintestingutils/: o runcli.py o integration.py As part of this, this commit makes the following changes to runcli.py and integration.py: o runcli.py: Fix linting errors o runcli.py: Add user facing documentation o Integration.py: Add user facing documentation
* tests/cachekey: Test cache keys are independent of target elementsphil/cache-key-stability-testPhil Dawson2019-02-016-0/+66
|
* buildstream/data/projectconfig.yaml: Remove default strip-binariesJavier Jardón2018-12-093-3/+3
| | | | | | | | | They are too specific to be included by default Recommendation is if you are building in Linux is to use the ones begin used in the freedesktop-sdk project, for example See #645
* optionarch.py: update to use same arch names as SandboxConfigRaoul Hidalgo Charman2018-12-051-1/+1
| | | | Also update tests to be consistent with this
* _config.py: Use os and architecture settingsRaoul Hidalgo Charman2018-12-0529-29/+29
| | | | | | In element, platform asks for host os and architecture to default to when SandboxConfig is initialised. This changes element cache keys so those have been updated in the tests.
* git source plugin: Track git tags and save them to reproduce a minimum ↵Valentin David2018-12-054-1/+15
| | | | | | | | | | | | | | | shallow repository Instead of tag information being fetched which can change with time, they are tracked and saved in the projects.refs/.bst. Then we re-tag automatically the closest tag so that `git describe` works and is reproducible. This new feature is opt-in with the new `track-tags` configuration, and must be used to fix modules which are broken by our new policy of omitting the `.git/` repository when staging git sources. This fixes issue #487
* Disable cachekey tests on other architectures than x86_64Valentin David2018-11-141-1/+3
|
* Fix infinite recursion in default strip debug commandValentin David2018-11-083-3/+3
| | | | Fixes #645.
* 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.
* Fix E305 warningsJavier Jardón2018-08-282-0/+2
|
* Don't strip pathname from debug symbol filesSam Thursfield2018-08-223-3/+3
| | | | | | | | | | | | | When GDB looks for debug symbols it looks for the full path of the file inside the configured debug-file-directory. For example, if the debug-file-directory is set to a default of /usr/lib/debug, and you are debugging /usr/bin/python3, GDB will look for its debug symbols at this location: /usr/lib/debug/usr/bin/python3. BuildStream has been putting all debug files inside /usr/lib/debug under their $(basename), so in the above example GDB would fail to find any debug symbols for /usr/bin/python3 because they would be in the incorrect locatoin of /usr/lib/debug/python3.
* Add pip source pluginChandan Singh2018-08-154-1/+15
| | | | | | | | | | | `pip` source plugin can stage python packages that are either specified directly in the element definition or picked up from `requirements.txt` from previous sources. In order to support the latter use-case (which is also the primary motivation for this plugin), this plugin requires access to previous sources and hence is an example of a Source Transform source. Also, bump `BST_FORMAT_VERSION` as this patch adds a new core plugin.
* tests: Add tests for configurable warningsJosh Smith2018-08-151-2/+46
| | | | | | | | This adds multiple tests for custom plugin warnings and core warnings, providing checks for both cases which should cause warnings and errors when configured as fatal. Also adds tests for cache key calculations.
* _project.py: Add fatal-warnings configuration itemJosh Smith2018-08-1527-27/+27
| | | | | | | | | | | | | | | | | | | | This allows for users to configure fatal-warnings to be either a list of warnings. This commit deprecates the use of fail-on-overlap within project.conf, this will now use the fatal-warnings configuration item. element.py: Cache key calculation now takes into account all of the fatal-warnings tests: This modifys the tests/frontend/overlaps.py tests to support the new fatal-warnings configuration. Backwards compatibility is also tested for `fail-on-overlap` _versions.py: BST_FORMAT_VERSION bumped to 15 for fatal-warnings BST_CORE_ARTIFACT_VERSION bumpted to 5 for fatal-warnings Fixes: #526
* remote source: Add cachekey testChandan Singh2018-08-136-1/+18
| | | | | Add cachekey tests for the recently added `remote` source plugin to ensure that future changes do not break API compatibility.
* Bump BST_CORE_ARTIFACT_VERSION for deterministic source pluginsValentin David2018-08-1225-25/+25
|
* Adding caching build treesPhillip Smyth2018-07-2325-25/+25
| | | | | buildstream/element.py: Adding build tree to cache buildstream/_versions.py: Bumping BST_CORE_ARTIFACT_VERSION
* tests/cachekey: Update expected cache keys after switch to CASJürg Billeter2018-07-1725-25/+25
|
* buildstream/_versions.py: Increment BST_CORE_ARTIFACT_VERSIONTristan Van Berkom2018-04-1125-25/+25
| | | | | Now that we've restructured the artifact metadata into separate files, we need to rev the artifact version.
* element.py, source.py: Cleanup how Source cache keys are calculated.Tristan Van Berkom2018-04-1125-25/+25
| | | | | | | | Recently after a refactor we kept the Source adding workspace keys to the source keys because, now clean this up to have the workspace key added directly in the Element cache key calculation. This breaks cache keys.
* Generate unique subdirs for built elementsPhillip Smyth2018-03-264-4/+4
| | | | | | | | | | | | | Based on issue 89 (https://gitlab.com/BuildStream/buildstream/issues/89) Ensuring that elements are staged into unique subdirs while building. This patch supports that by doing the following: * Modify project config to add 2 new variables ("project-name" and "element-name") * Changed the default install-root from "/buildstream/install" to "/buildstream-install" * Update the tests to accommodate these changes * Update the expected cache keys in the tests This fixes #89
* tests/cachekey: Added test to exercise new sandbox contributions to cache keyTristan Van Berkom2018-03-254-1/+18
|
* Update expected cache keys in testsJames Ennis2018-02-286-6/+6
|
* tests/cachekey: Updating cache key test for new artifact versioncache-keys-os-archTristan Van Berkom2018-02-0724-24/+24
|
* 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.
* tests/cachekey/cachekey.py: Use new error checkingTristan Van Berkom2018-01-011-5/+1
|
* Updating cache key test for recent changes related to issue #121Tristan Van Berkom2017-11-063-2/+2
|
* Updating all test cases for the removal of architecture conditionals and optionsTristan Van Berkom2017-11-0624-24/+24
|
* Add a new zip sourcezipMathieu Bridon2017-11-036-1/+16
| | | | This is equivalent to the tar source, but for Zip archives.
* tests/cachekey: Fixing cache key test after changing default strip commandsTristan Van Berkom2017-10-232-2/+2
|
* tests/cachekey: Refactoring to now include an automatic updaterTristan Van Berkom2017-10-232-15/+78
| | | | | | | | When cache key tests fail, and when it is intentional that the keys have changed, then run ./tests/cachekey/update.py to update the keys. This is also useful whenever adding new tests.
* tests/cachekey: Fixing cache key test after modifying project.conf default ↵Tristan Van Berkom2017-10-2122-36/+22
| | | | environment
* Fix tests for other platformsTristan Maat2017-09-281-1/+3
|
* Add platform factoriesTristan Maat2017-09-2822-22/+36
|
* tests/cachekey: Adding cache key tests for new patch sourceTristan Van Berkom2017-09-099-1/+30
|
* cachekey.py: Fix broken logic of excluding testsTristan Van Berkom2017-09-041-2/+2
| | | | Skip the tests if we DONT have bzr or git, not if we DO.
* tests/cachekey/cachekey.py: Skip if not all plugins are availableTristan Van Berkom2017-09-041-0/+6
|
* tests/cachekey/cachekey.py: Use the cli runner fixture here.Tristan Van Berkom2017-09-041-15/+5
|
* tests: Adding __init__.py to some test modulesTristan Van Berkom2017-09-011-0/+0
| | | | | Seems all the test modules have one and as I recall it can cause problems when they are missing in the test dirs.
* tests/cachekey: Adding Cache Key testsTristan Van Berkom2017-09-0141-0/+340
This test should contain an entry for every element and source plugin in buildstream. Further, an entry should exist for every feature of every plugin which may effect cache key calculation. MANIFEST.in: Adding .expected files used in this test to the generated dist tarballs.