Debian Codegraph @

infra/bots/analysis/create-alljobs.sh

raw
1 #!/bin/bash
2 # Copyright 2021 Google Inc.
3 #
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 # Create a file /tmp/alljobs.csv by parsing jobs.json.
8
9 set -e
10
11 # Write the starting set of headers.
12 echo Type,os,compiler,model,cpu_or_gpu,cpu_or_gpu_value,arch,configuration,test_filter,extra > /tmp/alljobs.csv
13
14 # Extract the CSV values from the jobs.json file.
15 # The seds parse up the job names into columns, ensuring that every column has a value.
16 cat ../jobs.json | jq .[] -r | grep "^[Perf|Test]" | sed "s#-#,#g" | sed "s#All\$#All,none#g" >> /tmp/alljobs.csv
17
18 # Add the vulkan column.
19 mlr --csv -I put '$vulkan=$extra =~ "Vulkan"' /tmp/alljobs.csv
20
21 # Add the metal column.
22 mlr --csv -I put '$metal=$extra =~ "Metal"' /tmp/alljobs.csv
23
24 # Validate the output file is a valid CSV file.
25 mlr --icsv check /tmp/alljobs.csv