[Notes] [Git][BuildStream/buildstream][bschubert/add-fedora-nobwrap-tests] 3 commits: gitlab-cy.yml: make linux-tests-template more composable.



Title: GitLab

Benjamin Schubert pushed to branch bschubert/add-fedora-nobwrap-tests at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -56,59 +56,63 @@ source_dist:
    56 56
     
    
    57 57
     # Run premerge commits
    
    58 58
     #
    
    59
    -.linux-tests-template: &linux-tests
    
    59
    +.linux-tests-template: &tests
    
    60 60
       stage: test
    
    61 61
     
    
    62
    -  script:
    
    62
    +  variables:
    
    63
    +    COVERAGE_DIR: coverage-linux
    
    64
    +
    
    65
    +  before_script:
    
    63 66
       # Diagnostics
    
    64 67
       - mount
    
    65 68
       - df -h
    
    66 69
     
    
    67
    -  - useradd -Um buildstream
    
    68
    -  - chown -R buildstream:buildstream .
    
    69
    -
    
    70
    -  # Unpack and get into dist/buildstream
    
    70
    +  # Unpack
    
    71 71
       - cd dist && ./unpack.sh
    
    72
    -  - chown -R buildstream:buildstream buildstream
    
    73 72
       - cd buildstream
    
    74 73
     
    
    74
    +  script:
    
    75
    +  - useradd -Um buildstream
    
    76
    +  - chown -R buildstream:buildstream .
    
    77
    +
    
    75 78
       # Run the tests from the source distribution, We run as a simple
    
    76 79
       # user to test for permission issues
    
    77 80
       - su buildstream -c 'python3 setup.py test --index-url invalid://uri --addopts --integration'
    
    78 81
     
    
    79
    -  # Go back to the toplevel and collect our reports
    
    80
    -  - cd ../..
    
    82
    +  after_script:
    
    83
    +  # Collect our reports
    
    81 84
       - mkdir -p coverage-linux/
    
    82
    -  - cp dist/buildstream/.coverage coverage-linux/coverage."${CI_JOB_NAME}"
    
    85
    +  - cp dist/buildstream/.coverage ${COVERAGE_LINUX}/coverage."${CI_JOB_NAME}"
    
    83 86
       except:
    
    84 87
       - schedules
    
    85 88
       artifacts:
    
    86 89
         paths:
    
    87
    -    - coverage-linux/
    
    90
    +    - ${COVERAGE_DIR}
    
    88 91
     
    
    89 92
     tests-debian-9:
    
    90 93
       image: buildstream/testsuite-debian:9-master-119-552f5fc6
    
    91
    -  <<: *linux-tests
    
    94
    +  <<: *tests
    
    92 95
     
    
    93 96
     tests-fedora-27:
    
    94 97
       image: buildstream/testsuite-fedora:27-master-119-552f5fc6
    
    95
    -  <<: *linux-tests
    
    98
    +  <<: *tests
    
    96 99
     
    
    97 100
     tests-fedora-28:
    
    98 101
       image: buildstream/testsuite-fedora:28-master-119-552f5fc6
    
    99
    -  <<: *linux-tests
    
    102
    +  <<: *tests
    
    100 103
     
    
    101 104
     tests-ubuntu-18.04:
    
    102 105
       image: buildstream/testsuite-ubuntu:18.04-master-119-552f5fc6
    
    103
    -  <<: *linux-tests
    
    106
    +  <<: *tests
    
    104 107
     
    
    105 108
     tests-unix:
    
    106 109
       # Use fedora here, to a) run a test on fedora and b) ensure that we
    
    107 110
       # can get rid of ostree - this is not possible with debian-8
    
    108 111
       image: buildstream/testsuite-fedora:27-master-119-552f5fc6
    
    109
    -  stage: test
    
    112
    +  <<: *tests
    
    110 113
       variables:
    
    111 114
         BST_FORCE_BACKEND: "unix"
    
    115
    +    COVERAGE_DIR: coverage-unix
    
    112 116
     
    
    113 117
       script:
    
    114 118
     
    
    ... ... @@ -118,23 +122,9 @@ tests-unix:
    118 122
         - dnf mark install fuse-libs
    
    119 123
         - dnf erase -y bubblewrap ostree
    
    120 124
     
    
    121
    -    # Unpack and get into dist/buildstream
    
    122
    -    - cd dist && ./unpack.sh && cd buildstream
    
    123
    -
    
    124 125
         # Since the unix platform is required to run as root, no user change required
    
    125 126
         - python3 setup.py test --index-url invalid://uri --addopts --integration
    
    126 127
     
    
    127
    -    # Go back to the toplevel and collect our reports
    
    128
    -    - cd ../..
    
    129
    -    - mkdir -p coverage-unix/
    
    130
    -    - cp dist/buildstream/.coverage coverage-unix/coverage.unix
    
    131
    -  except:
    
    132
    -  - schedules
    
    133
    -  artifacts:
    
    134
    -    paths:
    
    135
    -    - coverage-unix/
    
    136
    -    - logs-unix/
    
    137
    -
    
    138 128
     
    
    139 129
     # Automatically build documentation for every commit, we want to know
    
    140 130
     # if building documentation fails even if we're not deploying it.
    
    ... ... @@ -258,7 +248,7 @@ coverage:
    258 248
         - pip3 install --no-index .
    
    259 249
         - mkdir report
    
    260 250
         - cd report
    
    261
    -    - cp ../../../coverage-unix/coverage.unix .
    
    251
    +    - cp ../../../coverage-unix/coverage.* .
    
    262 252
         - cp ../../../coverage-linux/coverage.* .
    
    263 253
         - ls coverage.*
    
    264 254
         - coverage combine --rcfile=../.coveragerc -a coverage.*
    



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