#include <tools/tools.h>
#include <ccan/talloc/talloc.h>
#include <ccan/str/str.h>
+#include <ccan/foreach/foreach.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <err.h>
#include <string.h>
#include <ctype.h>
-#include "../compulsory_tests/build.h"
+#include "reduce_features.h"
+#include "build.h"
static const char *can_build(struct manifest *m)
{
}
static void check_depends_built_without_features(struct manifest *m,
- bool keep,
unsigned int *timeleft,
struct score *score)
{
+ struct list_head *list;
struct manifest *i;
char *flags;
- flags = talloc_asprintf(score, "%s -I.", cflags);
+ flags = talloc_asprintf(score, "%s %s", cflags,
+ REDUCE_FEATURES_FLAGS);
- list_for_each(&m->deps, i, list) {
- char *errstr = build_submodule(i, flags, COMPILE_NOFEAT);
+ foreach_ptr(list, &m->deps, &m->test_deps) {
+ list_for_each(list, i, list) {
+ char *errstr = build_submodule(i, flags,
+ COMPILE_NOFEAT);
- if (errstr) {
- score->error = talloc_asprintf(score,
- "Dependency %s"
- " did not build:\n%s",
- i->basename, errstr);
- return;
+ if (errstr) {
+ score->error = talloc_asprintf(score,
+ "Dependency %s"
+ " did not"
+ " build:\n%s",
+ i->modname,
+ errstr);
+ return;
+ }
}
}
.name = "Module's CCAN dependencies can be found or built (reduced features)",
.check = check_depends_built_without_features,
.can_run = can_build,
- .needs = "depends_exist"
+ .needs = "depends_build reduce_features"
};
REGISTER_TEST(depends_build_without_features);