From 0d0eec63458aa3c3f907b34407fad9dbed9b4aa8 Mon Sep 17 00:00:00 2001 From: Tom Ritchford Date: Wed, 14 Jan 2015 13:16:33 -0500 Subject: [PATCH] Clean up test documentation and a log message. --- src/ripple/app/ledger/InboundLedgers.cpp | 2 +- test/README.md | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/ripple/app/ledger/InboundLedgers.cpp b/src/ripple/app/ledger/InboundLedgers.cpp index f9670adfa3..bab76bcfbd 100644 --- a/src/ripple/app/ledger/InboundLedgers.cpp +++ b/src/ripple/app/ledger/InboundLedgers.cpp @@ -367,7 +367,7 @@ public: } WriteLog (lsDEBUG, InboundLedger) << - "Sweeped " << stuffToSweep.size () << + "Swept " << stuffToSweep.size () << " out of " << total << " inbound ledgers."; } diff --git a/test/README.md b/test/README.md index 6341605d86..78080934ea 100644 --- a/test/README.md +++ b/test/README.md @@ -22,7 +22,7 @@ This ensures that each test is run against the known To use a running `rippled`, particularly one running in a debugger, follow these steps: -1. Make a copy the example configuration file: `cp -i test/config-example.js test/config.js` +1. Make a copy of the example configuration file: `cp -i test/config-example.js test/config.js` 2. Edit `test/config.js` to select the "debug" server configuration. * Change the existing default server to: `exports.server_default = "debug";` @@ -30,11 +30,11 @@ these steps: 3. Create a `rippled.cfg` file for the tests. 1. Run `npm test`. The tests will fail. **This failure is expected.** - 2. Copy and/or rename the `tmp/server/debug/rippled.cfg` file to somewhere + 2. Copy and/or rename the `tmp/server/debug/rippled.cfg` file to somewhere convenient. 4. Start `rippled` (in a debugger) with command line options -`-a -v --conf `. +`-av --conf `. 5. Set any desired breakpoints in the `rippled` source. @@ -48,18 +48,17 @@ If the relevant `.js` file contains more than one test, change `test(` to (Note that the tests can be run without the debugger, but there will probably be problems with timeouts or reused ledgers). 1. `node_modules/node-inspector/bin/inspector.js &` - 2. `mocha --debug --debug-brk test/` - 3. Browse to http://127.0.0.1:8080/debug?port=5858 in a browser supported + 2. `node node_modules/.bin/mocha --debug --debug-brk test/` + 3. Browse to http://127.0.0.1:8080/debug?port=5858 in a browser supported by [_node-inspector_][node_inspector] (i.e. Chrome or Safari). 8. To run multiple tests, put a breakpoint in the following function: * File `testutils.js` -> function `build_teardown()` -> nested function `teardown()` -> nested series function `stop_server()`. - * When this breakpoint is - hit, stop and restart `rippled`. + * When this breakpoint is hit, stop and restart `rippled`. 9. Use the [_node-inspector UI_][node_inspector_ui] to step through and run -the test(s) until control is handed off to `rippled`. When the request is +the test(s) until control is handed off to `rippled`. When the request is finished control will be handed back to node-inspector, which may or may not stop depending on which breakpoints are set. @@ -76,4 +75,3 @@ default server back to its original value: `exports.server_default = "alpha";`. [genesis_ledger]: https://wiki.ripple.com/Genesis_ledger [node_inspector]: https://wiki.ripple.com/Rippled_build_instructions#node-inspector [node_inspector_ui]: https://github.com/node-inspector/node-inspector/blob/master/README.md -