Tristan Van Berkom pushed to branch jonathan/faster-except-elements-1.2 at BuildStream / buildstream
Commits:
-
24da69cf
by Chandan Singh at 2018-08-21T12:30:07Z
-
54d15225
by Chandan Singh at 2018-08-21T12:30:13Z
-
be7533ab
by Chandan Singh at 2018-08-21T13:31:52Z
-
1be685a7
by Tristan Van Berkom at 2018-08-21T13:43:27Z
-
fc3cff95
by Tristan Van Berkom at 2018-08-21T15:44:21Z
-
6f6a04a9
by Jonathan Maw at 2018-08-22T05:54:45Z
4 changed files:
Changes:
| 1 |
-image: buildstream/testsuite-debian:9-master-112-a9f63c5e
|
|
| 1 |
+image: buildstream/testsuite-debian:9-master-114-4cab18e3
|
|
| 2 | 2 |
|
| 3 | 3 |
cache:
|
| 4 | 4 |
key: "$CI_JOB_NAME-"
|
| ... | ... | @@ -89,25 +89,25 @@ source_dist: |
| 89 | 89 |
- coverage-linux/
|
| 90 | 90 |
|
| 91 | 91 |
tests-debian-9:
|
| 92 |
- image: buildstream/testsuite-debian:9-master-112-a9f63c5e
|
|
| 92 |
+ image: buildstream/testsuite-debian:9-master-114-4cab18e3
|
|
| 93 | 93 |
<<: *linux-tests
|
| 94 | 94 |
|
| 95 | 95 |
tests-fedora-27:
|
| 96 |
- image: buildstream/testsuite-fedora:27-master-112-a9f63c5e
|
|
| 96 |
+ image: buildstream/testsuite-fedora:27-master-114-4cab18e3
|
|
| 97 | 97 |
<<: *linux-tests
|
| 98 | 98 |
|
| 99 | 99 |
tests-fedora-28:
|
| 100 |
- image: buildstream/testsuite-fedora:28-master-112-a9f63c5e
|
|
| 100 |
+ image: buildstream/testsuite-fedora:28-master-114-4cab18e3
|
|
| 101 | 101 |
<<: *linux-tests
|
| 102 | 102 |
|
| 103 | 103 |
tests-ubuntu-18.04:
|
| 104 |
- image: buildstream/testsuite-ubuntu:18.04-master-112-a9f63c5e
|
|
| 104 |
+ image: buildstream/testsuite-ubuntu:18.04-master-114-4cab18e3
|
|
| 105 | 105 |
<<: *linux-tests
|
| 106 | 106 |
|
| 107 | 107 |
tests-unix:
|
| 108 | 108 |
# Use fedora here, to a) run a test on fedora and b) ensure that we
|
| 109 | 109 |
# can get rid of ostree - this is not possible with debian-8
|
| 110 |
- image: buildstream/testsuite-fedora:27-master-112-a9f63c5e
|
|
| 110 |
+ image: buildstream/testsuite-fedora:27-master-114-4cab18e3
|
|
| 111 | 111 |
stage: test
|
| 112 | 112 |
variables:
|
| 113 | 113 |
BST_FORCE_BACKEND: "unix"
|
| ... | ... | @@ -22,12 +22,43 @@ import click |
| 22 | 22 |
from .app import App
|
| 23 | 23 |
|
| 24 | 24 |
|
| 25 |
+# This trick is currently only supported on some terminals,
|
|
| 26 |
+# avoid using it where it can cause garbage to be printed
|
|
| 27 |
+# to the terminal.
|
|
| 28 |
+#
|
|
| 29 |
+def _osc_777_supported():
|
|
| 30 |
+ |
|
| 31 |
+ term = os.environ['TERM']
|
|
| 32 |
+ |
|
| 33 |
+ if term.startswith('xterm') or term.startswith('vte'):
|
|
| 34 |
+ |
|
| 35 |
+ # Since vte version 4600, upstream silently ignores
|
|
| 36 |
+ # the OSC 777 without printing garbage to the terminal.
|
|
| 37 |
+ #
|
|
| 38 |
+ # For distros like Fedora who have patched vte, this
|
|
| 39 |
+ # will trigger a desktop notification and bring attention
|
|
| 40 |
+ # to the terminal.
|
|
| 41 |
+ #
|
|
| 42 |
+ vte_version = os.environ['VTE_VERSION']
|
|
| 43 |
+ try:
|
|
| 44 |
+ vte_version_int = int(vte_version)
|
|
| 45 |
+ except ValueError:
|
|
| 46 |
+ return False
|
|
| 47 |
+ |
|
| 48 |
+ if vte_version_int >= 4600:
|
|
| 49 |
+ return True
|
|
| 50 |
+ |
|
| 51 |
+ return False
|
|
| 52 |
+ |
|
| 53 |
+ |
|
| 25 | 54 |
# A linux specific App implementation
|
| 26 | 55 |
#
|
| 27 | 56 |
class LinuxApp(App):
|
| 28 | 57 |
|
| 29 | 58 |
def notify(self, title, text):
|
| 30 | 59 |
|
| 31 |
- term = os.environ['TERM']
|
|
| 32 |
- if term in ('xterm', 'vte'):
|
|
| 33 |
- click.echo("\033]777;notify;{};{}\007".format(title, text))
|
|
| 60 |
+ # Currently we only try this notification method
|
|
| 61 |
+ # of sending an escape sequence to the terminal
|
|
| 62 |
+ #
|
|
| 63 |
+ if _osc_777_supported():
|
|
| 64 |
+ click.echo("\033]777;notify;{};{}\007".format(title, text), err=True)
|
| ... | ... | @@ -235,6 +235,9 @@ class Pipeline(): |
| 235 | 235 |
# exceptions removed
|
| 236 | 236 |
#
|
| 237 | 237 |
def except_elements(self, targets, elements, except_targets):
|
| 238 |
+ if not except_targets:
|
|
| 239 |
+ return elements
|
|
| 240 |
+ |
|
| 238 | 241 |
targeted = list(self.dependencies(targets, Scope.ALL))
|
| 239 | 242 |
visited = []
|
| 240 | 243 |
|
| 1 | 1 |
coverage == 4.4.0
|
| 2 | 2 |
pep8
|
| 3 |
-pytest >= 3.1.0
|
|
| 3 |
+pylint == 2.1.1
|
|
| 4 |
+pytest >= 3.7
|
|
| 4 | 5 |
pytest-cov >= 2.5.0
|
| 5 | 6 |
pytest-datafiles
|
| 6 | 7 |
pytest-env
|
