[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Otpasswd-talk] Testcase code coverage
From: |
Tomasz bla Fortuna |
Subject: |
[Otpasswd-talk] Testcase code coverage |
Date: |
Thu, 24 Dec 2009 15:55:42 +0100 |
Hi,
modified cmake a bit to include some additional tests accessible via
make test command (most of them require state db to exists)
ADD_TEST(internal_check ./otpasswd --check)
ADD_TEST(state_print1 ./otpasswd -t 'G10[123]')
ADD_TEST(state_print2 ./otpasswd -t '[123]')
ADD_TEST(state_print3 ./otpasswd -t '123')
ADD_TEST(state_print4 ./otpasswd -l '[123]')
ADD_TEST(state_skip1 ./otpasswd -s '[3]')
ADD_TEST(state_prompt ./otpasswd -p 'current')
ADD_TEST(state_flag1 ./otpasswd -f dont-show)
ADD_TEST(state_flag2 ./otpasswd -f codelength-12)
ADD_TEST(state_flag3 ./otpasswd -f alphabet-extended)
# Tests which should fail (but won't return incorrect status)
ADD_TEST(fail_ok1 ./otpasswd -l '[0]')
ADD_TEST(fail_ok2 ./otpasswd -l '0')
ADD_TEST(fail_ok3 ./otpasswd -t '340282366920938463463374607431768211457')
ADD_TEST(fail_ok4 ./otpasswd -s '-5')
ADD_TEST(should_fail1 ./otpasswd -a '___')
And added PROFILE option (cmake -DPROFILE=1 .) which enabled profiling.
There's a script in tests/coverage.sh which rebuilds project using this
parameter, runs tests and generates coverage info.
Current test coverage can be seen here: http://temp.thera.be/lcov/
Which clearly shows we need some testcases. ;-)
Cheers,
--
Tomasz bla Fortuna
jid: bla(at)af.gliwice.pl
pgp: 0x90746E79 @ pgp.mit.edu
www: http://bla.thera.be
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Otpasswd-talk] Testcase code coverage,
Tomasz bla Fortuna <=