summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* testing/_utils/site.py: Fix missing BZR assignmenttpollard/bzrfixTom 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.
* Merge branch 'aevri/job_msg_enum' into 'master'bst-marge-bot2019-06-0610-37/+52
|\ | | | | | | | | Use enums for Job-related constants See merge request BuildStream/buildstream!1380
| * Use 'is' when comparing against JobStatusaevri/job_msg_enumAngelos Evripiotis2019-06-069-11/+11
| | | | | | | | | | | | Since JobStatus is an enum, it's clearer to compare using 'is' - equality comparison will fail in the same cases, but might lull folks into thinking that comparison with integer would also work.
| * _scheduler/jobs/job: make JobStatus an enumAngelos Evripiotis2019-06-061-1/+2
| | | | | | | | | | | | | | | | This provides some minor guards against mistakes, and we'll be able to do type-checking later. This does open the possibility of problems if folks mistakenly try to pass off an integer as a JobStatus.
| * _scheduler/jobs/job: use enum for return codesAngelos Evripiotis2019-06-061-14/+18
| |
| * _scheduler/jobs/job: use enum for message typesAngelos Evripiotis2019-06-061-11/+21
|/
* Merge branch 'bschubert/optimize-loader-types' into 'master'bst-marge-bot2019-06-065-21/+35
|\ | | | | | | | | Optimize _loader/types.py See merge request BuildStream/buildstream!1379
| * _loader/types: type values wherever possibleBenjamin Schubert2019-06-061-8/+13
| | | | | | | | | | That way, cython can make better inference on the code and does not need to be too conservative.
| * _loader/types: Make Dependency a cdef classBenjamin Schubert2019-06-061-1/+6
| | | | | | | | | | Moving this class to Cython gives a non-negligeable speedup on 'show' operations.
| * _loader/types: cimport yaml functions for better speedBenjamin Schubert2019-06-064-15/+17
| | | | | | | | | | | | - _yaml: export node_validate function as Cython, as it was not done before. This requires rewriting the function to remove a closure. - Optimize node check by not calling is_node().
| * _loader/types: move to a cython packageBenjamin Schubert2019-06-063-0/+2
| | | | | | | | | | | | Types is a simple module that accounts for a few percent of a basic 'show' operation. Having it cythonized allows us to get better performance without too much wokr
| * _loader/types: use type(x) is str instead of isintanceBenjamin Schubert2019-06-061-1/+1
|/ | | | | We don't expected anything else than `str` or `Node`, so type() should be enough
* Merge branch 'bschubert/pylint-artifactcache' into 'master'bst-marge-bot2019-06-068-14/+34
|\ | | | | | | | | Ensure pylint runs in tests/artifactcache See merge request BuildStream/buildstream!1377
| * tests/artifactcache: add __init__.py file to make it a packageBenjamin Schubert2019-06-061-0/+0
| | | | | | | | | | | | | | | | tests/integration was lacking a __init__.py file, meaning it was not recognized as a python package, and thus, pylint would not check anything inside the directory. Adding __init__.py ensures we have correct checks here.
| * tests/artifactcache/push: remove unused importBenjamin Schubert2019-06-061-1/+0
| |
| * tests/artifactcache/pull: Remove unused variableBenjamin Schubert2019-06-061-1/+0
| |
| * tests/artifactcache/config: Fix pylint issuesBenjamin Schubert2019-06-061-4/+10
| |
| * tests/artifactcache/artifactservice: Fix pylint issuesBenjamin Schubert2019-06-061-3/+1
| |
| * tests/artifactcache: Disable 'unused-import' checks that are pytest fixturesBenjamin Schubert2019-06-066-6/+6
| | | | | | | | | | | | | | Some imports are fixtures, that need to be in the current namespace when pytest runs. However, pylint does not know this. Disabling pylint checks on those imports
| * tests/artifactcache: Silence all 'redefined-outer-name' pylint errorsBenjamin Schubert2019-06-066-0/+18
|/ | | | | | | | | | This is due to pytest fixtures having to be named the same as the test arguments. This is a pre-requisite to enable pylint on this directory We need to do this per file as we can't blanket disable for directories. See upstream issue: https://github.com/PyCQA/pylint/issues/618
* Merge branch 'bschubert/site-consolidation' into 'master'bst-marge-bot2019-06-0642-135/+91
|\ | | | | | | | | Remove tests/testutils/site.py and move everything to buildstream/testing/_utils/site.py See merge request BuildStream/buildstream!1375
| * tests/examples/flatpak-autotools: rename HAVE_OSTREE to HAVE_OSTREE_PLUGINBenjamin Schubert2019-06-061-4/+6
| | | | | | | | | | | | What this checks does is check if the ostree plugin is installed and fully configured. Renaming to HAVE_OSTREE_PLUGIN makes it slightly more explicit
| * tests/testutils/site: Remove completely and migrate HAVE_OSTREE to examplesBenjamin Schubert2019-06-062-10/+7
| | | | | | | | | | | | The only place needing to know about OSTREE is the flatpak-autotools for the documentation. We can therefore move the OSTREE business here and remove completely the site file, ending up with a single one left.
| * tests/testutils/site: Remove unused HAVE_OSTREE_CLI variableBenjamin Schubert2019-06-061-9/+0
| |
| * test:utils/site: Consolidate IS_LINUX/WSL/Windows in a single siteBenjamin Schubert2019-06-0613-29/+13
| | | | | | | | | | | | | | | | 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
| * test:utils/site: Consolidate HAVE_SANDBOX in a single site fileBenjamin Schubert2019-06-0622-33/+27
| | | | | | | | | | | | | | | | We have two different 'site' files that are redundant and both define some variables in BuildStream environment. Remove HAVE_SANDBOX from tests/testutils/site.py and change all imports to point to the other one
| * test:utils/site: Consolidate MACHINE_ARCH variable in a single placeBenjamin Schubert2019-06-069-16/+17
| | | | | | | | | | | | | | 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-063-7/+7
| | | | | | | | | | | | | | 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-063-7/+7
| | | | | | | | | | | | | | 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 Bwrap environment variables in a single placeBenjamin Schubert2019-06-069-18/+19
| | | | | | | | | | | | | | We have two different 'site' files that are redundant and both define some variables in BuildStream environment. Moving all the bubblewrap related ones in a single place.
| * test:utils/site: Consolidate Git environment variables in a single placeBenjamin Schubert2019-06-067-30/+15
| | | | | | | | | | | | | | 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-065-15/+16
|/ | | | | | | 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
* Merge branch 'aevri/spawk' into 'master'bst-marge-bot2019-06-066-30/+29
|\ | | | | | | | | Rename (spawn, fork) -> 'start process' See merge request BuildStream/buildstream!1374
| * Rename (spawn, fork) -> 'start process'Angelos Evripiotis2019-06-066-30/+29
|/ | | | | | | | | | | | | | Avoid confusion by not referring to starting another process as 'spawning'. Note that 'spawn' is a process creation method, which is an alternative to forking. Say 'create child process' instead of 'fork' where it doesn't harm understanding. Although we currently only use the 'fork' method for creating subprocesses, there are reasons for us to support 'spawn' in the future. More information on forking and spawning: https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods
* Merge branch 'jennis/fix_failing_test' into 'master'bst-marge-bot2019-06-061-2/+2
|\ | | | | | | | | Don't assert gRPC messages which may change See merge request BuildStream/buildstream!1381
| * tests/sourcecache/push.py: Less strict initialisation checkjennis/fix_failing_testJames Ennis2019-06-061-2/+2
|/ | | | | | | | When we are testing push failures, we are being too strict when we try to verify that the remote has failed to be initialized. The assertion was failing because of slightly different gRPC error messages. Now the assertion is less strict but still appropriate.
* Merge branch 'aevri/defensive_send_message' into 'master'bst-marge-bot2019-06-062-32/+38
|\ | | | | | | | | _scheduler/jobs: refactor, defensive send_message See merge request BuildStream/buildstream!1373
| * _scheduler/jobs: refactor, defensive send_messageAngelos Evripiotis2019-06-062-30/+36
| | | | | | | | | | | | | | | | | | | | | | | | Simplify the custom 'handle_message' / 'send_message' protocol by not requiring a message_type. These message types share a namespace with the base Job implementation, which could cause trouble. Introduce a new private '_send_message' to implement the old functionality. Subclasses are free to pack a message type into their own messages, this isn't necessary at present and simplifies existing subclass code.
| * jobs/job: lint fixes, overhang + unused varAngelos Evripiotis2019-06-061-2/+2
|/
* Merge branch 'bschubert/pylint-integration' into 'master'bst-marge-bot2019-06-0624-46/+116
|\ | | | | | | | | Ensure pylint runs in tests/integration See merge request BuildStream/buildstream!1376
| * tests/integration: add __init__.py file to make it a packagebschubert/pylint-integrationBenjamin Schubert2019-06-061-0/+0
| | | | | | | | | | | | | | | | tests/integration was lacking a __init__.py file, meaning it was not recognized as a python package, and thus, pylint would not check anything inside the directory. Adding __init__.py ensures we have correct checks here.
| * tests/integration: Fix mutable default argumentsBenjamin Schubert2019-06-062-2/+11
| | | | | | | | | | | | Python method default arguments should never be mutable. Using 'None' as a canary and setting them afterwards instead.
| * tests/integration/shell: Simplify if-else assignmentBenjamin Schubert2019-06-061-4/+1
| | | | | | | | Pylint was complaining about it.
| * test/integration: Fix 'wrong-import-order' pylint issuesBenjamin Schubert2019-06-063-7/+11
| |
| * tests/integration: Fix all 'unused-import' errorsBenjamin Schubert2019-06-063-9/+0
| |
| * tests/integration: Disable 'unused-import' checks that are pytest fixturesBenjamin Schubert2019-06-0623-25/+25
| | | | | | | | | | | | | | Some imports are fixtures, that need to be in the current namespace when pytest runs. However, pylint does not know this. Disabling pylint checks on those imports
| * tests/integration: Silence all 'redefined-outer-name' pylint errorsBenjamin Schubert2019-06-0623-0/+69
|/ | | | | | | | | | This is due to pytest fixtures having to be named the same as the test arguments. This is a pre-requisite to enable pylint on this directory We need to do this per file as we can't blanket disable for directories. See upstream issue: https://github.com/PyCQA/pylint/issues/618
* Merge branch 'bschubert/pylint-fixes' into 'master'James Ennis2019-06-0610-10/+30
|\ | | | | | | | | Ensure pylint runs in some tests paths See merge request BuildStream/buildstream!1378
| * tests/plugins: Enable pylint and fix problemsbschubert/pylint-fixesBenjamin Schubert2019-06-053-2/+7
| | | | | | | | | | tests/plugins was missing an __init__.py, which meant pylint was never run there.
| * tests/remoteexecution: Enable pylint and fix problemsBenjamin Schubert2019-06-053-2/+8
| | | | | | | | | | tests/remoteexecution missing an __init__.py, which meant pylint was never run there.