Browse Source

ccanlint: give a point per compile_ok/compile_fail test

We get a point for every run or api test, rather than 1 point for all of them,
so be consistent.
Rusty Russell 15 years ago
parent
commit
ce6eef4132
1 changed files with 3 additions and 3 deletions
  1. 3 3
      tools/ccanlint/tests/tests_compile.c

+ 3 - 3
tools/ccanlint/tests/tests_compile.c

@@ -131,11 +131,11 @@ static void compile_tests(struct manifest *m, bool keep,
 					 "Compiled successfully with -DFAIL?");
 					 "Compiled successfully with -DFAIL?");
 			return;
 			return;
 		}
 		}
+		score->total++;
 	}
 	}
 
 
 	score->pass = true;
 	score->pass = true;
-	score->total = 2;
-	score->score = 1 + !warnings;
+	score->score = score->total - warnings;
 }
 }
 
 
 static void do_compile_tests(struct manifest *m,
 static void do_compile_tests(struct manifest *m,
@@ -167,7 +167,7 @@ static void do_compile_tests_without_features(struct manifest *m,
 					      unsigned int *timeleft,
 					      unsigned int *timeleft,
 					      struct score *score)
 					      struct score *score)
 {
 {
-	return compile_tests(m, keep, score, "-I. ");
+	compile_tests(m, keep, score, "-I. ");
 }
 }
 
 
 struct ccanlint tests_compile_without_features = {
 struct ccanlint tests_compile_without_features = {