Changeset 1612 for zzuf/trunk/test


Ignore:
Timestamp:
Jan 7, 2007, 6:12:53 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Don't call cat or dd in the testsuite if they're statically linked.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/test/testsuite.sh

    r1601 r1612  
    6565fi
    6666if file /bin/cat | grep -q 'statically linked'; then
    67   echo "error: /bin/cat is statically linked"
    68   exit 1
     67  STATIC_CAT=1
     68fi
     69if file /bin/dd | grep -q 'statically linked'; then
     70  STATIC_DD=1
    6971fi
    7072FAILED=0
     
    8587        OK=1
    8688        MD5=""
    87         check "$ZZOPTS" "cat $file" "cat"
    88         check "$ZZOPTS" "-i cat < $file" "|cat"
     89        check "$ZZOPTS" "$FDCAT $file" "fdcat"
     90        check "$ZZOPTS" "$STREAMCAT $file" "streamcat"
     91        if [ "$STATIC_CAT" = "" ]; then
     92            check "$ZZOPTS" "cat $file" "cat"
     93            check "$ZZOPTS" "-i cat < $file" "|cat"
     94        fi
     95        if [ "$STATIC_CAT" = "" ]; then
     96            check "$ZZOPTS" "dd bs=65536 if=$file" "dd(bs=65536)"
     97            check "$ZZOPTS" "dd bs=1111 if=$file" "dd(bs=1111)"
     98            check "$ZZOPTS" "dd bs=1024 if=$file" "dd(bs=1024)"
     99            check "$ZZOPTS" "dd bs=1 if=$file" "dd(bs=1)"
     100        fi
    89101        case $file in
    90102          *text*)
     
    106118            ;;
    107119        esac
    108         check "$ZZOPTS" "dd bs=65536 if=$file" "dd(bs=65536)"
    109         check "$ZZOPTS" "dd bs=1111 if=$file" "dd(bs=1111)"
    110         check "$ZZOPTS" "dd bs=1024 if=$file" "dd(bs=1024)"
    111         check "$ZZOPTS" "dd bs=1 if=$file" "dd(bs=1)"
    112         check "$ZZOPTS" "$FDCAT $file" "fdcat"
    113         check "$ZZOPTS" "$STREAMCAT $file" "streamcat"
    114120        if [ "$OK" != 1 ]; then
    115121            echo "*** FAILED ***"
Note: See TracChangeset for help on using the changeset viewer.