Magellan Linux

Diff of /tags/grubby-8_34/test.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1727 by niro, Sat Feb 18 00:57:49 2012 UTC revision 1741 by niro, Sat Feb 18 01:04:10 2012 UTC
# Line 74  oneTest() { Line 74  oneTest() {
74  oneDisplayTest() {  oneDisplayTest() {
75      typeset mode=$1 cfg=test/$2 correct=test/results/$3      typeset mode=$1 cfg=test/$2 correct=test/results/$3
76      shift 3      shift 3
77        local BIO="--bad-image-okay"
78        if [ "$1" == "--bad-image-bad" ]; then
79            BIO=""
80            shift
81        fi
82    
83      echo "$testing ... $mode $cfg $correct"      echo "$testing ... $mode $cfg $correct"
84      runme=( ./grubby "$mode" --bad-image-okay -c "$cfg" "$@" )      runme=( ./grubby "$mode" $BIO -c "$cfg" "$@" )
85      if "${runme[@]}" | cmp "$correct" > /dev/null; then      if "${runme[@]}" |& cmp "$correct" > /dev/null; then
86   (( pass++ ))   (( pass++ ))
87   if $opt_verbose; then   if $opt_verbose; then
88      echo -------------------------------------------------------------      echo -------------------------------------------------------------
89      echo -n "PASS: "      echo -n "PASS: "
90      printf "%q " "${runme[@]}"; echo      printf "%q " "${runme[@]}"; echo
91      "${runme[@]}" | diff -U30 "$cfg" -      "${runme[@]}" |& diff -U30 "$cfg" -
92      echo      echo
93   fi   fi
94      else      else
# Line 91  oneDisplayTest() { Line 96  oneDisplayTest() {
96   echo -------------------------------------------------------------   echo -------------------------------------------------------------
97   echo -n "FAIL: "   echo -n "FAIL: "
98   printf "%q " "${runme[@]}"; echo   printf "%q " "${runme[@]}"; echo
99   "${runme[@]}" | diff -U30 "$correct" -   "${runme[@]}" |& diff -U30 "$correct" -
100   echo   echo
101      fi      fi
102  }  }
# Line 374  testing="GRUB2 display default index" Line 379  testing="GRUB2 display default index"
379  grub2DisplayTest grub2.1 defaultindex/0 --default-index  grub2DisplayTest grub2.1 defaultindex/0 --default-index
380  grub2DisplayTest grub2.2 defaultindex/0 --default-index  grub2DisplayTest grub2.2 defaultindex/0 --default-index
381    
382  testing="GRUB display default title"  testing="GRUB2 display default title"
383  grub2DisplayTest grub2.1 defaulttitle/g2.1 --default-title  grub2DisplayTest grub2.1 defaulttitle/g2.1 --default-title
384  grub2DisplayTest grub2.2 defaulttitle/g2.2 --default-title  grub2DisplayTest grub2.2 defaulttitle/g2.2 --default-title
385    
386    testing="GRUB2 display debug failure"
387    grub2DisplayTest grub2.1 debug/g2.1 --bad-image-bad --boot-filesystem=/boot --default-kernel --debug
388    testing="GRUB2 display debug success"
389    grub2DisplayTest grub2.1 debug/g2.1.2 --boot-filesystem=/boot --default-kernel --debug
390    
391  testing="YABOOT add kernel"  testing="YABOOT add kernel"
392  yabootTest yaboot.1 add/y1.1 --copy-default --boot-filesystem=/ --add-kernel=/boot/new-kernel  \  yabootTest yaboot.1 add/y1.1 --copy-default --boot-filesystem=/ --add-kernel=/boot/new-kernel  \
393      --title=newtitle      --title=newtitle

Legend:
Removed from v.1727  
changed lines
  Added in v.1741