~daniel-mehrmann/e2fsprogs/master

« back to all changes in this revision

Viewing changes to tests/i_e2image/script

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2014-10-27 09:44:27 UTC
  • mfrom: (8.4.29 sid)
  • Revision ID: package-import@ubuntu.com-20141027094427-g56dce6sg7pasdgm
Tags: 1.42.12-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - debian/rules:
      Block pkg-create-dbgsym from operating on this package.
      Build without dietlibc-dev, which is in universe 
      Use the autotools-dev dh addon to update config.guess/config.sub for new
      ports.
  - debian/control:
      Regenerate with ./debian/rules debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
QCOW2_IMG=_image.qcow2
8
8
QCOW2_TO_RAW=_image.qcow2.raw
9
9
OUT=$test_name.log
10
 
MD5=$SRCDIR/$test_name/$test_name.md5
11
 
MD5_TMP=$test_name.md5.tmp
 
10
CRC=$SRCDIR/$test_name/$test_name.crc
 
11
CRC_TMP=$test_name.crc.tmp
12
12
 
13
 
rm -f $test_name/_image.* $MD5_TMP $OUT >/dev/null 2>&1
 
13
rm -f $test_name/_image.* $CRC_TMP $OUT >/dev/null 2>&1
14
14
 
15
15
(
16
16
for i in $ORIG_IMAGES; do
17
17
        ORIG_IMG=$test_name/$i
18
 
        echo $ORIG_IMG >> $MD5_TMP
 
18
        echo $ORIG_IMG >> $CRC_TMP
19
19
 
20
20
        bunzip2 < $SRCDIR/$ORIG_IMG.bz2 > $i
21
 
        md5sum $i >> $MD5_TMP
 
21
        echo "$($CRCSUM $i)     $i" >> $CRC_TMP
22
22
 
23
23
        rm -f $RAW_IMG
24
24
        echo "e2image -r $ORIG_IMG $RAW_IMG"
25
25
        $E2IMAGE      -r $i $RAW_IMG
26
 
        md5sum $RAW_IMG >> $MD5_TMP
 
26
        echo "$($CRCSUM $RAW_IMG)       $RAW_IMG"  >> $CRC_TMP
27
27
 
28
28
        echo "e2image -Q $ORIG_IMG $QCOW2_IMG"
29
29
        $E2IMAGE      -Q $i $QCOW2_IMG
30
 
        md5sum $QCOW2_IMG >> $MD5_TMP
 
30
        echo "$($CRCSUM $QCOW2_IMG)     $QCOW2_IMG"  >> $CRC_TMP
31
31
 
32
32
        rm -f $QCOW2_TO_RAW
33
33
        echo "e2image -r $QCOW2_IMG $QCOW2_TO_RAW"
34
34
        $E2IMAGE      -r $i $QCOW2_TO_RAW
35
 
        md5sum $QCOW2_TO_RAW >> $MD5_TMP
 
35
        echo "$($CRCSUM $QCOW2_TO_RAW)  $QCOW2_TO_RAW" >> $CRC_TMP
36
36
 
37
37
        rm -f $i
38
38
done
39
39
) >> $OUT 2>&1
40
40
 
41
 
echo "md5sums:" >> $OUT
42
 
cat $MD5_TMP >> $OUT
 
41
echo "checksum:" >> $OUT
 
42
cat $CRC_TMP >> $OUT
43
43
echo "" >> $OUT
44
44
 
45
 
diff $MD5 $MD5_TMP >> $OUT 2>&1
 
45
diff $CRC $CRC_TMP >> $OUT 2>&1
46
46
 
47
47
if [ $? -eq 0 ]; then
48
48
        echo "$test_name: $test_description: ok"
52
52
        echo "$test_name: $test_description: failed"
53
53
fi
54
54
 
55
 
rm -f _image.* $MD5_TMP >/dev/null 2>&1
 
55
rm -f _image.* $CRC_TMP >/dev/null 2>&1
56
56
 
57
57
else #if test -x $E2IMAGE_EXE; then
58
58
        echo "$test_name: $test_description: skipped"