[Notes] [Git][BuildStream/buildstream][bschubert/pipeline] 10 commits: dev-requirements: pytest-cov==2.6.1 for '--no-cov'



Title: GitLab

Benjamin Schubert pushed to branch bschubert/pipeline at BuildStream / buildstream

Commits:

6 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -61,7 +61,7 @@ tests-ubuntu-18.04:
    61 61
       <<: *tests
    
    62 62
     
    
    63 63
     overnight-fedora-28-aarch64:
    
    64
    -  image: buildstream/testsuite-fedora:aarch64-28-06bab030-32a101f6
    
    64
    +  image: buildstream/testsuite-fedora:aarch64-28-5da27168-32c47d1c
    
    65 65
       tags:
    
    66 66
         - aarch64
    
    67 67
       <<: *tests
    
    ... ... @@ -70,6 +70,12 @@ overnight-fedora-28-aarch64:
    70 70
       except: []
    
    71 71
       only:
    
    72 72
       - schedules
    
    73
    +  before_script:
    
    74
    +    # grpcio needs to be compiled from source on aarch64 so we additionally
    
    75
    +    # need a C++ compiler here.
    
    76
    +    # FIXME: Ideally this would be provided by the base image. This will be
    
    77
    +    # unblocked by https://gitlab.com/BuildStream/buildstream-docker-images/issues/34
    
    78
    +    - dnf install -y gcc-c++
    
    73 79
     
    
    74 80
     tests-unix:
    
    75 81
       # Use fedora here, to a) run a test on fedora and b) ensure that we
    
    ... ... @@ -141,7 +147,7 @@ docs:
    141 147
       variables:
    
    142 148
         BST_EXT_URL: git+https://gitlab.com/BuildStream/bst-external.git
    
    143 149
         BST_EXT_REF: 573843768f4d297f85dc3067465b3c7519a8dcc3 # 0.7.0
    
    144
    -    FD_SDK_REF: 612f66e218445eee2b1a9d7dd27c9caba571612e # freedesktop-sdk-18.08.19-54-g612f66e2
    
    150
    +    FD_SDK_REF: freedesktop-sdk-18.08.25-0-g250939d465d6dd7768a215f1fa59c4a3412fc337
    
    145 151
       before_script:
    
    146 152
       - |
    
    147 153
         mkdir -p "${HOME}/.config"
    

  • CONTRIBUTING.rst
    ... ... @@ -1534,6 +1534,10 @@ You can always abort on the first failure by running::
    1534 1534
     
    
    1535 1535
       tox -- -x
    
    1536 1536
     
    
    1537
    +Similarly, you may also be interested in the ``--last-failed`` and
    
    1538
    +``--failed-first`` options as per the
    
    1539
    +`pytest cache <https://docs.pytest.org/en/latest/cache.html>`_ documentation.
    
    1540
    +
    
    1537 1541
     If you want to run a specific test or a group of tests, you
    
    1538 1542
     can specify a prefix to match. E.g. if you want to run all of
    
    1539 1543
     the frontend tests you can do::
    
    ... ... @@ -1545,6 +1549,12 @@ If you wanted to run the test_build_track test within frontend/buildtrack.py you
    1545 1549
     
    
    1546 1550
       tox -- tests/frontend/buildtrack.py::test_build_track
    
    1547 1551
     
    
    1552
    +When running only a few tests, you may find the coverage and timing output
    
    1553
    +excessive, there are options to trim them. Note that coverage step will fail.
    
    1554
    +Here is an example::
    
    1555
    +
    
    1556
    +  tox -- --no-cov --durations=1 tests/frontend/buildtrack.py::test_build_track
    
    1557
    +
    
    1548 1558
     We also have a set of slow integration tests that are disabled by
    
    1549 1559
     default - you will notice most of them marked with SKIP in the pytest
    
    1550 1560
     output. To run them, you can use::
    

  • buildstream/_scheduler/queues/fetchqueue.py
    ... ... @@ -44,9 +44,6 @@ class FetchQueue(Queue):
    44 44
             element._fetch()
    
    45 45
     
    
    46 46
         def status(self, element):
    
    47
    -        # state of dependencies may have changed, recalculate element state
    
    48
    -        element._update_state()
    
    49
    -
    
    50 47
             if not element._is_required():
    
    51 48
                 # Artifact is not currently required but it may be requested later.
    
    52 49
                 # Keep it in the queue.
    

  • buildstream/_scheduler/queues/queue.py
    ... ... @@ -170,9 +170,9 @@ class Queue():
    170 170
             skip = [job for job in jobs if self.status(job.element) == QueueStatus.SKIP]
    
    171 171
             wait = [job for job in jobs if job not in skip]
    
    172 172
     
    
    173
    +        self.skipped_elements.extend([job.element for job in skip])
    
    173 174
             self._wait_queue.extend(wait)
    
    174 175
             self._done_queue.extend(skip)
    
    175
    -        self.skipped_elements.extend(skip)
    
    176 176
     
    
    177 177
         # dequeue()
    
    178 178
         #
    

  • buildstream/element.py
    ... ... @@ -197,6 +197,7 @@ class Element(Plugin):
    197 197
     
    
    198 198
             self.__runtime_dependencies = []        # Direct runtime dependency Elements
    
    199 199
             self.__build_dependencies = []          # Direct build dependency Elements
    
    200
    +        self.__reverse_build_dependencies = []  # Direct reverse dependency Elements
    
    200 201
             self.__sources = []                     # List of Sources
    
    201 202
             self.__weak_cache_key = None            # Our cached weak cache key
    
    202 203
             self.__strict_cache_key = None          # Our cached cache key for strict builds
    
    ... ... @@ -439,6 +440,16 @@ class Element(Plugin):
    439 440
             if should_yield and (recurse or recursed) and scope != Scope.BUILD:
    
    440 441
                 yield self
    
    441 442
     
    
    443
    +    def reverse_build_dependencies(self):
    
    444
    +        def recurse_rdeps(element):
    
    445
    +            yield element
    
    446
    +
    
    447
    +            for rdep in element.__reverse_build_dependencies:
    
    448
    +                yield from recurse_rdeps(rdep)
    
    449
    +
    
    450
    +        for rdep in self.__reverse_build_dependencies:
    
    451
    +            yield from recurse_rdeps(rdep)
    
    452
    +
    
    442 453
         def search(self, scope, name):
    
    443 454
             """Search for a dependency by name
    
    444 455
     
    
    ... ... @@ -930,6 +941,7 @@ class Element(Plugin):
    930 941
             for meta_dep in meta.build_dependencies:
    
    931 942
                 dependency = Element._new_from_meta(meta_dep)
    
    932 943
                 element.__build_dependencies.append(dependency)
    
    944
    +            dependency.__reverse_build_dependencies.append(element)
    
    933 945
     
    
    934 946
             return element
    
    935 947
     
    
    ... ... @@ -1306,6 +1318,9 @@ class Element(Plugin):
    1306 1318
     
    
    1307 1319
             self._update_state()
    
    1308 1320
     
    
    1321
    +        for reverse_dep in self.reverse_build_dependencies():
    
    1322
    +            reverse_dep._update_state()
    
    1323
    +
    
    1309 1324
         # _track():
    
    1310 1325
         #
    
    1311 1326
         # Calls track() on the Element sources
    
    ... ... @@ -1503,6 +1518,9 @@ class Element(Plugin):
    1503 1518
             self._update_state()
    
    1504 1519
     
    
    1505 1520
             if self._get_workspace() and self._cached_success():
    
    1521
    +            for rdep in self.reverse_build_dependencies():
    
    1522
    +                rdep._update_state()
    
    1523
    +
    
    1506 1524
                 assert utils._is_main_process(), \
    
    1507 1525
                     "Attempted to save workspace configuration from child process"
    
    1508 1526
                 #
    

  • requirements/dev-requirements.txt
    ... ... @@ -2,7 +2,7 @@ coverage==4.4
    2 2
     pylint==2.2.2
    
    3 3
     pycodestyle==2.4.0
    
    4 4
     pytest==4.0.2
    
    5
    -pytest-cov==2.6.0
    
    5
    +pytest-cov==2.6.1
    
    6 6
     pytest-datafiles==2.0
    
    7 7
     pytest-env==0.6.2
    
    8 8
     pytest-xdist==1.25.0
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]