[PATCH] tests: Conditionally skip UUID tests.
-- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 75 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
Richard W.M. Jones wrote: ...
diff --git a/capitests/Makefile.am b/capitests/Makefile.am ... +# Old version of e2fsprogs which didn't support UUIDs? +e2fs_uuid_not_supported := $(shell r=1; if test -x ../initramfs/sbin/mkswap; then if ../initramfs/sbin/mkswap --help 2>&1 | grep -sq -- -U; then r=0; fi; fi; echo $$r)
Looks good. However it'd be even tidier, and easier to read with line lengths < 80: e2fs_uuid_not_supported := \ $(shell r=1; if test -x ../initramfs/sbin/mkswap; then \ if ../initramfs/sbin/mkswap --help 2>&1 \ | grep -sq -- -U; then r=0; fi; fi; echo $$r) In case you're comfortable with cmd && cmd2 && ... notation, here's another way to write it using slightly less syntax: e2fs_uuid_not_supported := \ $(shell r=1; \ test -x ../initramfs/sbin/mkswap \ && ../initramfs/sbin/mkswap --help 2>&1 | grep -sq -- -U \ && r=1; echo $$r)
participants (2)
-
Jim Meyering -
Richard W.M. Jones