+ if (strrchr(updir, '/'))
+ *strrchr(updir, '/') = '\0';
+
+ /* We may need libtap for testing, unless we're "tap" */
+ if (streq(m->basename, "tap")) {
+ needs_tap = false;
+ } else if (list_empty(&m->run_tests) && list_empty(&m->api_tests)) {
+ needs_tap = false;
+ } else {
+ needs_tap = true;
+ }