X-Git-Url: https://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/3d1e13378f4e3cd29bd2698fed4552024f87e9c2..955d03ee99a6b932b8b62bd0cbd7f505efddb9a2:/tests/util/test-init.sh diff --git a/tests/util/test-init.sh b/tests/util/test-init.sh index 5cd161a..52625c0 100644 --- a/tests/util/test-init.sh +++ b/tests/util/test-init.sh @@ -114,6 +114,23 @@ dx_pam_header() END { exit ret }' ${1+"$@"} } +dx_check_pam_md5_() { + dx_pam_header "$1" > "$1.sh" || return + . "./$1.sh" || return + + tail -n +"$ENDHDR" "$1" > "$1.px" || return + echo "$2 $1.px" > "$1.md5" || return + $MD5SUM -c "$1.md5" +} + +dx_check_pam_md5() { + if $HAVE_MD5SUM; then + command_ok_ "$1" dx_check_pam_md5_ "$1" "$2" + else + skip_ "$1" + fi +} + # Variables to run the LBX tools. Default to the build tree, but can also be # set explicitly to test installed tools. : "${LBXTOOL=$builddir/lbxtool$EXEEXT}"