#include <ccan/tal/path/path.h>
#include <ccan/strmap/strmap.h>
-struct ccanlint_map {
- STRMAP_MEMBERS(struct ccanlint *);
-};
+typedef STRMAP(struct ccanlint *) ccanlint_map_t;
int verbose = 0;
-static struct ccanlint_map tests;
+static ccanlint_map_t tests;
bool safe_mode = false;
bool keep_results = false;
bool non_ccan_deps = false;
}
static bool check_names(const char *member, struct ccanlint *c,
- struct ccanlint_map *names)
+ ccanlint_map_t *names)
{
if (!strmap_add(names, c->name, c))
err(1, "Duplicate name %s", c->name);
static void init_tests(void)
{
- struct ccanlint_map names;
+ ccanlint_map_t names;
struct ccanlint **table;
size_t i, num;
if (deps_fail_ignore && non_ccan_deps && build_failed) {
comment = " (missing non-ccan dependencies?)";
run.pass = true;
+ } else if (!run.pass) {
+ comment = " FAIL!";
}
printf("%sTotal score: %u/%u%s\n",
prefix, run.score, run.total, comment);
if (argc == 1)
dir = cwd;
else
- dir = path_join(NULL, cwd, argv[1]);
+ dir = path_simplify(NULL, take(path_join(NULL, cwd, argv[1])));
ccan_dir = find_ccan_dir(dir);
if (!ccan_dir)