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