btrfs-progs: tests: build prerequisities, btrfs-image and btrfs
Build required utilities from the main Makefile and just check in the test scripts. Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
6856b0a4ca
commit
4f9d8b1ffa
2
Makefile
2
Makefile
|
@ -140,7 +140,7 @@ $(BUILDDIRS):
|
|||
@echo "Making all in $(patsubst build-%,%,$@)"
|
||||
$(Q)$(MAKE) $(MAKEOPTS) -C $(patsubst build-%,%,$@)
|
||||
|
||||
test:
|
||||
test: btrfs btrfs-convert btrfs-image btrfs-corrupt-block
|
||||
$(Q)for t in $(TESTS); do \
|
||||
echo " [TEST] $$t"; \
|
||||
bash tests/$$t || exit 1; \
|
||||
|
|
|
@ -22,10 +22,19 @@ run_check()
|
|||
"$@" >> $RESULT 2>&1 || _fail "failed: $@"
|
||||
}
|
||||
|
||||
check_prereq()
|
||||
{
|
||||
if ! [ -f $here/$1 ]; then
|
||||
_fail "Failed prerequisities: $1";
|
||||
fi
|
||||
}
|
||||
|
||||
rm -f $RESULT
|
||||
|
||||
# test rely on corrupting blocks tool
|
||||
run_check make btrfs-corrupt-block
|
||||
check_prereq btrfs-corrupt-block
|
||||
check_prereq btrfs-image
|
||||
check_prereq btrfs
|
||||
|
||||
# Some broken filesystem images are kept as .img files, created by the tool
|
||||
# btrfs-image, and others are kept as .tar.xz files that contain raw filesystem
|
||||
|
|
Loading…
Reference in New Issue