X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=tests%2Ftest-imagex-capture_and_apply;h=caa4d47ea8abb7b1f12fddf05763fae3a17a1251;hb=b61e9afca45dacd9baefbcfa17dbea2af75259b8;hp=5f1bc017e3a840ed8c1031a49ba82fe4d4e68de6;hpb=dea7a9976aa1d440e63571926e0b30e145d62dfa;p=wimlib diff --git a/tests/test-imagex-capture_and_apply b/tests/test-imagex-capture_and_apply index 5f1bc017..caa4d47e 100755 --- a/tests/test-imagex-capture_and_apply +++ b/tests/test-imagex-capture_and_apply @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Test capturing and applying a WIM image in the normal (non-NTFS) capture mode # @@ -9,9 +9,9 @@ # Also, test if the capture configuration file works correctly. set -e -srcdir=${srcdir:-.} -srcdir=`realpath $srcdir` cd tests +srcdir="${srcdir:-.}/.." +srcdir="$(cd $srcdir; pwd)" imagex() { echo "imagex $@" @@ -80,7 +80,7 @@ do_test() { # Can we split the WIM, apply the split WIM, join the split WIM, # and apply the joined WIM, and get the same results every time? - if ! imagex split test.wim test.swm 0.01M; then + if ! imagex split test.wim test.swm 0.01; then error "Failed to split WIM" fi if ! imagex apply test.swm 1 out.dir --ref "test*.swm" ; then @@ -114,19 +114,23 @@ do_test() { done } -msg() { +__msg() { echo "--------------------------------------------------------------------" - echo "Testing image capture and application of directory containing $1" + echo $1 echo "--------------------------------------------------------------------" } +msg() { + __msg "Testing image capture and application of directory containing $1" +} + cleanup init . $srcdir/tests/common_tests.sh # Make sure exclusion list works -msg "Testing default capture configuration file" +__msg "Testing default capture configuration file" touch in.dir/hiberfil.sys mkdir -p "in.dir/System Volume Information/subdir" imagex capture in.dir test.wim