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 8# A script to find all cpu_or_gpu_values that don't get run as a job for the 9# given filter passed in as the first argument. The filter is a boolean query 10# against columns in /tmp/alljobs.csv, such as '$vulkan == "true"'. 11set -e 12 13if [ $# -ne 1 ]; then 14 echo "$0 <filter>" 15 echo "Example: $0 '\$vulkan == \"true\"'" 16 exit 1 17fi 18 19FILTER=$1 20 21# Ensure /tmp/alljobs.csv has been created. 22./create-alljobs.sh 23 24# Extract out the list of all cpu_or_gpu_values and associated model name. 25./axis.sh cpu_or_gpu_value,model 26 27# Find all cpus or gpus that we don't Test or Perf with Vulkan by creating a 28# list of all the cpu_or_gpu_values associated with Vulkan tests, and then print 29# all the rows in /tmp/cpu_or_gpu_value,model.csv that don't match that list. 30# 31# The last join with --np means don't print matches, and --ul specifies to print 32# values that are unmatched on the left hand side of the join, i.e. from the 33# /tmp/cpu_or_gpu_value,model.csv file. 34mlr --csv filter "${FILTER}" /tmp/alljobs.csv | \ 35mlr --csv cut -f cpu_or_gpu_value,model | \ 36mlr --csv sort -f cpu_or_gpu_value | \ 37mlr --csv uniq -f cpu_or_gpu_value | \ 38mlr --csv join -f /tmp/cpu_or_gpu_value,model.csv -j cpu_or_gpu_value --ul --np 39