diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:25 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:25 -0800 |
commit | ee88353f0c125cdc2ee7a56187fde3a10e4ff918 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /test-gen.lib | |
parent | f4a0b4d282a1718ac6e3fff10d02aa877e294324 (diff) | |
download | genext2fs-ee88353f0c125cdc2ee7a56187fde3a10e4ff918.tar.gz |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'test-gen.lib')
-rw-r--r-- | test-gen.lib | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/test-gen.lib b/test-gen.lib deleted file mode 100644 index c6e73b9..0000000 --- a/test-gen.lib +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -# These routines contain the filesystem generation code. -# This code is sourced by the other scripts so that digest -# generation is consistent. - -# dgen - Exercises the -d directory option of genext2fs -# Creates an image with a file of given size -# Usage: dgen file-size number-of-blocks -dgen () { - size=$1; blocks=$2 - rm -rf test - mkdir -p test - cd test - if [ x$size = x0 ]; then - > file.$1 - else - dd if=/dev/zero of=file.$1 bs=$size count=1 2>/dev/null - fi - chmod 777 file.$1 - TZ=UTC-11 touch -t 200502070321.43 file.$1 . - cd .. - ./genext2fs -N 17 -b $blocks -d test -f -q ext2.img -} - -# fgen - Exercises the -f spec-file option of genext2fs -# Creates an image with the devices mentioned in the given spec file -# Usage: fgen spec-file number-of-blocks -fgen () { - fname=$1; blocks=$2; - mkdir -p test - cp $fname test - TZ=UTC-11 touch -t 200502070321.43 test/$fname - ./genext2fs -N 92 -b $blocks -D test/$fname -f ext2.img -} - -# gen_cleanup - Remove the files generated by the above functions -# Usage: gen_cleanup -gen_cleanup () { - rm -rf ext2.img test -} - -# calc_digest - Return the MD5 digest of the test image -# Usage: calc_digest -calc_digest () { - digest=`md5sum ext2.img 2>/dev/null | cut -f 1 -d " "` - if [ x$digest != x ] ; then - echo $digest - else - digest=`md5 ext2.img 2>/dev/null | cut -f 4 -d " "` - echo $digest - fi -} - -LC_ALL=C -export LC_ALL |