X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=tests%2Ftest-imagex-ntfs;h=66c39de4846bb8d90060eec53b112bbb38427e8b;hb=40beb80283a2df7af88c8359ca41adb814585e9a;hp=73cda082a3296ed5d993524e23dce7044533248d;hpb=f7a9a626a3332d1f4b6c7035a55e41884cdf90dd;p=wimlib diff --git a/tests/test-imagex-ntfs b/tests/test-imagex-ntfs index 73cda082..66c39de4 100755 --- a/tests/test-imagex-ntfs +++ b/tests/test-imagex-ntfs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script does some sanity testing of the 'imagex' program, specifically # checking the NTFS capture and apply features. @@ -9,19 +9,22 @@ # remain mounted. set -e -srcdir=`pwd` cd tests +srcdir="${srcdir:-.}/.." +srcdir="$(cd $srcdir; pwd)" +. "$srcdir/tests/tests-common.sh" imagex() { ../imagex $@ > /dev/null } __do_unmount() { - if ! fusermount -u $1; then + if ! fusermount -z -u $1; then error "Failed to unmount \"$1\"" fi } + do_unmount() { if mountpoint $1 &> /dev/null; then __do_unmount $1