[Notes] [Git][BuildStream/buildstream][bschubert/tests-no-chroot-linux] 4 commits: _yaml.py: Do not insert into cache if retrieved from cache



Title: GitLab

Benjamin Schubert pushed to branch bschubert/tests-no-chroot-linux at BuildStream / buildstream

Commits:

2 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -56,6 +56,8 @@ source_dist:
    56 56
       stage: test
    
    57 57
       variables:
    
    58 58
         PYTEST_ADDOPTS: "--color=yes"
    
    59
    +    COVERAGE_ARTIFACT_PATH: "coverage-linux/"
    
    60
    +
    
    59 61
       script:
    
    60 62
       # Diagnostics
    
    61 63
       - mount
    
    ... ... @@ -75,15 +77,34 @@ source_dist:
    75 77
       # user to test for permission issues
    
    76 78
       - su buildstream -c 'python3 setup.py test --index-url invalid://uri --addopts --integration'
    
    77 79
     
    
    78
    -  # Go back to the toplevel and collect our reports
    
    79
    -  - cd ../..
    
    80
    -  - mkdir -p coverage-linux/
    
    81
    -  - cp dist/buildstream/.coverage coverage-linux/coverage."${CI_JOB_NAME}"
    
    80
    +  after_script:
    
    81
    +  # Collect our reports
    
    82
    +  - mkdir -p ${COVERAGE_ARTIFACT_PATH}
    
    83
    +  - cp dist/buildstream/.coverage ${COVERAGE_ARTIFACT_PATH}/coverage."${CI_JOB_NAME}"
    
    82 84
       except:
    
    83 85
       - schedules
    
    84 86
       artifacts:
    
    85 87
         paths:
    
    86
    -    - coverage-linux/
    
    88
    +    - ${COVERAGE_ARTIFACT_PATH}
    
    89
    +
    
    90
    +.linux-tests-template-root: &linux-tests-as-root
    
    91
    +  <<: *linux-tests
    
    92
    +
    
    93
    +  script:
    
    94
    +  # Diagnostics
    
    95
    +  - mount
    
    96
    +  - df -h
    
    97
    +
    
    98
    +  - export INTEGRATION_CACHE="$(pwd)/cache/integration-cache"
    
    99
    +
    
    100
    +  # Unpack and get into dist/buildstream
    
    101
    +  - cd dist && ./unpack.sh
    
    102
    +  - cd buildstream
    
    103
    +
    
    104
    +  # Run the tests from the source distribution, We run as a simple
    
    105
    +  # user to test for permission issues
    
    106
    +  - python3 setup.py test --index-url invalid://uri --addopts "--integration"
    
    107
    +
    
    87 108
     
    
    88 109
     tests-debian-9:
    
    89 110
       image: buildstream/testsuite-debian:9-master-119-552f5fc6
    
    ... ... @@ -101,41 +122,31 @@ tests-ubuntu-18.04:
    101 122
       image: buildstream/testsuite-ubuntu:18.04-master-119-552f5fc6
    
    102 123
       <<: *linux-tests
    
    103 124
     
    
    125
    +test-fedora-no-sandbox:
    
    126
    +  image: buildstream/testsuite-fedora:27-master-119-552f5fc6
    
    127
    +  <<: *linux-tests
    
    128
    +
    
    129
    +  before_script:
    
    130
    +    dnf erase -y bubblewrap ostree chroot
    
    131
    +
    
    104 132
     tests-unix:
    
    105 133
       # Use fedora here, to a) run a test on fedora and b) ensure that we
    
    106 134
       # can get rid of ostree - this is not possible with debian-8
    
    107 135
       image: buildstream/testsuite-fedora:27-master-119-552f5fc6
    
    108
    -  stage: test
    
    136
    +  <<: *linux-tests-as-root
    
    137
    +
    
    109 138
       variables:
    
    110 139
         BST_FORCE_BACKEND: "unix"
    
    140
    +    COVERAGE_ARTIFACT_PATH: "coverage-unix/"
    
    111 141
         PYTEST_ADDOPTS: "--color=yes"
    
    112
    -  script:
    
    113
    -
    
    114
    -    - export INTEGRATION_CACHE="$(pwd)/cache/integration-cache"
    
    115 142
     
    
    116
    -    # We remove the Bubblewrap and OSTree packages here so that we catch any
    
    117
    -    # codepaths that try to use them. Removing OSTree causes fuse-libs to
    
    118
    -    # disappear unless we mark it as user-installed.
    
    143
    +  # We remove the Bubblewrap and OSTree packages here so that we catch any
    
    144
    +  # codepaths that try to use them. Removing OSTree causes fuse-libs to
    
    145
    +  # disappear unless we mark it as user-installed.
    
    146
    +  before_script:
    
    119 147
         - dnf mark install fuse-libs
    
    120 148
         - dnf erase -y bubblewrap ostree
    
    121 149
     
    
    122
    -    # Unpack and get into dist/buildstream
    
    123
    -    - cd dist && ./unpack.sh && cd buildstream
    
    124
    -
    
    125
    -    # Since the unix platform is required to run as root, no user change required
    
    126
    -    - python3 setup.py test --index-url invalid://uri --addopts --integration
    
    127
    -
    
    128
    -    # Go back to the toplevel and collect our reports
    
    129
    -    - cd ../..
    
    130
    -    - mkdir -p coverage-unix/
    
    131
    -    - cp dist/buildstream/.coverage coverage-unix/coverage.unix
    
    132
    -  except:
    
    133
    -  - schedules
    
    134
    -  artifacts:
    
    135
    -    paths:
    
    136
    -    - coverage-unix/
    
    137
    -    - logs-unix/
    
    138
    -
    
    139 150
     
    
    140 151
     # Automatically build documentation for every commit, we want to know
    
    141 152
     # if building documentation fails even if we're not deploying it.
    
    ... ... @@ -253,7 +264,7 @@ coverage:
    253 264
         - pip3 install --no-index .
    
    254 265
         - mkdir report
    
    255 266
         - cd report
    
    256
    -    - cp ../../../coverage-unix/coverage.unix .
    
    267
    +    - cp ../../../coverage-unix/coverage.* .
    
    257 268
         - cp ../../../coverage-linux/coverage.* .
    
    258 269
         - ls coverage.*
    
    259 270
         - coverage combine --rcfile=../.coveragerc -a coverage.*
    

  • buildstream/_yaml.py
    ... ... @@ -204,9 +204,8 @@ def load(filename, shortname=None, copy_tree=False, *, project=None, yaml_cache=
    204 204
     
    
    205 205
             if not data:
    
    206 206
                 data = load_data(contents, file, copy_tree=copy_tree)
    
    207
    -
    
    208
    -        if yaml_cache:
    
    209
    -            yaml_cache.put_from_key(project, filename, key, data)
    
    207
    +            if yaml_cache:
    
    208
    +                yaml_cache.put_from_key(project, filename, key, data)
    
    210 209
     
    
    211 210
             return data
    
    212 211
         except FileNotFoundError as e:
    



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