summaryrefslogtreecommitdiff
path: root/src/buildstream/testing
Commit message (Collapse)AuthorAgeFilesLines
* tests: source_determinism.py: Skip flaky test with buildbox-runJürg Billeter2019-12-171-0/+4
| | | | | The tests are flaky due to non-deterministic timestamps in the output of `ls -l`. See https://gitlab.com/BuildStream/buildstream/issues/1218
* testing/_utils/site.py: Add BUILDBOX_RUN variableJürg Billeter2019-12-171-0/+9
|
* testing/runcli.py: Add BST_CAS_STAGING_ROOT environment variableJürg Billeter2019-12-171-0/+7
| | | | | This is required for testing with userchroot to create staging directories in a system-specific prefix.
* tests: Drop buildbox xfailsJürg Billeter2019-12-102-7/+0
|
* testing/runcli.py: Remove unused configure parameter from run() methodsJürg Billeter2019-12-051-34/+5
|
* tests: source_determinism.py: Do not use too restrictive test umasksjuerg/casd-separate-userJürg Billeter2019-12-031-2/+7
| | | | | | | | To protect the local cache of buildbox-casd from corruption without the use of FUSE, buildbox-casd has to run as a different user. Use less restrictive umasks in the source determinism tests to allow buildbox-casd to function when it is running as a separate user.
* testing/_utils/site.py: Add CASD_SEPARATE_USER variableJürg Billeter2019-12-031-0/+5
| | | | | This is set to True if buildbox-casd is installed with the set-uid bit and thus, indicates whether buildbox-casd is running as a separate user.
* Update all python dependenciesBenjamin Schubert2019-12-021-1/+1
| | | | | | | | This updates all dependencies on the project, which is mainly needed by python3.8 but can be done independentely. This also disables multiple false positive lint errors and disable a new check that we don't need.
* tests: Allow strict contents in assert_containsDarius Makovsky2019-11-271-3/+17
|
* _stream.py: Remove dead code and comments about trackingBenjamin Schubert2019-11-251-18/+11
| | | | | We don't have many of the `--track` options anymore, so we can remove handling for them in parts of the code that don't need it.
* testing/integration.py: Respect umask for the integration cacheTristan Maat2019-11-251-0/+4
|
* Reformat code using BlackChandan Singh2019-11-1415-792/+578
| | | | | | | 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.
* testing/runcli: node._reset_global_state on runAngelos Evripiotis2019-10-291-1/+10
| | | | | Clear up some errors when running tests with `BST_FORCE_START_METHOD=spawn`.
* tests: remove mark.in_subprocessAngelos Evripiotis2019-10-221-100/+0
| | | | | It seems we don't need this anymore, thanks to cleaning up gRPC background threads.
* testing/.../site: windows-friendly HAVE_OLD_GITaevri/oldgitAngelos Evripiotis2019-10-151-1/+3
|
* tests: Add autouse fixture to reset global state in node.pyxjuerg/synthetic-file-indexJürg Billeter2019-09-042-2/+7
|
* tests: Catch tests that don't shut down background threadsjuerg/forkJürg Billeter2019-09-032-0/+48
|
* testing/_forked.py: Update _MAIN_PID for tests running in subprocessesJürg Billeter2019-09-031-0/+6
| | | | | This reduces the difference between regular execution and the test environment.
* Add initial mypy configuration and typesChandan Singh2019-09-022-3/+4
| | | | | | | | | | As a first step, add type hints to variables whose type `mypy` cannot infer automatically. This is the minimal set of type hints that allow running `mypy` without any arguments, and having it not fail. We currently ignore C extensions that mypy can't process directly. Later, we can look into generating stubs for such modules (potentially automatically).
* tests: Implement and register in_subprocess pytest markTom Mewett2019-08-301-0/+94
|
* sourcetests/track: Don't overwrite project configurationbschubert/register-sources-on-testBenjamin Schubert2019-08-263-17/+10
| | | | | | | | We need to keep the project configuration to use the expected plugins as configured by the `kind` fixture. This adds a utility method `update_project_configuration` that allows updated part of the project.conf.
* _sourcetests/mirror: Don't overwrite project_confBenjamin Schubert2019-08-261-100/+74
| | | | | | If we overwrite project_conf, we loose the plugins registration. The only part that we really need to update is the 'aliases' and 'mirrors', which we can update ourselves.
* testing/sources: Automatically register plugin sourcesBenjamin Schubert2019-08-269-50/+147
| | | | | This fixes a bug where third party plugins cannot get tested automatically because they are not part of BuildStream.
* cascache.py: Start buildbox-casd and set up channelJürg Billeter2019-08-201-1/+1
|
* Mark buildbox tests as xfail if they require non implemented featuresWilliam Salmon2019-07-251-0/+1
|
* _yaml: Set 'MappingNode' public-private APIBenjamin Schubert2019-07-151-1/+1
| | | | | | | - _composite -> __composite (internal) - composite -> _composite (BuildStream private) - composite_under -> _composite_under (BuildStream private) - get -> _get (internal)
* _yaml: Move 'node_composite' to a method on 'MappingNode'Benjamin Schubert2019-07-151-1/+1
| | | | | - Also take care of node_composite_move in the same way. - Adapt all calling places
* tests/yaml: Stop using 'composite_dict' and use 'composite' insteadBenjamin Schubert2019-07-151-1/+1
| | | | | 'composite_dict' is a more internal method and we don't really need to access it there
* tests: Change all calls to _yaml.dump to _yaml.rountrip_dumpBenjamin Schubert2019-07-1510-39/+36
| | | | | Now that both are equivalent, we can skip the sanitization part before the yaml call.
* _yaml: Never create base 'Node' directlyBenjamin Schubert2019-07-151-1/+1
| | | | We shouldn't have to create normal nodes ever. Let's ensure we don't
* _yaml: Remove 'node_get' and migrate all remaining calls to new APIBenjamin Schubert2019-07-152-7/+7
|
* Refactor of Platform and SandboxWilliam Salmon2019-07-122-13/+14
|
* runcli.py: Don't set project to 'None'AlexFazakas2019-07-021-2/+1
| | | | | | | Calling runcli with project set to None results in setting the directory to the string 'None'. Instead, only set it when the given project argument is not None.
* _yaml: Remove useless calls to '_yaml.node_sanitize'Benjamin Schubert2019-06-251-1/+0
| | | | | | Calling '_yaml.dump' will itself call '_yaml.node_sanitize', therefore we can remove all calls to it in places where we directly after call dump.
* testing/_utils: match git methods to base classAngelos Evripiotis2019-06-181-1/+4
| | | | | | | | | | | | Update 'source_config' of Git and _SimpleGit to match the Repo base class. This ensures that they are fully substitutable Repos. Introduce 'source_config_extra' to allow explicit usage of extended functionality, which wouldn't necessarily be supported by a different subclass. By making the signatures deliberately match, we can use PyLint to ensure the signatures don't accidentally differ.
* CliIntegration: match methods to base classAngelos Evripiotis2019-06-181-2/+12
| | | | | | | | | | | | | | | Update 'run' to match the base class. This ensures that it is a fully substitutable sub-class. Introduce 'run_project_config' to allow explicit usage of extended functionality, which wouldn't necessarily be supported by a different subclass. By making the signatures deliberately match, we can use PyLint to ensure the signatures don't accidentally differ. Since we're already relying on `kwargs['project']` succeeding, enforce that run_project_config() only takes keyword arguments.
* testing/_utils/site.py: Fix missing BZR assignmentTom Pollard2019-06-071-0/+1
| | | | | | Ensure that BZR is assigned to None in exception handling when not available on the host. Needed for tests/testutils/repo/bzr.py import.
* test:utils/site: Consolidate MACHINE_ARCH variable in a single placeBenjamin Schubert2019-06-061-0/+3
| | | | | | | We have two different 'site' files that are redundant and both define some variables in BuildStream environment. Moving the MACHINE_ARCH to a single place.
* test:utils/site: Consolidate arpy environment variables in a single placeBenjamin Schubert2019-06-061-0/+6
| | | | | | | We have two different 'site' files that are redundant and both define some variables in BuildStream environment. Moving all the arpy related ones in a single place.
* test:utils/site: Consolidate Lzip environment variables in a single placeBenjamin Schubert2019-06-061-0/+6
| | | | | | | We have two different 'site' files that are redundant and both define some variables in BuildStream environment. Moving all the lzip related ones in a single place.
* test:utils/site: Consolidate Git environment variables in a single placeBenjamin Schubert2019-06-061-0/+7
| | | | | | | We have two different 'site' files that are redundant and both define some variables in BuildStream environment. Moving all the git related ones in a single place.
* test:utils/site: Consolidate Bzr environment variables in a single placeBenjamin Schubert2019-06-061-0/+10
| | | | | | | We have two different 'site' files that are redundant and both define some variables in BuildStream environment. This is a first step in consolidating them in a single file
* Move source from 'buildstream' to 'src/buildstream'Chandan Singh2019-05-2143-0/+2980
This was discussed in #1008. Fixes #1009.