Browse Source

ccanlint: tests_compile_coverage needs GCC.

We only support gcc/gcov so far.
Rusty Russell 14 years ago
parent
commit
1bfd1464af
1 changed files with 4 additions and 0 deletions
  1. 4 0
      tools/ccanlint/tests/tests_compile_coverage.c

+ 4 - 0
tools/ccanlint/tests/tests_compile_coverage.c

@@ -20,12 +20,16 @@
 /* Note: we already test safe_mode in run_tests.c */
 /* Note: we already test safe_mode in run_tests.c */
 static const char *can_run_coverage(struct manifest *m)
 static const char *can_run_coverage(struct manifest *m)
 {
 {
+#ifdef __GNUC__
 	unsigned int timeleft = default_timeout_ms;
 	unsigned int timeleft = default_timeout_ms;
 	char *output;
 	char *output;
 
 
 	if (!run_command(m, &timeleft, &output, "gcov -h"))
 	if (!run_command(m, &timeleft, &output, "gcov -h"))
 		return talloc_asprintf(m, "No gcov support: %s", output);
 		return talloc_asprintf(m, "No gcov support: %s", output);
 	return NULL;
 	return NULL;
+#else
+	return "No coverage support for this compiler";
+#endif
 }
 }
 
 
 static void cov_compile(const void *ctx,
 static void cov_compile(const void *ctx,