[Parted-commits] GNU Parted Official Repository: Changes to 'master'

Jim Meyering meyering at alioth.debian.org
Thu Nov 10 18:18:46 UTC 2011


 tests/init.cfg                                   |   10 ++++++++++
 tests/t0210-gpt-resized-partition-entry-array.sh |    1 +
 2 files changed, 11 insertions(+)

New commits:
commit c52cf0b120b0767009dd13be1e90dd12b4198641
Author: Jim Meyering <meyering at redhat.com>
Date:   Thu Nov 10 19:15:29 2011 +0100

    tests: skip a test if Perl's Digest::CRC module is not installed
    
    * tests/init.cfg (require_perl_digest_crc_): New function.
    * tests/t0210-gpt-resized-partition-entry-array.sh: Use it.
    Reported by Keshav P R in
    http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10530/focus=10589

diff --git a/tests/init.cfg b/tests/init.cfg
index c5fbb5e..3109454 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -31,6 +31,16 @@ require_udevadm_settle_()
     || skip_ 'udevadm command is required for this test'
 }
 
+require_perl_digest_crc_()
+{
+  local ok=0
+  local t
+  t=$(perl -le 'use Digest::CRC qw(crc32); print crc32("123")') \
+    && test $t = 2286445522 && ok=1
+  test $ok = 1 \
+    || skip_ "this test requires Perl's Digest::CRC module"
+}
+
 # We need two cleanup functions.  One, cleanup_final_, is sometimes
 # used (transparently) via t-local.sh's modprobe/rmmod code.
 # The other is used e.g., to unmount.
diff --git a/tests/t0210-gpt-resized-partition-entry-array.sh b/tests/t0210-gpt-resized-partition-entry-array.sh
index c3d3ee2..7c8b57f 100755
--- a/tests/t0210-gpt-resized-partition-entry-array.sh
+++ b/tests/t0210-gpt-resized-partition-entry-array.sh
@@ -17,6 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 . "${srcdir=.}/init.sh"; path_prepend_ ../parted $srcdir
+require_perl_digest_crc_
 
 ss=$sector_size_
 



More information about the Parted-commits mailing list