J. Richard Barnette | 9e2b363 | 2014-06-06 18:08:26 -0700 | [diff] [blame] | 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 |
Michael Tang | 0a30d46 | 2016-06-27 11:44:04 -0700 | [diff] [blame] | 24 | from autotest_lib.client.common_lib import utils |
Mike Frysinger | 5d084df | 2019-11-19 18:15:53 -0500 | [diff] [blame] | 25 | print(utils.get_offload_gsuri().strip('/')) |
J. Richard Barnette | 9e2b363 | 2014-06-06 18:08:26 -0700 | [diff] [blame] | 26 | " |
Mike Frysinger | 5d084df | 2019-11-19 18:15:53 -0500 | [diff] [blame] | 27 | GSURI=$(cd .. ; python2 -c "$GET_GSURI") |
J. Richard Barnette | 9e2b363 | 2014-06-06 18:08:26 -0700 | [diff] [blame] | 28 | ( |
| 29 | gsutil ls -R "$GSURI/$DIR/*" | sed "s=^$GSURI/==p" |
| 30 | find $DIR -type f |
| 31 | ) | sort | uniq -u |