Procházet zdrojové kódy

Allow code coverage profiling with a parameter and allow bypassing of the tests

Caleb James DeLisle před 8 roky
rodič
revize
ff3aa3efee
1 změnil soubory, kde provedl 8 přidání a 1 odebrání
  1. 8 1
      node_build/make.js

+ 8 - 1
node_build/make.js

@@ -74,6 +74,11 @@ Builder.configure({
         '-D', 'PARANOIA=1'
     );
 
+    if (process.env['GCOV']) {
+        builder.config.cflags.push('-fprofile-arcs', '-ftest-coverage');
+        builder.config.ldflags.push('-fprofile-arcs', '-ftest-coverage');
+    }
+
     var android = /android/i.test(builder.config.gcc);
 
     if (process.env['TESTING']) {
@@ -424,7 +429,9 @@ Builder.configure({
     if (process.env['REMOTE_TEST']) {
         testRunner = TestRunner.remote(process.env['REMOTE_TEST'], ['all']);
     }
-    builder.runTest(testcjdroute, testRunner);
+    if (!process.env['NO_TEST']) {
+        builder.runTest(testcjdroute, testRunner);
+    }
 
 }).success(function (builder, waitFor) {