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