Commit e5e620e2 authored by Rusty Russell's avatar Rusty Russell

ccanlint: add "_info ported" (for ccan/altstack).

If _info handles the arg "ported" it should print out 1 or 0; 0 means
it can't be compiled/run/tested on this platform.  This lets ccanlint
easily skip such modules.
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 36a15d7d
...@@ -122,5 +122,13 @@ int main(int argc, char *argv[]) ...@@ -122,5 +122,13 @@ int main(int argc, char *argv[])
if (strcmp(argv[1], "depends") == 0) if (strcmp(argv[1], "depends") == 0)
return 0; return 0;
if (strcmp(argv[1], "ported") == 0) {
#if __x86_64__
printf("1\n");
#else
printf("0\n");
#endif
}
return 1; return 1;
} }
...@@ -108,7 +108,7 @@ struct ccanlint depends_build = { ...@@ -108,7 +108,7 @@ struct ccanlint depends_build = {
.name = "Module's CCAN dependencies can be found or built", .name = "Module's CCAN dependencies can be found or built",
.check = check_depends_built, .check = check_depends_built,
.can_run = can_build, .can_run = can_build,
.needs = "depends_exist test_depends_exist" .needs = "depends_exist test_depends_exist info_ported"
}; };
REGISTER_TEST(depends_build); REGISTER_TEST(depends_build);
...@@ -70,7 +70,7 @@ struct ccanlint main_header_compiles = { ...@@ -70,7 +70,7 @@ struct ccanlint main_header_compiles = {
.name = "Modules main header compiles", .name = "Modules main header compiles",
.check = check_includes_build, .check = check_includes_build,
.can_run = can_build, .can_run = can_build,
.needs = "depends_exist main_header_exists" .needs = "depends_exist main_header_exists info_ported"
}; };
REGISTER_TEST(main_header_compiles); REGISTER_TEST(main_header_compiles);
...@@ -88,7 +88,7 @@ struct ccanlint objects_build = { ...@@ -88,7 +88,7 @@ struct ccanlint objects_build = {
.compulsory = true, .compulsory = true,
.check = check_objs_build, .check = check_objs_build,
.can_run = can_build, .can_run = can_build,
.needs = "depends_exist" .needs = "depends_exist info_ported"
}; };
REGISTER_TEST(objects_build); REGISTER_TEST(objects_build);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment