~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/test/encoding/import-generated.sh

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
 
 
3
archive=$1
 
4
 
 
5
[ -d "$archive" ] || echo "usage: $0 <archive>"
 
6
 
 
7
ver=`./ceph-dencoder version`
 
8
echo "version $ver"
 
9
 
 
10
[ -d "$archive/$ver" ] || mkdir "$archive/$ver"
 
11
 
 
12
tmp1=`mktemp /tmp/typ-XXXXXXXXX`
 
13
 
 
14
echo "numgen\ttype"
 
15
for type in `./ceph-dencoder list_types`; do
 
16
 
 
17
    [ -d "$archive/$ver/$type" ] || mkdir "$archive/$ver/$type"
 
18
 
 
19
    num=`./ceph-dencoder type $type count_tests`
 
20
    echo "$num\t$type"
 
21
    max=$(($num - 1))
 
22
    for n in `seq 0 $max`; do
 
23
        ./ceph-dencoder type $type select_test $n encode export $tmp1
 
24
        md=`md5sum $tmp1 | awk '{print $1}'`
 
25
        echo "\t$md"
 
26
        [ -e "$archive/$ver/$md" ] || cp $tmp1 $archive/$ver/$type/$md
 
27
    done
 
28
done
 
29
 
 
30
rm $tmp1
 
 
b'\\ No newline at end of file'