summaryrefslogtreecommitdiff
path: root/tests/sandboxes
Commit message (Collapse)AuthorAgeFilesLines
* tests/sandboxes/remote-exec-config.py: Fixed generated project to include ↵Tristan van Berkom2020-11-301-1/+3
| | | | | | | | min-version This test was broken as it was failing for the wrong reason, even though in both cases it was a missing yaml key. Fix the test to fail due to it being missing the required cert specified in the cache config.
* Drop sandbox selection and BST_FORCE_SANDBOXJürg Billeter2020-06-032-32/+2
| | | | | | | buildbox-run is the only local sandbox and there are no plans to add other sandboxing backends in the future. New platforms can be supported by new buildbox-run implementations without requiring any changes in BuildStream.
* Switch preferred sandbox from bwrap to buildbox-runJürg Billeter2020-04-283-111/+5
| | | | | This also enables local builds on non-Linux platforms, if a buildbox-run implementation is available.
* Replace format-version with min-versionTristan Van Berkom2020-04-253-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * "min-version" is specified as a <major>.<minor> point version and uses the installed BuildStream version instead of having a separate versioning number for the format. * The presence of "format-version" is now used to indicate that we might be loading a BuildStream 1 project. * For now, where parsing the version at startup is concerned, and also where `bst init` is concerned, we artificially bump the detected BuildStream version to 2.0 if we detect a version < 2.0, these exceptions can be removed once 2.0 is tagged and released. Summary of changes: _project.py: Now parse "min-version" and detect "format-version" to warn about loading a BuildStream 1 project _versions.py: Remove obsolete BST_FORMAT_VERSION numbers from here data/projectconfig.yaml: Remove old "format-version" from defaults utils.py: Added new private _parse_version() helper function, and another _get_bst_api_version() to get an adjusted API version. frontend/app.py, frontend/cli.py: Updated `bst init` implementation testing (buildstream.testing): Updated testing utilities to generate and use projects with min-version instead of format-version. tests and examples: Updated to use min-version across the board.
* sandbox: Remove unused _mounter.pyJürg Billeter2020-02-101-52/+0
|
* exceptions: Expose ErrorDomain, ErrorLoadReasonThomas Coldrick2020-01-235-5/+5
| | | | | | | Plugin tests are already accessing this API, but using imports from private modules. For motivation for this to be exposed publicly, note that ErrorDomain is an argument for most things in runcli.py, and LoadErrorReason may be another.
* Reformat code using BlackChandan Singh2019-11-146-171/+96
| | | | | | | As discussed over the mailing list, reformat code using Black. This is a one-off change to reformat all our codebase. Moving forward, we shouldn't expect such blanket reformats. Rather, we expect each change to already comply with the Black formatting style.
* tests/.../missing_dependencies: include gitAngelos Evripiotis2019-10-311-10/+16
| | | | | | | | | | | | Symlink `git` into the separate tools bin directory. BuildStream needs `git` in order to be able to determine its version. This missing dependency is revealed when you run these tests in `spawn` mode, as it will re-run the base __init__.__version__ logic in a new process. Also take the opportunity to extract _symlink_host_tools_to_dir(), to re-use some code.
* cascache.py: Start buildbox-casd and set up channelJürg Billeter2019-08-202-7/+25
|
* tests: Verify that a missing-command causes a cached failureDaniel Silverstone2019-08-141-0/+1
| | | | Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* Store Platform reference in Context instance variableJürg Billeter2019-07-172-10/+0
| | | | | This allows us to remove the platform reset helpers in tests/conftest.py.
* tests: Change all calls to _yaml.dump to _yaml.rountrip_dumpBenjamin Schubert2019-07-154-8/+8
| | | | | Now that both are equivalent, we can skip the sanitization part before the yaml call.
* test for BST_FORCE_SANDBOX and BST_FORCE_BACKENDwillsalmon/platformRefactorWilliam Salmon2019-07-127-0/+231
|
* Refactor of Platform and SandboxWilliam Salmon2019-07-121-2/+6
|
* test:utils/site: Consolidate IS_LINUX/WSL/Windows in a single siteBenjamin Schubert2019-06-061-1/+1
| | | | | | | | We currently have two sites file containing redundant information. - tests/testutils/site.py: Remove IS_{LINUX,WSL,WINDOWS} - rest: Change imports to import those from buildstream/tests/_utils/site.py
* tests/sandboxes: Enable pylint and fix problemsBenjamin Schubert2019-06-054-6/+15
| | | | | tests/sandboxes was missing an __init__.py, which meant pylint was never run there.
* plugintestutils: Rename 'plugintestutils' package to 'testing'phil/rename-plugintestutilsPhil Dawson2019-04-163-3/+3
| | | | | | | | | - Rename plugintestutils to testing. - Don't run the tests from bst-plugins-template. This imports buildstream.plugintestutils so will have to be disabled to get through CI. This can be re nabled once bst-plugins-template has been patched.
* tests: str(datafiles) instead of a longer thingAngelos Evripiotis2019-03-212-3/+3
| | | | | | | | | | | | | | | | | | | Replace some popular copypasta. This important-looking invocation: os.path.join(datafiles.dirname, datafiles.basename) is equivalent to this shorter invocation: project = str(datafiles) It seems like it's very popular copypasta, replace it with the shorter one thus: # Use 'gsed' or 'sed' etc. as appropriate for your system. git config --global alias.sub '!f() { git grep --name-only --null "$1" | gxargs --null gsed --in-place --expression "s/$1/$2/g" ; }; f' git sub 'os.path.join(datafiles.dirname, datafiles.basename)' 'str(datafiles)'
* tests: Remove unused importsremove-dead-codeBenjamin Schubert2019-03-011-1/+0
|
* tests: Remove unused parameters in functionsBenjamin Schubert2019-03-011-1/+1
| | | | | For parameters that are required as part of an API, prefix them by "_" to make it clear they are unused
* tests: Remove unused variablesBenjamin Schubert2019-03-011-1/+1
|
* Expose basic api for testing external plugins.phil/plugin-testing-apiPhil Dawson2019-02-083-3/+3
| | | | | | | | | | | | | | | | | | 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
* Move push and pull to the new artifact subcommand groupJames Ennis2019-01-221-2/+2
| | | | | This commit also ensures that if we try to use the 'old' commands, BuildStream will fail and instruct the user to use the new command.
* tests: Migrate storage test to the internals directoryTristan Van Berkom2019-01-164-59/+0
|
* _cas: Rename artifactcache folder and move that to a root moduleRaoul Hidalgo Charman2019-01-161-1/+1
| | | | | | | | | Other components will start to reply on cas modules, and not the artifact cache modules so it should be organized to reflect this. All relevant imports have been changed. Part #802
* tests/sandboxes/remote-exec-config.py: New test.Jim MacArthur2018-11-274-0/+102
| | | | | Tests that we get a sensible error message when we specify incomplete or wrong information in the configuration for remote execution.
* CasBasedDirectory: Change constructor to take a CASCache instead of a ContextRichard Maw2018-11-191-4/+3
| | | | | The Context was only used to obtain a reference to the CASCache and set the unused cas_directory field.
* Test that helpful messages are raised when missing dependenciesBenjamin Schubert2018-11-084-0/+95
| | | | | This adds a `reason` to the SandboxEror thrown in sandboxdummy to be able to understand where the error comes from
* Add basic storage test 'storage-test.py'jmac/cas_virtual_directoryJim MacArthur2018-08-154-0/+60
|
* Provide better error message on missing commandsTiago Gomes2018-07-023-0/+21
| | | | | | | Before running a command in the sandbox, check its existence and fail early if it does not. This fixes issue #289.
* tests/sandboxes/mounting/mount_simple.py: Changed to test new Mounter objectsandbox-mounts-refactorTristan Van Berkom2017-11-061-3/+3
|
* mount_simple.py: Add mount testsTristan Maat2017-09-281-0/+52