#!/bin/bash # Copyright 2015 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Check the image database (txt files) is in sync with the list of files in # platform2/glbench/images. The .txt files live in platform2/glbench that is # part of the platform2 git repo while platform2/glbench/images is in its own # repository. GLBENCH_ROOT=$(dirname "$(readlink -f "$0")") export LC_COLLATE=C main() { local result=0 local db for db in glbench_reference_images glbench_knownbad_images; do find "${GLBENCH_ROOT}/images/${db}" -name '*png' -type f -printf "%f\n" | sort | diff -uN --label "a/${db}.txt" --label "b/${db}.txt" \ "${GLBENCH_ROOT}/${db}.txt" - : $(( result |= $? )) done if [[ ${result} -ne 0 ]]; then cat >&2 <