test65: simply skip if ntfs binaries are not present
This commit is contained in:
parent
9584051449
commit
c65ac3136e
1 changed files with 11 additions and 2 deletions
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
void basic_test(void);
|
void basic_test(void);
|
||||||
void bomb(char const *msg);
|
void bomb(char const *msg);
|
||||||
|
void skip(char const *msg);
|
||||||
void create_partition(void);
|
void create_partition(void);
|
||||||
void verify_tools(void);
|
void verify_tools(void);
|
||||||
|
|
||||||
|
@ -56,6 +57,14 @@ basic_test(void)
|
||||||
if (strncmp(file_buf, TESTSTRING, strlen(TESTSTRING))) e(3);
|
if (strncmp(file_buf, TESTSTRING, strlen(TESTSTRING))) e(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
skip(char const *msg)
|
||||||
|
{
|
||||||
|
system("umount " RAMDISK SILENT);
|
||||||
|
printf("%s\n", msg);
|
||||||
|
quit();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
bomb(char const *msg)
|
bomb(char const *msg)
|
||||||
{
|
{
|
||||||
|
@ -100,12 +109,12 @@ verify_tools(void)
|
||||||
subtest = 1;
|
subtest = 1;
|
||||||
status = system("which mkntfs > /dev/null 2>&1");
|
status = system("which mkntfs > /dev/null 2>&1");
|
||||||
if (WEXITSTATUS(status) != 0) {
|
if (WEXITSTATUS(status) != 0) {
|
||||||
bomb("mkntfs not found. Please install ntfsprogs (pkgin in "
|
skip("mkntfs not found. Please install ntfsprogs (pkgin in "
|
||||||
"ntfsprogs)");
|
"ntfsprogs)");
|
||||||
}
|
}
|
||||||
status = system("which ntfs-3g > /dev/null 2>&1");
|
status = system("which ntfs-3g > /dev/null 2>&1");
|
||||||
if (WEXITSTATUS(status) != 0) {
|
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)");
|
"(pkgin in fuse-ntfs-3g-1.1120)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue