1#!/bin/bash
2
3CMD=$(basename $0)
4usage() {
5  echo "usage: $CMD <job-directory>" >&2
6  exit 1
7}
8
9if [ $# -ne 1 ]; then
10  usage
11fi
12
13AUTOTEST=/usr/local/autotest/results
14DIR=$1
15if [ ! -d $AUTOTEST/$DIR ]; then
16  echo "$DIR is not a directory in $AUTOTEST" >&2
17  usage
18fi
19
20cd $AUTOTEST
21
22GET_GSURI="
23import common
24from autotest_lib.client.common_lib import global_config
25print global_config.global_config.get_config_value(
26        'CROS', 'results_storage_server').strip('/')
27"
28GSURI=$(cd .. ; python -c "$GET_GSURI")
29(
30  gsutil ls -R "$GSURI/$DIR/*" | sed "s=^$GSURI/==p"
31  find $DIR -type f
32) | sort | uniq -u
33