diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-06-17 14:01:27 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-06-17 14:03:05 +0200 |
commit | 52b517c6ab962f6c51529f77a0b8226343c850cd (patch) | |
tree | 3cc183c0b9cd8e250c891279e30dc681eba6646b /src | |
parent | 710f8e2acc64cc7944830a8c68db1dcbb63700d8 (diff) | |
download | android-node-v8-52b517c6ab962f6c51529f77a0b8226343c850cd.tar.gz android-node-v8-52b517c6ab962f6c51529f77a0b8226343c850cd.tar.bz2 android-node-v8-52b517c6ab962f6c51529f77a0b8226343c850cd.zip |
Revert "Add --cov code coverage option"
This can be done in user space. EG https://github.com/cloudkick/whiskey
This reverts commit da9b3340ebb7501ebb8a2896d2c259ffabdab340.
This reverts commit b4ff36a41b242c0b379d3c27fb30818de54fe2d4.
Conflicts:
src/node.cc
Diffstat (limited to 'src')
-rw-r--r-- | src/node.cc | 6 | ||||
-rw-r--r-- | src/node.js | 17 |
2 files changed, 0 insertions, 23 deletions
diff --git a/src/node.cc b/src/node.cc index 9d289dba9b..fe39942ac3 100644 --- a/src/node.cc +++ b/src/node.cc @@ -109,7 +109,6 @@ static char *eval_string = NULL; static int option_end_index = 0; static bool use_debug_agent = false; static bool debug_wait_connect = false; -static bool cov = false; static int debug_port=5858; static int max_stack_size = 0; @@ -2093,7 +2092,6 @@ Handle<Object> SetupProcessObject(int argc, char *argv[]) { process->Set(String::NewSymbol("ENV"), ENV); process->Set(String::NewSymbol("pid"), Integer::New(getpid())); - process->Set(String::NewSymbol("cov"), cov ? True() : False()); process->Set(String::NewSymbol("useUV"), use_uv ? True() : False()); // -e, --eval @@ -2237,7 +2235,6 @@ static void PrintHelp() { " --v8-options print v8 command line options\n" " --vars print various compiled-in variables\n" " --max-stack-size=val set max v8 stack size (bytes)\n" - " --cov code coverage; writes node-cov.json \n" " --use-uv use the libuv backend\n" "\n" "Enviromental variables:\n" @@ -2261,9 +2258,6 @@ static void ParseArgs(int argc, char **argv) { if (strstr(arg, "--debug") == arg) { ParseDebugOpt(arg); argv[i] = const_cast<char*>(""); - } else if (!strcmp(arg, "--cov")) { - cov = true; - argv[i] = const_cast<char*>(""); } else if (!strcmp(arg, "--use-uv")) { use_uv = true; argv[i] = const_cast<char*>(""); diff --git a/src/node.js b/src/node.js index dd156eec0c..1ab424473f 100644 --- a/src/node.js +++ b/src/node.js @@ -113,9 +113,6 @@ global.GLOBAL = global; global.root = global; global.Buffer = NativeModule.require('buffer').Buffer; - if (process.cov) { - global.__cov = {}; - } }; startup.globalTimeouts = function() { @@ -364,20 +361,6 @@ var path = NativeModule.require('path'); process.argv[0] = path.join(cwd, process.argv[0]); } - - if (process.cov) { - process.on('exit', function() { - var coverage = JSON.stringify(__cov); - var path = NativeModule.require('path'); - var fs = NativeModule.require('fs'); - var filename = path.join(cwd, 'node-cov.json'); - try { - fs.unlinkSync(filename); - } catch(e) { - } - fs.writeFileSync(filename, coverage); - }); - } }; // Below you find a minimal module system, which is used to load the node |