Commit Graph

40 Commits

Author SHA1 Message Date
Andrew Bettison
04b95d2590 Merge branch 'andrew' into 'master' 2012-07-25 18:04:16 +09:30
Andrew Bettison
ba69ae616f Improve test framework: fix tfw_core_backtrace
Was not actually printing a gdb backtrace
2012-07-25 17:02:57 +09:30
Andrew Bettison
6b07b4c22e Improve test framework: support gdb core dumps
Add --core-backtrace option to execute() function
Add tfw_core_backtrace() function
2012-07-24 15:38:36 +09:30
Andrew Bettison
10fd1c1fc6 Improve test framework: log message from assertStdoutIs 2012-07-23 15:18:11 +09:30
Andrew Bettison
117a3191ab Fix test framework: shorter tmp dir name
So that socket names do not exceed system limit
Also add some comments explaining a few obscure points
2012-07-18 16:29:56 +09:30
Andrew Bettison
c8a538337d Improve test framework: do not use $BASHPID
Also do not allow -j and --verbose to be given together
2012-07-18 14:44:28 +09:30
Andrew Bettison
801a0fb7b0 Improve test framework: --filter by test numbers 2012-07-16 18:40:30 +09:30
Andrew Bettison
e67d09cf11 Fix bug in test framework output 2012-07-16 18:40:30 +09:30
Andrew Bettison
cc39a02443 Improve test framework
Add 'wait_until' primitive
Improve option parsing
2012-07-11 16:51:29 +09:30
Andrew Bettison
17733c631c Improve test framework: clearer log messages 2012-07-06 13:18:43 +09:30
Andrew Bettison
7eb4293491 Improve test framework: receive TFW_LOGDIR env var
Always place test logs in servald build root, regardless of current
working directory
2012-07-04 14:54:37 +09:30
Andrew Bettison
f76ef9a7e6 Improve test framework: log timestamps 2012-07-02 12:26:58 +09:30
Andrew Bettison
7b4b37aff5 Improve test framework: provide $TFWUNIQUE 2012-07-02 10:59:34 +09:30
Andrew Bettison
5f4dfc5fd4 Improve test framework: colour results 2012-06-28 18:14:52 +09:30
Andrew Bettison
f7483c2c15 Fix test framework: broken --filter logic 2012-06-28 15:18:48 +09:30
Andrew Bettison
3e92eb6bb8 Improve test framework: --jobs uses terminfo for progress reporting 2012-06-28 10:54:04 +09:30
Andrew Bettison
c0c95bf6ac Improve test framework: --jobs (parallel test execution) 2012-06-27 17:22:37 +09:30
Andrew Bettison
c5024a0546 Improve test framework: --stop-on-error --stop-on-failure
Also an expanded usage message, provoked by the --help option as before
2012-06-26 16:34:42 +09:30
Andrew Bettison
6f7eef80f6 Improve test framework: tfw_log function 2012-06-26 15:51:38 +09:30
Andrew Bettison
cf03033429 Improve test framework: assertGrep error on bad file 2012-06-22 17:16:43 +09:30
Andrew Bettison
86c7819f97 Remove spurious ERROR messsages
Tests assert that stderr contains no ERROR: lines after a successful exit

Rewrote sqlite_exec_int64() to separate error outcomes from legitimate
result values

Changed several WHY() calls to DEBUG()

Improved test framework
2012-06-08 13:13:26 +09:30
Andrew Bettison
b14db5c28b Improve "rhizome add file" for empty payloads
Accept the empty string for a payload pathname to mean a zero-length
payload.
2012-06-05 15:45:53 +09:30
Andrew Bettison
c857aea237 Improve rhizome test script
Escape grep metacharacters when matching manifest names
2012-06-05 11:05:56 +09:30
Andrew Bettison
824763f5f0 Improve test framework
error() returns 254 if it does not exit (ie, during teardown)
2012-06-04 18:28:38 +09:30
Andrew Bettison
7f58b71d78 Improve test framework
Do not consider ':' and '=' as shell metacharacters when quoting
2012-05-25 14:29:10 +09:30
Andrew Bettison
7fbe25946b Improve test framework
assertGrep() dumps file contents to log on failure
2012-05-20 13:14:15 +09:30
Andrew Bettison
2434d51bee Remove "rhizome add authored file" command
Now "rhizome add file" takes SID and PIN args, and if SID is empty, an
unauthored bundle (no BK field) is created

Updated dna_rhizome test cases
2012-05-17 12:01:25 +09:30
Andrew Bettison
7ba15ccdd7 Add "rhizome extract file" command with tests 2012-05-02 17:57:35 +09:30
Andrew Bettison
f9d8536d7d JNI-ize the output of "dna rhizome list" 2012-04-24 17:50:27 +09:30
Andrew Bettison
d53915d354 Fix test framework for Mac OS X 10.7 (bash-3.2.48) 2012-04-17 16:54:39 +09:30
Andrew Bettison
45369b0891 Improve test framework
- new assert option: --error-on-fail causes an assertion failure within a test
   case to result in an ERROR not a FAIL condition, so that failures to
   correctly establish a fixture can be distinguished from the actual feature
   under test
2012-04-13 18:03:19 +09:30
Andrew Bettison
c4e3249839 Improve test framework
- new execute() option: --exit-status=N
   equivalent to assertExitStatus --stderr '==' N
 - new executeOk() function, shortcut for execute --exit-status=0
2012-04-12 18:33:43 +09:30
Andrew Bettison
fab1df61e1 Improve test framework
- add assertStdoutLineCount/assertStderrLineCount functions
 - remove spurious "# assert" log output lines
2012-04-12 18:33:43 +09:30
Andrew Bettison
51b5cf8b54 Fix bugs in assertGrep and a rhizome test case 2012-04-10 18:13:05 +09:30
Andrew Bettison
16941b8ef3 Improve new testing framework
- add assertGrep function
 - improve --matches option for assertGrep and assertStdoutGrep: now
   accepts [min]-[max] range, eg --matches=1-3, --matches=4-
2012-04-10 18:13:05 +09:30
Andrew Bettison
c41d2aaeb1 Improve new test framework
- Add tfw_cat option -v|--show-nonprinting
 - Execute tests in the same order they were defined (to make it easier
   to peruse test log files)
2012-04-10 18:13:05 +09:30
Andrew Bettison
3c27f7efeb Improve test framework
- assertStderrIs/assertStdoutIs now support echo options; can use -e to
   interpolate backlash sequences
2012-04-10 18:13:05 +09:30
Andrew Bettison
ce5dc011b8 Split dna bit error tests into separate script
- Put common utility functions into testdefs.sh
 - Add abspath() and realpath() functions to test framework
 - Test framework now executes all tests with working directory in a temporary
   directory, to avoid pollution of caller's working directory
 - Improve test log verbosity
 - Name test log files by test script name
2012-04-10 12:41:15 +09:30
Andrew Bettison
f5acb301d8 Transcribe from ./testdna to new test framework
- testframework.sh is now a very full-featured, creates test.log
 - some tests fail, looks like bugs in dna
2012-04-05 19:47:57 +09:30
Andrew Bettison
1e2779a6e3 First cut at a dna testing framework 2012-04-03 19:18:57 +09:30