You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2021/04/02 14:29:03 UTC

[GitHub] [qpid-proton] jiridanek commented on pull request #303: PROTON-2357: Improve test coverage in url.cpp

jiridanek commented on pull request #303:
URL: https://github.com/apache/qpid-proton/pull/303#issuecomment-812554756


   > Now I wonder if there is any way to run make coverage for a single file too?
   
   Here's the finest-grain way of running tests that is available (that I know of): Use `ctest -VV -N -R cpp-url-test` to ask ctest to print you the test command. Then add --help at the end, and you'd get a help text from Catch1:
   
   ```
   $ /nix/store/33abxyajzdaggfbcrxzzpslc4582r84l-python3-3.7.9/bin/python3.7 "/home/jdanek/repos/qpid/qpid-proton/scripts/env.py" "--" "TEST_EXE_PREFIX=/nix/store/7kw3730vr14phxld7l0dm7jslkac8fly-valgrind-3.16.1/bin/valgrind --tool=memcheck --leak-check=full --error-exitcode=42 --quiet --suppressions=/home/jdanek/repos/qpid/qpid-proton/tests/valgrind.supp" "PN_SASL_CONFIG_PATH=/home/jdanek/repos/qpid/qpid-proton/cmake-build-debug/cpp/testdata/sasl-conf" "/nix/store/7kw3730vr14phxld7l0dm7jslkac8fly-valgrind-3.16.1/bin/valgrind" "--tool=memcheck" "--leak-check=full" "--error-exitcode=42" "--quiet" "--suppressions=/home/jdanek/repos/qpid/qpid-proton/tests/valgrind.supp" "/home/jdanek/repos/qpid/qpid-proton/cmake-build-debug/cpp/cpp-test" "[url]" --help
   
   Catch v1.12.2
   usage:
     cpp-test [<test name, pattern or tags> ...] [options]
   
   where options are: 
     -?, -h, --help                         display usage information
     -l, --list-tests                       list all/matching test cases
     -t, --list-tags                        list all/matching tags
     -s, --success                          include successful tests in output
     -b, --break                            break into debugger on failure
     -e, --nothrow                          skip exception tests
     -i, --invisibles                       show invisibles (tabs, newlines)
     -o, --out <filename>                   output filename
     -r, --reporter <name>                  reporter to use (defaults to console)
     -n, --name <name>                      suite name
     -a, --abort                            abort at first failure
     -x, --abortx <no. failures>            abort after x failures
     -w, --warn <warning name>              enable warnings
     -d, --durations <yes|no>               show test durations
     -f, --input-file <filename>            load test names to run from a file
     -#, --filenames-as-tags                adds a tag for the filename
     -c, --section <section name>           specify section to run
     --list-test-names-only                 list all/matching test cases names only
     --list-extra-info                      list all/matching test cases with more
                                            info
     --list-reporters                       list all reporters
     --order <decl|lex|rand>                test case order (defaults to decl)
     --rng-seed <'time'|number>             set a specific seed for random numbers
     --force-colour                         force colourised output (deprecated)
     --use-colour <yes|no>                  should output be colourised
     --libidentify                          report name and version according to
                                            libidentify standard
     --wait-for-keypress <start|exit|both>  waits for a keypress before exiting
   
   For more detail usage please see the project docs
   ```
   
   Similarly, if you run `VERBOSE=1 make coverage`, it will print you what commands it is running.
   
   To get a clean coverage result, you have to delete the temporary files that contain previously recorded coverage, then run a test (the command from ctest), and then run the command generating the html report (from make coverage).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org