test65: simply skip if ntfs binaries are not present

This commit is contained in:
Thomas Veerman 2012-11-27 10:19:26 +00:00
parent 9584051449
commit c65ac3136e

View file

@ -18,6 +18,7 @@
void basic_test(void);
void bomb(char const *msg);
void skip(char const *msg);
void create_partition(void);
void verify_tools(void);
@ -56,6 +57,14 @@ basic_test(void)
if (strncmp(file_buf, TESTSTRING, strlen(TESTSTRING))) e(3);
}
void
skip(char const *msg)
{
system("umount " RAMDISK SILENT);
printf("%s\n", msg);
quit();
}
void
bomb(char const *msg)
{
@ -100,12 +109,12 @@ verify_tools(void)
subtest = 1;
status = system("which mkntfs > /dev/null 2>&1");
if (WEXITSTATUS(status) != 0) {
bomb("mkntfs not found. Please install ntfsprogs (pkgin in "
skip("mkntfs not found. Please install ntfsprogs (pkgin in "
"ntfsprogs)");
}
status = system("which ntfs-3g > /dev/null 2>&1");
if (WEXITSTATUS(status) != 0) {
bomb("ntfs-3g not found. Please install fuse-ntfs-3g-1.1120 "
skip("ntfs-3g not found. Please install fuse-ntfs-3g-1.1120 "
"(pkgin in fuse-ntfs-3g-1.1120)");
}
}