X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=tests%2Ftest-imagex-ntfs;h=66c39de4846bb8d90060eec53b112bbb38427e8b;hb=eb61b7cad6d1eef756d6e6d08c62af1294cd5ebb;hp=40c005cc9feccf943d2033d98454c9263e332c19;hpb=d0e7f039e4ab206b9fd973c983e3fb841fcd2bf2;p=wimlib diff --git a/tests/test-imagex-ntfs b/tests/test-imagex-ntfs index 40c005cc..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,20 +9,22 @@ # remain mounted. set -e -srcdir=${srcdir:-.} -srcdir=`realpath $srcdir` 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