btrfs-progs: tests: fix TEST_LOG=dump in convert tests
authorDavid Sterba <dsterba@suse.com>
Tue, 29 Aug 2017 15:42:28 +0000 (17:42 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 8 Sep 2017 14:15:05 +0000 (16:15 +0200)
Test failure in convert tests with log dump does not happen because
_fail is called before that and exits. Other test types are ok.

Signed-off-by: David Sterba <dsterba@suse.com>
tests/convert-tests.sh

index 42479df..57fd925 100755 (executable)
@@ -40,10 +40,10 @@ run_one_test() {
                # Only support custom test scripts
                ./test.sh
                if [ $? -ne 0 ]; then
-                       _fail "test failed for case $testname"
                        if [[ $TEST_LOG =~ dump ]]; then
                                cat "$RESULTS"
                        fi
+                       _fail "test failed for case $testname"
                fi
        else
                _fail "custom test script not found"