DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (2f19e7b646e0)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
version: 1
policy:
  pullRequests: public
tasks:
  $let:
    event_str: {$json: {$eval: event}}
  in:
    $flattenDeep:
      - $if: tasks_for == "github-push"
        then:
          $map:
            $flatten:
              $match: {
                event.ref == "refs/heads/master": [{name: firefox, channel: nightly}, {name: chrome, channel: dev}],
                event.ref == "refs/heads/epochs/daily": [{name: firefox, channel: stable}, {name: chrome, channel: stable}, {name: webkitgtk_minibrowser, channel: nightly}],
                event.ref == "refs/heads/epochs/weekly": [{name: firefox, channel: beta}, {name: chrome, channel: beta}, {name: webkitgtk_minibrowser, channel: stable}],
                event.ref == "refs/heads/triggers/chrome_stable": [{name: chrome, channel: stable}],
                event.ref == "refs/heads/triggers/chrome_beta": [{name: chrome, channel: beta}],
                event.ref == "refs/heads/triggers/chrome_dev": [{name: chrome, channel: dev}],
                event.ref == "refs/heads/triggers/firefox_stable": [{name: firefox, channel: stable}],
                event.ref == "refs/heads/triggers/firefox_beta": [{name: firefox, channel: beta}],
                event.ref == "refs/heads/triggers/firefox_nightly": [{name: firefox, channel: nightly}],
                event.ref == "refs/heads/triggers/webkitgtk_minibrowser_stable": [{name: webkitgtk_minibrowser, channel: stable}],
                event.ref == "refs/heads/triggers/webkitgtk_minibrowser_nightly": [{name: webkitgtk_minibrowser, channel: nightly}]
              }
          each(browser):
            $map:
              - [testharness, 1, 16]
              - [testharness, 2, 16]
              - [testharness, 3, 16]
              - [testharness, 4, 16]
              - [testharness, 5, 16]
              - [testharness, 6, 16]
              - [testharness, 7, 16]
              - [testharness, 8, 16]
              - [testharness, 9, 16]
              - [testharness, 10, 16]
              - [testharness, 11, 16]
              - [testharness, 12, 16]
              - [testharness, 13, 16]
              - [testharness, 14, 16]
              - [testharness, 15, 16]
              - [testharness, 16, 16]
              - [reftest, 1, 5]
              - [reftest, 2, 5]
              - [reftest, 3, 5]
              - [reftest, 4, 5]
              - [reftest, 5, 5]
              - [wdspec, 1, 1]
            each(chunk):
              taskId: {$eval: 'as_slugid(browser.name + browser.channel + chunk[0] + str(chunk[1]))'}
              taskGroupId: {$eval: 'as_slugid("task group")'}
              created: {$fromNow: ''}
              deadline: {$fromNow: '24 hours'}
              provisionerId: aws-provisioner-v1
              workerType:
                $if: event.repository.full_name == 'web-platform-tests/wpt'
                then:
                  wpt-docker-worker
                else:
                  github-worker
              metadata:
                name: wpt-${browser.name}-${browser.channel}-${chunk[0]}-${chunk[1]}
                description: >-
                  A subset of WPT's "${chunk[0]}" tests (chunk number ${chunk[1]}
                  of ${chunk[2]}), run in the ${browser.channel} release of
                  ${browser.name}.
                owner: ${event.pusher.email}
                source: ${event.repository.url}
              payload:
                image:
                    harjgam/web-platform-tests:0.33
                maxRunTime: 7200
                artifacts:
                  public/results:
                    path: /home/test/artifacts
                    type: directory
                command:
                  - /bin/bash
                  - --login
                  - -c
                  - set -ex;
                    echo "wpt-${browser.name}-${browser.channel}-${chunk[0]}-${chunk[1]}";
                    ~/start.sh
                      ${event.repository.url}
                      ${event.ref};
                    cd ~/web-platform-tests;
                    sudo cp tools/certs/cacert.pem
                        /usr/local/share/ca-certificates/cacert.crt;
                    sudo update-ca-certificates;
                    ./tools/ci/run_tc.py
                      --checkout=${event.after}
                      --oom-killer
                      --hosts
                      --browser=${browser.name}
                      --channel=${browser.channel}
                      --xvfb
                      run-all
                      ./tools/ci/taskcluster-run.py
                        ${browser.name}
                        --
                        --channel=${browser.channel}
                        --log-wptreport=../artifacts/wpt_report.json
                        --log-wptscreenshot=../artifacts/wpt_screenshot.txt
                        --no-fail-on-unexpected
                        --test-type=${chunk[0]}
                        --this-chunk=${chunk[1]}
                        --total-chunks=${chunk[2]};
              extra:
                github_event: "${event_str}"

      - $if: tasks_for == "github-pull-request"
        # PR tasks that run the tests in various configurations
        then:
          # Taskcluster responds to a number of events issued by the GitHub API
          # which should not trigger re-validation.
          $if: event.action in ['opened', 'reopened', 'synchronize']
          then:
            $map: [{name: firefox, channel: nightly}, {name: chrome, channel: dev}]
            each(browser):
              $map:
                # This is the main place to define new stability checks
                - name: wpt-${browser.name}-${browser.channel}-stability
                  job_name: stability
                  checkout: task_head
                  diff_base: base_head
                  description: >-
                    Verify that all tests affected by a pull request are stable
                    when executed in ${browser.name}.
                  extra_args: '--verify'
                - name: wpt-${browser.name}-${browser.channel}-results
                  job_name: affected_tests
                  checkout: task_head
                  diff_base: base_head
                  description: >-
                    Collect results for all tests affected by a pull request in
                    ${browser.name}.
                  extra_args: >-
                    --no-fail-on-unexpected
                    --log-wptreport=../artifacts/wpt_report.json
                    --log-wptscreenshot=../artifacts/wpt_screenshot.txt
                - name: wpt-${browser.name}-${browser.channel}-results-without-changes
                  job_name: affected_tests
                  checkout: base_head
                  diff_base: task_head
                  description: >-
                    Collect results for all tests affected by a pull request in
                    ${browser.name} but without the changes in the PR.
                  extra_args: >-
                    --no-fail-on-unexpected
                    --log-wptreport=../artifacts/wpt_report.json
                    --log-wptscreenshot=../artifacts/wpt_screenshot.txt
              each(operation):
                taskId: {$eval: 'as_slugid(operation.name)'}
                taskGroupId: {$eval: 'as_slugid("task group")'}
                created: {$fromNow: ''}
                deadline: {$fromNow: '24 hours'}
                provisionerId: aws-provisioner-v1
                workerType:
                  $if: event.repository.full_name == 'web-platform-tests/wpt'
                  then:
                    wpt-docker-worker
                  else:
                    github-worker
                metadata:
                  name: ${operation.name}
                  description: ${operation.description}
                  owner: ${event.pull_request.user.login}@users.noreply.github.com
                  source: ${event.repository.url}
                payload:
                  image: harjgam/web-platform-tests:0.33
                  maxRunTime: 7200
                  artifacts:
                    public/results:
                      path: /home/test/artifacts
                      type: directory
                  # Fetch the GitHub-provided merge commit (rather than the pull
                  # request branch) so that the tasks simulate the behavior of the
                  # submitted patch after it is merged. Using the merge commit also
                  # simplifies detection of modified files because the first parent
                  # of the merge commit can consistently be used to summarize the
                  # changes.
                  command:
                    - /bin/bash
                    - --login
                    - -c
                    - set -ex;
                      echo "${operation.name}";
                      ~/start.sh
                        ${event.repository.clone_url}
                        refs/pull/${event.number}/merge;
                      cd web-platform-tests;
                      ./tools/ci/run_tc.py
                        --checkout=${operation.checkout}
                        --oom-killer
                        --browser=${browser.name}
                        --channel=${browser.channel}
                        --xvfb
                        ${operation.job_name}
                        ./tools/ci/taskcluster-run.py
                          --commit-range ${operation.diff_base}
                          ${browser.name}
                          --
                          --channel=${browser.channel}
                          ${operation.extra_args};
                extra:
                  github_event: "${event_str}"

      - $map:
          # This is the main point to define new CI checks other than stability checks
        - name: lint
          description: >-
            Lint for wpt-specific requirements
          script: >-
            ./tools/ci/run_tc.py \
              --no-hosts \
              lint \
             ./wpt lint --all
          conditions:
            push
            pull-request
        - name: update built tests
          description: >-
            Ensure test suites that require a build step are updated
          script: >-
            ./tools/ci/run_tc.py \
             --no-hosts \
             update_built \
             tools/ci/ci_built_diff.sh
          conditions:
            pull-request
        - name: tools/ unittests (Python 2)
          description: >-
            Unit tests for tools running under Python 2.7, excluding wptrunner
          script: >-
            export TOXENV=py27;
            export HYPOTHESIS_PROFILE=ci;
            export PY_COLORS=0;
            ./tools/ci/run_tc.py \
              tools_unittest \
              tools/ci/ci_tools_unittest.sh
          conditions:
            push
            pull-request
        - name: tools/ unittests (Python 3)
          description: >-
            Unit tests for tools running under Python 3, excluding wptrunner
          script: >-
            export TOXENV=py36;
            export HYPOTHESIS_PROFILE=ci;
            export PY_COLORS=0;
            sudo apt update -qqy;
            sudo apt install -qqy python3-pip;
            ./tools/ci/run_tc.py \
              tools_unittest \
              tools/ci/ci_tools_unittest.sh
          conditions:
            push
            pull-request
        - name: tools/wpt/ tests
          description: >-
            Integration tests for wpt commands
          script: >-
            export TOXENV=py27;
            sudo apt update -qqy;
            sudo apt install -qqy libnss3-tools;
            ./tools/ci/run_tc.py \
              --oom-killer \
              --browser=firefox \
              --browser=chrome \
              --channel=experimental \
              --xvfb \
              wpt_integration \
              tools/ci/ci_wpt.sh
          conditions:
            pull-request
        - name: resources/ tests
          description: >-
            Tests for testharness.js and other files in resources/
          script: >-
            export TOXENV=py27;
            ./tools/ci/run_tc.py \
              --browser=firefox \
              --xvfb \
              resources_unittest \
              tools/ci/ci_resources_unittest.sh
          conditions:
            pull-request
        - name: infrastructure/ tests
          description: >-
            Smoketests for wptrunner
          script: >-
            sudo apt update -qqy;
            sudo apt install -qqy libnss3-tools libappindicator1 fonts-liberation;
            ./tools/ci/run_tc.py \
              --oom-killer \
              --browser=firefox \
              --browser=chrome \
              --channel=experimental \
              --no-hosts \
              --xvfb \
              wptrunner_infrastructure \
              tools/ci/ci_wptrunner_infrastructure.sh
          conditions:
            pull-request
        each(operation):
          # Note: jsone doesn't short-circuit evaluation so all parts of the conditional are evaluated
          # Accessing properties using the [] notation allows them to evaluate as null in case they're undefined
          # TODO: Allow running pushes on branches other than master
          - $if: ("push" in operation.conditions && tasks_for == "github-push" && event['ref'] == "refs/heads/master") || ("pull-request" in operation.conditions && tasks_for == "github-pull-request" && event['action'] in ['opened', 'reopened', 'synchronize'])
            then:
              $let:
                checkout_ref:
                  $if: tasks_for == "github-push"
                  then:
                    ${event.ref}
                  else:
                    refs/pull/${event.number}/merge
              in:
                taskId: {$eval: 'as_slugid(operation.name)'}
                taskGroupId: {$eval: 'as_slugid("task group")'}
                created: {$fromNow: ''}
                deadline: {$fromNow: '24 hours'}
                provisionerId: aws-provisioner-v1
                workerType:
                  $if: event.repository.full_name == 'web-platform-tests/wpt'
                  then:
                    wpt-docker-worker
                  else:
                    github-worker
                metadata:
                  name: ${operation.name}
                  description: ${operation.description}
                  owner: ${event.sender.login}@users.noreply.github.com
                  source: ${event.repository.url}
                payload:
                  image: harjgam/web-platform-tests:0.33
                  maxRunTime: 7200
                  artifacts:
                    public/results:
                      path: /home/test/artifacts
                      type: directory
                  command:
                    - /bin/bash
                    - --login
                    - -c
                    - set -ex;
                      echo "${operation.name}";
                      ~/start.sh
                        ${event.repository.clone_url}
                        ${checkout_ref};
                      cd ~/web-platform-tests;
                      ${operation.script};
                extra:
                  github_event: "${event_str}"