Compare commits

...

445 Commits

Author SHA1 Message Date
Thomas Levine
4a65c416b1 GitHub-only note about repository address change 2022-12-25 11:03:28 +00:00
Thomas Levine
1d2231a415 Move repository to SDF server. 2022-12-25 10:57:40 +00:00
Thomas Levine
9721f976e0 organize files 2016-04-11 18:44:58 +00:00
Thomas Levine
65dba9697d update history 2016-04-11 18:44:53 +00:00
Thomas Levine
f57e6cca22 move packages 2016-04-11 18:42:39 +00:00
Thomas Levine
144a76319c remove & 2016-04-11 18:42:33 +00:00
Thomas Levine
cb4e16ddff limits 2016-04-11 17:53:31 +00:00
Thomas Levine
cbad100692 more packages 2016-04-11 17:44:14 +00:00
Thomas Levine
3d5b5ede46 container 2016-04-11 17:40:56 +00:00
Thomas Levine
aedaaa3a05 ssh 2016-04-11 17:28:05 +00:00
Thomas Levine
5045b3546f fix configuration 2016-04-11 17:22:06 +00:00
Thomas Levine
9514948636 nixos-container 2016-04-11 17:14:12 +00:00
Thomas Levine
81a611dd9b require test 2016-04-11 16:27:38 +00:00
Thomas Levine
6fea07d8cf recurse 2016-04-11 16:20:20 +00:00
Thomas Levine
bd4d06bef6 explosions... 2016-04-11 05:44:58 +00:00
Thomas Levine
d92a9bc801 descend directories 2016-04-11 05:05:39 +00:00
Thomas Levine
dc90ed8578 merge small functions 2016-04-11 04:48:26 +00:00
Thomas Levine
d9ffa53e25 debug 2016-04-11 04:31:15 +00:00
Thomas Levine
47860e56ce local variables 2016-04-11 04:13:05 +00:00
Thomas Levine
37e57773a6 NO_MAIN variable 2016-04-11 04:04:30 +00:00
Thomas Levine
c8a0a1b30e meta 2016-04-10 22:48:55 +00:00
Thomas Levine
1bf8b930ec organize metafunctions better 2016-04-10 22:45:39 +00:00
Thomas Levine
a7a5db1cfd more meta 2016-04-10 22:44:22 +00:00
Thomas Levine
85a6c37dfc catch exit codes better 2016-04-10 22:07:15 +00:00
Thomas Levine
ba20619102 names 2016-04-10 21:55:15 +00:00
Thomas Levine
9932d0bf6f read -r and stuff 2016-04-10 21:54:08 +00:00
Thomas Levine
25f74b68cf localpath 2016-04-10 21:45:37 +00:00
Thomas Levine
2bd752012c localpath 2016-04-10 21:27:04 +00:00
Thomas Levine
3761493c7c $ for clarity 2016-04-10 21:18:08 +00:00
Thomas Levine
51fa9dc879 localpath 2016-04-10 21:17:19 +00:00
Thomas Levine
de4a92de7a simpler return codes for recurse 2016-04-10 21:05:34 +00:00
Thomas Levine
9bc3d63ded grr 2016-04-10 20:45:01 +00:00
Thomas Levine
4ca5b98550 comparators 2016-04-10 20:36:05 +00:00
Thomas Levine
fad04e1584 nicer cleanup 2016-04-10 20:34:36 +00:00
Thomas Levine
af0a80d1bd outline main 2016-04-10 20:27:56 +00:00
Thomas Levine
cc2c60cac0 remove another file 2016-04-10 20:11:40 +00:00
Thomas Levine
f3f01bb0dc input parsing 2016-04-10 20:05:34 +00:00
Thomas Levine
8a234e687f remove cycling 2016-04-10 20:03:07 +00:00
Thomas Levine
a6aaa5a130 header 2016-04-10 19:53:57 +00:00
Thomas Levine
3a4a7012a7 refactoring 2016-04-10 19:51:21 +00:00
Thomas Levine
a97bb751bc skip better 2016-04-10 19:44:17 +00:00
Thomas Levine
e217d5a8fb skip encoding 2016-04-10 19:39:11 +00:00
Thomas Levine
2ba4c8b00e exit codes 2016-04-10 19:32:01 +00:00
Thomas Levine
b03640f8aa shell test as variable rather than list 2016-04-10 19:27:15 +00:00
Thomas Levine
7e7b661c68 shorter 2016-04-10 19:20:04 +00:00
Thomas Levine
4e3e29c159 exit codes 2016-04-10 19:17:02 +00:00
Thomas Levine
9caa0d1225 more format 2016-04-10 19:08:19 +00:00
Thomas Levine
f4b66881f6 refactor 2016-04-10 18:56:32 +00:00
Thomas Levine
7dc70982e5 shorter outcome printing 2016-04-10 18:51:52 +00:00
Thomas Levine
34a6276b20 move footer 2016-04-10 18:43:58 +00:00
Thomas Levine
4db468ef2e colors 2016-04-10 18:42:58 +00:00
Thomas Levine
3ceba43410 start rearranging formatting 2016-04-10 18:23:24 +00:00
Thomas Levine
deaf05c062 log format 2016-04-10 17:53:11 +00:00
Thomas Levine
0feeb7233b tabs 2016-04-10 17:42:20 +00:00
Thomas Levine
562489e795 read with -d (not standard) 2016-04-10 17:18:32 +00:00
Thomas Levine
a084577951 play with reading many args 2016-04-10 17:04:12 +00:00
Thomas Levine
22e9f57f0f relative potential test in log file 2016-04-10 16:49:14 +00:00
Thomas Levine
246f29f06c wrappers 2016-04-10 16:40:36 +00:00
Thomas Levine
e230a80be1 move argument validation to the parser 2016-04-10 16:12:40 +00:00
Thomas Levine
b3188d17fc parameter expansions 2016-04-10 16:03:57 +00:00
Thomas Levine
446353a6a7 parameter expansions 2016-04-10 16:02:23 +00:00
Thomas Levine
287fd8a37c use new contains 2016-04-10 15:50:29 +00:00
Thomas Levine
9ce5c45bed "contains" function 2016-04-10 15:48:30 +00:00
Thomas Levine
f01c7f9b53 move dependency checks up to beginning 2016-04-10 15:34:06 +00:00
Thomas Levine
015dd2894f move validation lower 2016-04-10 09:05:08 +00:00
Thomas Levine
4798611d78 ascii delimiters 2016-04-10 08:45:11 +00:00
Thomas Levine
478b0b3c8d ideas 2016-04-10 06:36:34 +00:00
Thomas Levine
fa4708f940 command -v 2016-04-10 06:15:55 +00:00
Thomas Levine
77aff50374 print head 2016-04-10 06:05:28 +00:00
Thomas Levine
0ee97569a6 new format variable 2016-04-10 06:04:12 +00:00
Thomas Levine
f783aa8cbf Automatic commit with j 2016-04-08 22:44:29 +00:00
Thomas Levine
b807f6ad70 version 2016-04-08 22:29:50 +00:00
Thomas Levine
3cfa308953 order matter 2016-04-08 22:25:58 +00:00
Thomas Levine
b46d1a9d6c rearrange contents of the file 2016-04-08 22:24:55 +00:00
Thomas Levine
4608827fed document remote test-running 2016-04-08 21:10:01 +00:00
Thomas Levine
e36333a6c6 document remote test-running 2016-04-08 21:09:59 +00:00
Thomas Levine
c99f6f2919 document remote test-running 2016-04-08 21:09:57 +00:00
Thomas Levine
0227fc73f4 document remote test-running 2016-04-08 21:09:47 +00:00
Thomas Levine
a5e63f5042 execution with remotes 2016-04-08 20:41:53 +00:00
Thomas Levine
fa432b5c09 remote testing proposal 2016-04-07 12:38:23 +00:00
Thomas Levine
236b8f86c2 dep proposal 2016-04-07 12:32:19 +00:00
Thomas Levine
74e9d95f77 fixtures idea 2016-04-07 12:20:31 +00:00
Thomas Levine
0395ebb5b2 comment the line in tap 2016-04-07 05:19:47 +00:00
Thomas Levine
cebf0d3add update format tests 2016-04-07 05:18:56 +00:00
Thomas Levine
123f04270b md5 format 2016-04-07 03:55:43 +00:00
Thomas Levine
82c81822d3 mktemp templates 2016-04-07 03:51:01 +00:00
Thomas Levine
9fe6058fbf Automatic commit with j 2016-04-07 03:46:38 +00:00
Thomas Levine
e58ae17704 supporting no rsync 2016-04-07 03:41:33 +00:00
Thomas Levine
367ae3f2b1 tests to write 2016-04-07 03:25:45 +00:00
Thomas Levine
5ffd065317 solaris 2016-04-07 03:23:19 +00:00
Thomas Levine
c0239915a2 error 2016-04-07 03:20:39 +00:00
Thomas Levine
b339c5f98e wrong flag 2016-04-07 03:17:08 +00:00
Thomas Levine
92d40c9ff1 DISABLE_CYCLING 2016-04-07 03:13:42 +00:00
Thomas Levine
24ecd302cd document environment variables 2016-04-07 03:12:10 +00:00
Thomas Levine
135c24fd72 hpux exit codes 2016-04-07 03:03:07 +00:00
Thomas Levine
c219f0a0e6 shorter output 2016-04-07 02:54:30 +00:00
Thomas Levine
adf8dc3562 epoch 2016-04-07 02:52:40 +00:00
Thomas Levine
969340bfd6 bugs 2016-04-07 02:52:38 +00:00
Thomas Levine
a484300263 oops 2016-04-07 02:48:58 +00:00
Thomas Levine
e8d946cc5c switch debug to set -x 2016-04-07 02:47:55 +00:00
Thomas Levine
81c4cdeac0 oops 2016-04-07 02:44:22 +00:00
Thomas Levine
b79045c6ee refactor mktemp 2016-04-07 02:42:29 +00:00
Thomas Levine
c6061b377b alternative ways of getting a seconds counter 2016-04-07 02:39:28 +00:00
Thomas Levine
539027db59 find the next bug 2016-04-07 01:59:28 +00:00
Thomas Levine
5e2ecab592 mktemp 2016-04-07 01:58:34 +00:00
Thomas Levine
efe3af6f87 new version 2016-04-07 00:25:32 +00:00
Thomas Levine
f244c22055 another bug 2016-04-07 00:24:52 +00:00
Thomas Levine
2cdd3ec049 fix hpux rsync path 2016-04-07 00:24:06 +00:00
Thomas Levine
6744b2cb4a more on bugs 2016-04-07 00:16:09 +00:00
Thomas Levine
6e32dab0b7 bugs 2016-04-07 00:11:41 +00:00
Thomas Levine
bb3876f334 oops 2016-04-07 00:06:44 +00:00
Thomas Levine
0dc6e01fbc that alias approach was invalid 2016-04-07 00:06:02 +00:00
Thomas Levine
ca71678522 md5 2016-04-07 00:02:11 +00:00
Thomas Levine
9b4f14c937 note on MirBSD 2016-04-06 23:58:58 +00:00
Thomas Levine
27592e58ac untested md5 handler 2016-04-06 23:58:26 +00:00
Thomas Levine
42c09b775b openbsd bug 2016-04-06 23:50:46 +00:00
Thomas Levine
2923d3a8b0 more systems 2016-04-06 23:45:44 +00:00
Thomas Levine
12f458a933 wrong port 2016-04-06 23:26:42 +00:00
Thomas Levine
6c217acae8 oops 2016-04-06 23:21:04 +00:00
Thomas Levine
6a7e58c944 all flags as flags 2016-04-06 23:18:38 +00:00
Thomas Levine
32ac65cf3e more data in filename 2016-04-06 23:14:25 +00:00
Thomas Levine
d1c8f78585 todo 2016-04-06 21:43:18 +00:00
Thomas Levine
132e1695db HISTORY 2016-04-04 21:42:02 +00:00
Thomas Levine
d67185ce25 don't use /dev/stderr 2016-04-04 21:37:47 +00:00
Thomas Levine
16988c48a9 simpler check 2016-04-04 21:29:51 +00:00
Thomas Levine
ddb74d43d8 longer shell list 2016-04-04 21:21:24 +00:00
Thomas Levine
04c4f54789 strange name so we don't have conflicts 2016-04-04 21:10:37 +00:00
Thomas Levine
552d7d0dbc record test command in makefile 2016-04-04 21:07:29 +00:00
Thomas Levine
00c99773d0 run cross-os tests in series
because i sometimes run them on weak computers
2016-04-04 21:04:05 +00:00
Thomas Levine
7899657971 simpler cross-os tests 2016-04-04 20:59:21 +00:00
Thomas Levine
2ee965d2ae start on cross-os tests 2016-04-04 20:55:14 +00:00
Thomas Levine
fdb0b1b3ea LC_COLLATE rather than LC_ALL 2016-04-04 19:15:00 +00:00
Thomas Levine
db3dd1c662 typos 2016-04-04 01:22:05 +00:00
Thomas Levine
a9e0f856fb error message text 2016-04-04 01:17:58 +00:00
Thomas Levine
72f0700598 fixing timeout flag 2016-04-04 01:16:51 +00:00
Thomas Levine
a486a6f296 check timeout error message 2016-04-04 01:07:29 +00:00
Thomas Levine
a9ba8e79d3 suppress timeout errors 2016-04-04 01:04:04 +00:00
Thomas Levine
586f46600a assert that there is no timeout output 2016-04-04 01:03:05 +00:00
Thomas Levine
940cd549ab more timeout tests 2016-04-04 00:58:37 +00:00
Thomas Levine
cd7f773d58 fix debug 2016-04-04 00:42:08 +00:00
Thomas Levine
0de2c3264a version in readme 2016-04-04 00:24:54 +00:00
Thomas Levine
fc51c34019 debug messages 2016-04-01 19:52:34 +00:00
Thomas Levine
c61d31fcea docs 2016-04-01 19:43:02 +00:00
Thomas Levine
6275c28ebf update history 2016-04-01 18:25:53 +00:00
Thomas Levine
b0a7a8b07a remove out-of-date windows screenshots 2016-04-01 18:24:59 +00:00
Thomas Levine
f7ffd82893 fix name 2016-04-01 18:21:26 +00:00
Thomas Levine
a5ffad0446 Automatic commit with j 2016-04-01 18:21:01 +00:00
Thomas Levine
b402f466b5 package for nongnu 2016-04-01 18:20:00 +00:00
Thomas Levine
7a34da0906 packaging 2016-04-01 18:19:28 +00:00
Thomas Levine
3ebe974202 bump version 2016-03-31 22:25:49 +00:00
Thomas Levine
a957ca9065 locale 2016-03-31 20:42:22 +00:00
Thomas Levine
3122b2cc63 remove nix dependencies 2016-03-31 20:00:45 +00:00
Thomas Levine
4f7541b1fd change flag name 2016-03-31 19:56:12 +00:00
Thomas Levine
5b2ab72ee1 change success and failure symbols 2016-03-31 19:54:27 +00:00
Thomas Levine
73035208d3 update | in test 2016-03-31 19:48:40 +00:00
Thomas Levine
64530e8920 count setup better 2016-03-31 19:46:13 +00:00
Thomas Levine
e66551f50f switch # to | so output is easier to read 2016-03-31 19:43:04 +00:00
Thomas Levine
d42079ef38 fix shebang tests 2016-03-31 19:40:46 +00:00
Thomas Levine
5c24879dd8 oops 2016-03-31 19:28:28 +00:00
Thomas Levine
9ea757722a rename 2016-03-31 19:26:37 +00:00
Thomas Levine
72ea60bb8d separate has_shebang_line tests 2016-03-31 19:26:11 +00:00
Thomas Levine
edda2a0e90 fix has_shebang_line test 2016-03-31 19:10:31 +00:00
Thomas Levine
3c5593c812 fix has_shebang_line 2016-03-31 19:06:23 +00:00
Thomas Levine
ce9273abfc test has_shebang_line 2016-03-31 19:05:02 +00:00
Thomas Levine
406e5c360c document sorting 2016-03-31 18:55:28 +00:00
Thomas Levine
cac691805c remove sort_python test 2016-03-31 18:46:45 +00:00
Thomas Levine
635bcc83f2 set LC_ALL for sort 2016-03-31 18:46:26 +00:00
Thomas Levine
1abba45a39 hah 2016-03-31 18:42:54 +00:00
Thomas Levine
79ebe8e3f2 sort 2016-03-31 18:36:31 +00:00
Thomas Levine
e4b2a4e7ea sort 2016-03-31 18:20:54 +00:00
Thomas Levine
da10808f2a sorting 2016-03-31 18:03:24 +00:00
Thomas Levine
3e83e2cb30 use grep -q 2016-03-29 16:57:21 +00:00
Thomas Levine
2b4444dbed revert /bin/sh shebang behavior 2016-03-29 16:54:40 +00:00
Thomas Levine
5604ec97d6 remove obselete docs 2016-03-29 16:51:38 +00:00
Thomas Levine
8ecea33c16 docs on order 2016-03-29 16:50:18 +00:00
Thomas Levine
dd12693da1 test to change #!/bin/sh shell 2016-03-29 16:48:56 +00:00
Thomas Levine
9f76434bfc proofread 2016-03-21 20:28:59 +00:00
Thomas Levine
c96c2d2157 add python and ruby to default 2016-03-18 19:30:46 +00:00
Thomas Levine
9b4c502d25 note JSON.sh 2016-03-13 23:46:58 +00:00
Thomas Levine
74651bd169 update USAGE 2016-03-10 11:12:17 +00:00
Thomas Levine
a7c44cab70 windows download links 2016-03-06 18:39:22 +00:00
Thomas Levine
5cbafb2a78 document .urchin_dir 2016-03-06 15:46:06 +00:00
Thomas Levine
406d6f43f8 sort alternatives 2016-03-06 15:16:16 +00:00
Thomas Levine
1a4b8674ea perl sort 2016-03-06 15:06:34 +00:00
Thomas Levine
6a0e9f3e64 set root-level running in series 2016-03-06 14:55:11 +00:00
Thomas Levine
5ab6a53961 typo 2016-03-06 14:54:49 +00:00
Thomas Levine
edec12c2c0 remove unnecessary recurse call padding 2016-03-06 14:54:42 +00:00
Thomas Levine
8b9747a997 run in series by dir 2016-03-06 14:44:39 +00:00
Thomas Levine
5864d81f55 fix verbosity levels in tests 2016-03-06 14:40:47 +00:00
Thomas Levine
5cd182ff8f look for .urchin_root rather than .urchin 2016-03-06 14:38:56 +00:00
Thomas Levine
de8bda1b32 crashing in todo 2016-03-06 14:37:00 +00:00
Thomas Levine
fa6c660be1 fix trap and shell list 2016-03-06 14:23:04 +00:00
Thomas Levine
12f975a0ca accept multiple test things 2016-03-06 14:19:04 +00:00
Thomas Levine
375e8a3137 change -v options to match my needs 2016-03-06 13:54:10 +00:00
Thomas Levine
afde2b1b30 use STDIN interface to sort 2016-03-06 13:42:52 +00:00
Thomas Levine
40d1c63f37 python sort test 2016-03-06 13:39:29 +00:00
Thomas Levine
bd5240d726 sort fallback 2016-03-06 13:30:42 +00:00
Thomas Levine
e7a3d633ca sort dependency 2016-03-06 11:53:37 +00:00
Thomas Levine
16d9d7b069 dependencies 2016-03-06 11:45:24 +00:00
Thomas Levine
25a3895203 SORTING 2016-03-06 11:27:31 +00:00
Thomas Levine
f61ca2f994 simpler sort string 2016-03-06 10:55:01 +00:00
Thomas Levine
997d256281 GNU sort note 2016-03-06 10:47:22 +00:00
Thomas Levine
868822758f help formatting 2016-03-06 10:46:24 +00:00
Thomas Levine
139152431e add --quiet 2016-03-06 10:45:40 +00:00
Thomas Levine
f5dc43bcef more verbosity levels 2016-03-06 10:42:34 +00:00
Thomas Levine
d39555bfc3 start on more verbosity levels 2016-03-06 10:39:40 +00:00
Thomas Levine
fbe825e4b3 specify color and verbose in color test 2016-03-06 10:27:15 +00:00
Thomas Levine
cd79969f28 remove color command from no-color code 2016-03-06 10:26:00 +00:00
Thomas Levine
6cdbe27bbf add verbose flag to test 2016-03-06 10:25:32 +00:00
Thomas Levine
dc26f877b7 fix file discovery 2016-03-06 10:22:15 +00:00
Thomas Levine
933aa466c4 Automatic commit with j 2016-03-06 10:04:16 +00:00
Thomas Levine
338b779cb9 file discovery tests
come up finally with failing tests
2016-03-06 09:57:38 +00:00
Thomas Levine
5b9bee4ad3 test that files are really ignored 2016-03-06 09:53:37 +00:00
Thomas Levine
a9cad20ff7 testing --color 2016-03-06 09:47:16 +00:00
Thomas Levine
dbd604a82d start on --color 2016-03-06 09:44:10 +00:00
Thomas Levine
91e5630d74 add shells to nix enviroment 2016-03-06 09:40:36 +00:00
Thomas Levine
0b7812bfd1 nix environment with busybox 2016-03-06 09:39:59 +00:00
Thomas Levine
81b028d546 start on -v, -vv 2016-03-06 09:37:08 +00:00
Thomas Levine
9c392c84df change introduction to focus less on testing 2016-03-06 09:27:36 +00:00
Thomas Levine
b06f9a4816 todo 2016-03-03 15:52:56 +00:00
Thomas Levine
c4239dba06 references 2016-03-03 11:18:09 +00:00
Thomas Levine
d504f83141 skip non-executable directories 2016-03-02 22:02:21 +00:00
Thomas Levine
d2290911df tests for skipping dirs and files 2016-03-02 22:01:42 +00:00
Thomas Levine
cf0c5b3233 fix molly guard tests 2016-03-02 21:49:16 +00:00
Thomas Levine
f2305648b7 half-way implementation of error on no found tests 2016-03-02 21:46:16 +00:00
Thomas Levine
918bf31ec5 fix molly guard 2016-03-02 21:18:40 +00:00
Thomas Levine
9fecb802cb remove newline 2016-03-02 20:39:37 +00:00
Thomas Levine
b1ea7ed294 add more braces 2016-03-02 20:39:31 +00:00
Thomas Levine
2b0974d305 add braces around variables 2016-03-02 20:29:33 +00:00
Thomas Levine
a90aed95a5 Automatic commit with j 2016-03-02 20:19:33 +00:00
Thomas Levine
e745555367 update documentation in --help 2016-02-29 13:29:51 +00:00
Thomas Levine
54403c725b support GNU and BusyBox ps 2016-02-29 12:48:13 +00:00
Thomas Levine
d5f1060c1a finish cross-shell testing tests 2016-02-29 12:42:56 +00:00
Thomas Levine
d3752070ea rename test to match new behavior 2016-02-29 12:34:44 +00:00
Thomas Levine
f8d98d9978 update shell cycling logic to match documentation
and I updated the documentation already because this new way seems
easier to think about
2016-02-29 12:29:49 +00:00
Thomas Levine
37dcdfd216 lin 2016-02-29 12:15:31 +00:00
Thomas Levine
bc5032fff2 TODO 2016-02-29 12:06:47 +00:00
Thomas Levine
ceaf1bc92d check for lacking shebang line, only 2016-02-29 05:10:53 +00:00
Thomas Levine
32a2247292 explain the new cycling 2016-02-29 05:07:15 +00:00
Thomas Levine
ff212bab20 move licensing to HISTORY 2016-02-29 04:34:20 +00:00
Thomas Levine
62fc20cdea remove alternatives list
I have started listing them in my NYC*BUG talk.
2016-02-29 04:13:06 +00:00
Thomas Levine
d96e9955dd remove website 2016-02-29 04:12:35 +00:00
Thomas Levine
0e7331d1d4 remove obselete cross-shell-tests helper 2016-02-29 04:12:07 +00:00
Thomas Levine
44d4446be0 make separate licenses more clear 2016-02-29 04:11:37 +00:00
Thomas Levine
6db7ec41eb agpl license 2016-02-29 04:09:46 +00:00
Thomas Levine
347d975508 test --verbose 2016-02-29 03:55:21 +00:00
Thomas Levine
62bb91b3d5 make --timeout tests less slow 2016-02-29 03:54:57 +00:00
Thomas Levine
3b722ebfef timing 2016-02-29 03:51:30 +00:00
Thomas Levine
adc2c0dbdc test for --timeout 2016-02-29 03:45:27 +00:00
Thomas Levine
8aab5dad0d implement --timeout 2016-02-29 03:40:27 +00:00
Thomas Levine
34a065c074 start timeout 2016-02-29 03:37:04 +00:00
Thomas Levine
c97d212485 move more todo to history 2016-02-29 03:31:10 +00:00
Thomas Levine
c47cdf6bc8 more history 2016-02-29 03:25:53 +00:00
Thomas Levine
7386fb7229 update HISTORY 2016-02-29 03:00:51 +00:00
Thomas Levine
ff5c4fd800 finish zsh support 2016-02-29 02:44:43 +00:00
Thomas Levine
2c0fbae1af zsh support in some tests 2016-02-29 02:42:48 +00:00
Thomas Levine
e5792a2f90 debugging zsh errors 2016-02-29 02:32:58 +00:00
Thomas Levine
bf19f94c08 pass env variable better i think 2016-02-29 02:13:40 +00:00
Thomas Levine
1f26a67c9e change ps command to be more portable 2016-02-29 02:01:27 +00:00
Thomas Levine
1752d19e35 tmp file 2016-02-29 01:40:13 +00:00
Thomas Levine
694bc293c8 fix fixture 2016-02-29 01:37:59 +00:00
Thomas Levine
39f1ec70f6 warn about sorting 2016-02-29 01:37:53 +00:00
Thomas Levine
05f80bf9fc fix the exit on fail test 2016-02-29 01:08:46 +00:00
Thomas Levine
6f9aa9ad32 exit on fail works i think 2016-02-29 01:07:04 +00:00
Thomas Levine
f9c7b63b7c Automatic commit with j 2016-02-29 01:03:56 +00:00
Thomas Levine
ac557a4295 exit code handling 2016-02-29 01:03:17 +00:00
Thomas Levine
9477e3ee73 direct stderr to /dev/null 2016-02-29 00:43:56 +00:00
Thomas Levine
a94d04b136 sort -m 2016-02-29 00:41:03 +00:00
Thomas Levine
5ee0771f2b remove remainder of old tests 2016-02-29 00:39:33 +00:00
Thomas Levine
5b1910de3a sort 2016-02-28 23:07:45 +00:00
Thomas Levine
7ea2171494 hyphen tests don't quite work yet 2016-02-28 23:03:14 +00:00
Thomas Levine
87d04792a1 fix molly guard tests 2016-02-28 22:58:50 +00:00
Thomas Levine
fca041d26e change molly guard error explanation 2016-02-28 22:56:49 +00:00
Thomas Levine
e81b120a11 update counting tests for multi-shell testing 2016-02-28 22:51:28 +00:00
Thomas Levine
c6e1016b80 stop urchin_root at hidden directories 2016-02-28 22:49:57 +00:00
Thomas Levine
3e90e83237 use mktemp 2016-02-28 22:43:35 +00:00
Thomas Levine
9d60edae83 use mktemp 2016-02-28 22:43:17 +00:00
Thomas Levine
90494385e2 rm 2016-02-28 22:41:27 +00:00
Thomas Levine
67aa65c3c7 add --verbose 2016-02-28 22:41:13 +00:00
Thomas Levine
06952c7761 work on setup teardown 2016-02-28 22:36:45 +00:00
Thomas Levine
58f2f754b5 move some setup teardown tests 2016-02-28 22:33:47 +00:00
Thomas Levine
a8931169ae remove some sloppy tests 2016-02-28 22:28:37 +00:00
Thomas Levine
7267239313 start moving cross-shell testing tests
and also make them more cross-shell test style
2016-02-28 22:23:47 +00:00
Thomas Levine
6846876448 better name 2016-02-28 22:03:42 +00:00
Thomas Levine
c93456f6e5 CDPATH test 2016-02-28 22:03:11 +00:00
Thomas Levine
cb91efb126 remove now-redundant test 2016-02-28 21:49:53 +00:00
Thomas Levine
348a5a3a29 move more tests 2016-02-28 21:48:22 +00:00
Thomas Levine
4e277acb0c delete near-useless tests 2016-02-28 21:44:17 +00:00
Thomas Levine
9772161eaf fix exit codes 2016-02-28 21:37:28 +00:00
Thomas Levine
fd85cc54a3 don't worry about supporting zsh for now 2016-02-28 21:31:57 +00:00
Thomas Levine
f29cf2cc86 add .urchin for exit codes testsuite 2016-02-28 21:10:59 +00:00
Thomas Levine
dfab129074 exit 11 2016-02-28 21:02:38 +00:00
Thomas Levine
d7e1806040 make fullpath a function instead of an alias
Somehow this helps with sub-shells I guess.
2016-02-28 20:58:54 +00:00
Thomas Levine
3b90d0cda6 shorter molly guard message code 2016-02-28 20:57:55 +00:00
Thomas Levine
5aa081f1df test exit codes 2016-02-28 20:56:21 +00:00
Thomas Levine
7ab322923a separate stdout files by shell 2016-02-28 20:31:17 +00:00
Thomas Levine
2ce27acf95 oops == is not shell 2016-02-28 20:18:22 +00:00
Thomas Levine
0d0c7aa0f3 use TEST_SHELL 2016-02-28 20:11:34 +00:00
Thomas Levine
008d8a2829 test tap format
and find new cross-shell bugs in urchin!
2016-02-28 20:03:49 +00:00
Thomas Levine
e0fc0356a9 move --version test 2016-02-28 19:47:07 +00:00
Thomas Levine
4e2ba32e98 add documented flags 2016-02-28 19:45:18 +00:00
Thomas Levine
22e4ff4cc3 tests for -e, --exit-on-fail 2016-02-28 19:43:32 +00:00
Thomas Levine
b6706fcc00 remove now-redundant tests 2016-02-28 19:35:15 +00:00
Thomas Levine
5b353b9734 fix regex more 2016-02-28 19:34:47 +00:00
Thomas Levine
968b539d15 empty testsuite test 2016-02-28 19:33:00 +00:00
Thomas Levine
fe9daae67b allow skipping 2016-02-28 19:26:18 +00:00
Thomas Levine
77da4ce194 generating tests 2016-02-28 19:18:54 +00:00
Thomas Levine
87d5aec23c change test generation 2016-02-28 19:01:59 +00:00
Thomas Levine
fa402bd42d doesn't quite work 2016-02-28 18:54:18 +00:00
Thomas Levine
32b32d0aa2 start test generator 2016-02-28 18:43:27 +00:00
Thomas Levine
4c84456574 formatting 2016-02-28 18:41:00 +00:00
Thomas Levine
287e54a4fe move tests out temporarily 2016-02-28 18:24:14 +00:00
Thomas Levine
efab5cde8e shell cycling 2016-02-28 16:53:49 +00:00
Thomas Levine
ad3c6b901e pass TEST_SHELL and stuff 2016-02-28 16:32:06 +00:00
Thomas Levine
e71ac885b4 parellel yay 2016-02-28 16:19:42 +00:00
Thomas Levine
d836a40047 include time in output 2016-02-28 16:12:13 +00:00
Thomas Levine
552873a642 adding parallel stuff 2016-02-28 16:05:03 +00:00
Thomas Levine
241ddcd2cf add series flag 2016-02-28 16:00:07 +00:00
Thomas Levine
2f57f7345e tap output with shell name 2016-02-28 15:50:53 +00:00
Thomas Levine
9f97f5d422 output for not executable file skipped 2016-02-28 15:40:28 +00:00
Thomas Levine
71881a8d2d group output of multiple shells 2016-02-28 15:28:56 +00:00
Thomas Levine
539e3f1c0d fix writing to log file 2016-02-28 15:21:47 +00:00
Thomas Levine
a3c0a50c72 typo 2016-02-28 15:19:15 +00:00
Thomas Levine
5c88db1743 check for shells 2016-02-28 15:18:16 +00:00
Thomas Levine
8db241f1c3 hypothetical timeout flag 2016-02-28 15:15:09 +00:00
Thomas Levine
91202528e9 do not allow tabs 2016-02-28 14:32:33 +00:00
Thomas Levine
ffc98da702 shell_list 2016-02-28 14:14:55 +00:00
Thomas Levine
f9562e035b update help 2016-02-28 14:12:21 +00:00
Thomas Levine
c477aebf16 cycling shells by default 2016-02-28 14:01:17 +00:00
Thomas Levine
aa0899aeb8 reuse code 2016-02-28 13:24:55 +00:00
Thomas Levine
9c633a2029 separate dirname and basename in non-tap format 2016-02-28 13:23:36 +00:00
Thomas Levine
e8d3f84b92 wording 2016-02-28 13:13:17 +00:00
Thomas Levine
1b3ec7cf2a stdout files 2016-02-28 13:12:55 +00:00
Thomas Levine
08d0104081 output formatting 2016-02-28 12:59:36 +00:00
Thomas Levine
6c54b1b841 remove unused stuff 2016-02-28 12:56:42 +00:00
Thomas Levine
0fdd14494c tests with nested directories 2016-02-28 12:53:26 +00:00
Thomas Levine
6b98a5a946 put non-TAP back 2016-02-28 12:45:38 +00:00
Thomas Levine
794973b5ee remove root prefix from paths 2016-02-28 12:41:39 +00:00
Thomas Levine
f42a5a2489 fix empty directories 2016-02-28 12:35:27 +00:00
Thomas Levine
474541051e remove urchin_path 2016-02-28 12:25:34 +00:00
Thomas Levine
2e01fd43f2 success test 2016-02-28 12:23:21 +00:00
Thomas Levine
b4a3555196 absolute paths 2016-02-28 12:23:13 +00:00
Thomas Levine
eab1525998 simpler conditional 2016-02-28 12:15:42 +00:00
Thomas Levine
c604face40 remove debug statements 2016-02-28 12:14:38 +00:00
Thomas Levine
921c450fb2 set urchin root 2016-02-28 12:14:27 +00:00
Thomas Levine
5df65fb6a1 fix path descending from root 2016-02-28 12:14:16 +00:00
Thomas Levine
0ce5e3dcac Automatic commit with j 2016-02-28 12:02:57 +00:00
Thomas Levine
2e3ce4dd1e better molly guard 2016-02-28 11:27:55 +00:00
Thomas Levine
262848eaa8 use urchin root 2016-02-28 11:26:25 +00:00
Thomas Levine
c2ab8410c6 urchin_root
don't need it just yet
2016-02-28 11:23:21 +00:00
Thomas Levine
062ace88e6 start urchin root 2016-02-28 11:18:39 +00:00
Thomas Levine
5533b6629b put hyphens in tap 2016-02-28 11:16:32 +00:00
Thomas Levine
0376bd936d count tests 2016-02-28 11:14:23 +00:00
Thomas Levine
75e085e801 keep track of ok, not ok, skip 2016-02-28 11:06:54 +00:00
Thomas Levine
359a339e78 tap and consistent variables 2016-02-28 10:57:27 +00:00
Thomas Levine
cee54dc21a better skip 2016-02-28 10:49:40 +00:00
Thomas Levine
7c0e491580 fix tap 2016-02-28 10:48:05 +00:00
Thomas Levine
3b42b85402 Automatic commit with j 2016-02-28 10:39:32 +00:00
Thomas Levine
5767859a07 woo some tap 2016-02-28 10:27:49 +00:00
Thomas Levine
85578e0bb5 closer to reporting 2016-02-28 10:18:06 +00:00
Thomas Levine
c929109811 start on reporting 2016-02-28 10:07:55 +00:00
Thomas Levine
fe8bebf0d3 exit codes on setup teardown 2016-02-28 10:00:53 +00:00
Thomas Levine
aaf4dc9367 Automatic commit with j 2016-02-28 09:36:48 +00:00
Thomas Levine
3d3d277954 Automatic commit with j 2016-02-28 09:25:21 +00:00
Thomas Levine
76db160a1c move more reporting 2016-02-28 09:17:16 +00:00
Thomas Levine
d2f676e9e9 start using the new tmp dir 2016-02-28 09:12:57 +00:00
Thomas Levine
c0ce7b4edc start using the new tmp dir 2016-02-28 09:08:20 +00:00
Thomas Levine
4482c96793 Automatic commit with j 2016-02-28 01:44:54 +00:00
Thomas Levine
ab7c75a8e0 Automatic commit with j 2016-02-28 01:37:56 +00:00
Thomas Levine
502247fc38 easier to read 2016-02-28 01:29:56 +00:00
Thomas Levine
5bd70ab947 separate stdout files 2016-02-28 01:25:36 +00:00
Thomas Levine
97a1cbffd4 Automatic commit with j 2016-02-28 01:18:55 +00:00
Thomas Levine
4cd9d41a1e Automatic commit with j 2016-02-26 20:38:31 +00:00
Thomas Levine
e14d8edc05 .urchin in root idea 2016-02-26 18:30:33 +00:00
Thomas Levine
15acd676f9 nagios explanation 2016-02-26 17:43:05 +00:00
Thomas Levine
0c73e5eb44 move skip tests to history 2016-02-26 17:39:18 +00:00
Thomas Levine
bb103757e4 implement exit code 3 thing 2016-02-26 17:37:39 +00:00
Thomas Levine
dce0adc768 test skip on exit code 3 2016-02-26 17:37:12 +00:00
Thomas Levine
80ebf28da9 test skipping idea 2016-02-26 16:39:53 +00:00
Thomas Levine
3f0e925975 move molly-guard change from todo to history 2016-02-26 16:26:22 +00:00
Thomas Levine
43674f12e2 more accepting molly-guard 2016-02-26 16:23:41 +00:00
Thomas Levine
9bb1366549 simpler truth test 2016-02-26 16:19:32 +00:00
Thomas Levine
643a1bf576 test a more accepting molly-guard 2016-02-26 16:18:49 +00:00
Thomas Levine
08ea7bb88f specify version in readme 2016-02-26 16:14:54 +00:00
Thomas Levine
e5ada4899a task runner ideas 2016-02-26 15:57:21 +00:00
Thomas Levine
c818033faa list alternatives 2016-02-14 16:38:02 +00:00
Thomas Levine
88572b6c90 to support single file runs 2016-02-14 07:44:07 +00:00
Thomas Levine
3e5e7334e8 sourcing idea 2016-02-11 20:18:35 +00:00
Thomas Levine
87bb9f4660 link to COPYING file on web 2016-02-08 16:09:00 +00:00
Thomas Levine
caabcd25ff update HISTORY 2016-02-08 16:06:22 +00:00
Thomas Levine
8f82cf5aeb make long lines shorter 2016-02-08 16:05:56 +00:00
Thomas Levine
385ec3fe81 add a copying notice to the urchin excutable 2016-02-08 16:02:03 +00:00
Thomas Levine
d4eb99ffb0 rename LICENSE -> COPYING 2016-02-08 15:59:56 +00:00
Thomas Levine
ed939ff39a update history 2016-02-08 15:59:47 +00:00
Thomas Levine
d24a71d0d7 copyright notice
add Thomas Levine and Michael Klement
2016-02-08 15:59:16 +00:00
Thomas Levine
ceae1811e2 nagios todo 2016-02-08 15:51:53 +00:00
Thomas Levine
2ac3a52707 fix printf to work in mksh 2016-02-08 15:50:12 +00:00
Thomas Levine
2d4de62729 msys64 test results 2016-02-08 15:48:57 +00:00
Thomas Levine
3b3ba0e1fa windows bash implementations list 2016-02-08 15:48:57 +00:00
Thomas Levine
1bc9bb2671 explain license thing 2016-02-08 15:48:57 +00:00
Thomas Levine
fafd0c1801 note desire to test on windows 2016-02-08 15:48:57 +00:00
Thomas Levine
d85b0ee352 packaging ideas 2016-02-08 15:48:57 +00:00
Thomas Levine
cf793387e9 licensing 2016-02-08 15:48:57 +00:00
Thomas Levine
1f79db874b environment variables 2016-02-08 15:48:57 +00:00
Thomas Levine
c770479884 TODO list 2016-02-08 15:48:57 +00:00
Thomas Levine
96ab43c233 explain why urchin is called urchin 2016-01-29 17:28:26 +00:00
Thomas Levine
2be0151213 document the --help flag 2016-01-29 17:20:18 +00:00
Thomas Levine
655daf4b74 show all counts in cross-shell-tests runner
It previously just showed the last three lines. It needs to show the
last four lines now because urchin now displays skipped tests.
2016-01-29 17:19:15 +00:00
Thomas Levine
31023bce21 update HISTORY 2016-01-29 17:17:35 +00:00
Thomas Levine
d96f3707e9 implement -v 2016-01-29 17:17:31 +00:00
Thomas Levine
3f05794d7e add -v to usage 2016-01-29 17:16:01 +00:00
Thomas Levine
d7c8549206 urchin -v test 2016-01-29 17:14:34 +00:00
Thomas Levine
bc74b20c5c add authors 2016-01-28 15:33:43 +00:00
Thomas Levine
8bdd00c3e9 explain the branching 2016-01-28 15:30:59 +00:00
Thomas Levine
42dd0947e8 more changes 2016-01-28 15:28:36 +00:00
Thomas Levine
da6d89aa56 add to change log 2016-01-28 15:27:32 +00:00
Thomas Levine
3ea035d188 rename test to be more clear 2016-01-28 15:24:24 +00:00
Thomas Levine
8e669c40a6 add + indent symbol so directories line up 2016-01-28 15:23:14 +00:00
Thomas Levine
66c010b694 fix fixture to not expect stderr 2016-01-28 15:23:14 +00:00
Thomas Levine
7339e84d7c test stdout stderr for TAP 2016-01-28 15:23:14 +00:00
Thomas Levine
e364d40f3a TAP test 2016-01-28 15:23:14 +00:00
Thomas Levine
13e748d684 remove awk dependency in test suite
I'm on NixOS, so awk isn't in /usr/bin. I can search for it with
/usr/bin/env, but then I can't use -f in the shebang line.
2016-01-28 15:23:14 +00:00
Thomas Levine
bb42d27917 test plan 2016-01-28 15:23:14 +00:00
Thomas Levine
c1ec06c6fe logfile 2016-01-28 15:23:14 +00:00
Thomas Levine
5382946639 error on fail 2016-01-28 15:23:14 +00:00
Thomas Levine
144013c71c print skip count at end 2016-01-28 15:23:13 +00:00
Thomas Levine
009fd7ea05 print stdout for tap and not-tap 2016-01-28 15:23:13 +00:00
Thomas Levine
c3901fe175 tap indentation comments for directories 2016-01-28 15:23:13 +00:00
Thomas Levine
538c8437a7 assorted tap stuff 2016-01-28 15:23:13 +00:00
Thomas Levine
cd124e09ee more tap 2016-01-28 15:23:13 +00:00
Thomas Levine
d963f10be1 more tap 2016-01-28 15:23:13 +00:00
Thomas Levine
0ca55d155b oops 2016-01-28 15:23:13 +00:00
Thomas Levine
8d55550248 test test successes better 2016-01-28 15:23:13 +00:00
Thomas Levine
0f86778d79 convert indents to comments 2016-01-28 15:23:13 +00:00
Thomas Levine
92cb735bb7 start writing non-tap cases 2016-01-28 15:23:13 +00:00
Thomas Levine
c817355e94 not working 2016-01-28 15:23:13 +00:00
Thomas Levine
d4bedbbfcf first pass implementation of exit on fail 2016-01-28 15:23:13 +00:00
Thomas Levine
f6b57772f2 document unimplemented -e flag 2016-01-28 15:23:13 +00:00
Thomas Levine
72fa30e787 Test die on fail. 2016-01-28 15:23:13 +00:00
Thomas Levine
eda4a6e42c call urchin -s in cross-shell tests 2016-01-28 15:23:12 +00:00
Thomas Levine
df80586d79 remove "urchin -x" test 2016-01-28 15:23:12 +00:00
Thomas Levine
d525c1793b remove "urchin -x"
unnecessary now that shall exists
2016-01-28 15:23:12 +00:00
Thomas Levine
56a4e5d8af introduction paragraph 2016-01-25 14:06:33 +00:00
Thomas Levine
d81b7efdc3 asciibetical 2016-01-25 13:56:33 +00:00
Thomas Levine
7f5455739d update readme
* move shall reference to the right place
* further explain cross-shell testing methods
2016-01-25 13:49:36 +00:00
213 changed files with 2721 additions and 458 deletions

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "website"]
path = website
url = git@github.com:scraperwiki/urchin-website

9
AUTHORS Normal file
View File

@ -0,0 +1,9 @@
Authors
-------
David Jones
Michael Klement
Thomas Levine
Maintainer
-------
Thomas Levine <_@thomaslevine.com>

661
COPYING Normal file
View File

@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.

282
HISTORY
View File

@ -1,5 +1,285 @@
HISTORY
-------
=======
Version 0.2.0 (unstable)
---------------------
### Cross-OS testing
I have started testing Urchin across multiple operating systems.
This gives access to more shells, as some shels are easier to install on
certain operating systems.
With this cross-OS test suite, I have extended support to more shells.
A later version of Urchin could include a remote testing feature.
Version 0.1.0 (stable)
---------------------
This release includes breaking changes.
### Test root directory
We introduce a concept of the root directory of a test suite.
Such a concept is important in case you want to run subsets of your
test suite, as we need to know how far up to apply the setup
and teardown files.
The Urchin root directory is determined by moving higher in the directory
tree in search of a file named `.urchin_root`.
The closest directory that contains such a file is considered the root.
In the following filesystem, for example, `/a/b/c` would be the root.
mkdir -p /a/b/c/d
touch /a/b/c/d/e
chmod +x /a/b/c/d/e
touch /a/b/c/.urchin_root
urchin /a/b/c/d
There are two situations in which we would stop looking without having
found a `.urchin_root` file.
1. The system root, `/`, because we can't go any higher
2. A directory that starts with a dot, because an urchin call on a higher
directory would ignore such a directory
In either of these cases, Urchin uses the user-specified directory as
the root; this is how Urchin `0.0.*` worked.
### Molly guard
The Molly-guard works differently because it now considers the test suite
root directory. The point of the Molly-guard originally was to protect
you from things like this.
urchin /
Urchin would run fine if called on a directory named something like "test",
urchin test
and it would fail on directories named something else, like `/`.
Unfortunately, it would also fail on directories like this.
urchin test/database
It now now looks instead at the basename of the test suite root directory and
otherwise ignores the entered directory. Urchin runs without error if the basename contains the phrase "test".
As before, you can override the Molly guard with `-f`.
urchin -f build-scripts
### Consolidation of temporary files in /tmp
All of Urchin's temporary files are now stored in /tmp. Urchin previously
created `.urchin.log` files alongside the tests, which led to such
inconveniences as accidentally commiting them to version control repositories.
This also means that Urchin will keep all of its temporary files in RAM
if you mount a tmpfs on /tmp. On large test suites you may find the tmpfs
to be slightly faster than slower storage media like solid-state drives.
### Skipping of tests
Previously, tests were run if they were executable and were otherwise marked
as skipped. Now, an executable script can indicate that it is skipped by
exiting with code 3. For example, if a test requires some dependancy, it
might look for the dependency and then skip if it does not see the dependency.
It might look like this.
#!/bin/sh
if ! which inkscape; then
exit 3 # status code 3 for skip
fi
inkscape blah blah ...
I chose status code 3 sort of arbitrarily at first, but it turns out that it
would the appropriate status code if these tests were Nagios plugins, as the
concept of skipping a test is similar to the Nagios concept of unknown service
status (https://nagios-plugins.org/doc/guidelines.html#AEN78).
### Parallel test execution
Tests now run in parallel when possible.
Parallel processes come about in two situations when parallel execution is
turned on.
1. All files and immediate subdirectories of one particular directory
are run in parallel. This happens recursively; during the execution
of each particular subdirectory, that subdirectory's children are
also run in parallel.
2. When cycling of shells is enabled, execution of a particular file in
different shells are run parellel.
Parallel processing and shell cycling are both enabled by default.
You may want make only some directories run in series, you can create
".urchin_dir" files in those directories.
If .urchin_dir contains the phrase "series", run that directory in series
rather than in parallel.
This is helpful when directories actually need to run in series
and also when running all your tests in parallel crashes your computer.
### Options
Long options are now available for all command line flags.
For example, the `-s` flag is now available as `--shell` as well.
See the help for the full list.
urchin -h
### Copyrights
Some people had contributed to Urchin but had not been added to the copyright
notice. I have updated the copyright notice to include everyone whom I believe
to have contributed patches.
### License
I, Thomas Levine, have switched the previous BSD-style license for the Afferro
Gnu Public License (AGPL) after determining that the added restrictions in the
AGPL shouldn't have any practical legal consequences for people who want to
use Urchin. I did not get approval from the other authors as I believe the
licenses to be compatible. Here are the considerations that I considered.
#### History
ScraperWiki owns the original version of Urchin (Thomas Levine did the early
work as part of his work for ScraperWiki.) and originally licensed it under a
BSD-style license with the advertising clauses removed. (This makes it a
"2-clause BSD license", similar to the FreeBSD license.) We had the previous
license just because that's what ScraperWiki put on everything.
Other people made changes after this original ScraperWiki version. As of
January 2016, they are just Thomas Levine (when he wasn't working for
ScraperWiki) and Michael Klement.
The 2-clause BSD license grants pretty much all rights. It says that you need
to attribute when you redistribute source code, but you don't necessarily have
to redistribute source code.
#### License compatibility
A copyleft license adds the restriction that modified versions of the code
need to be licensed under the same license. GNU licenses in particular require
that source code be released if non-source versions are released, and the
different GNU licenses differ in what how the non-source version is defined.
(The original, GPL, discusses compiled binaries, for example.) Copyleft
doesn't mean anything specific for commercial use.
Code licensed under the 2-clause BSD license can be modified and then licensed
as AGPL, because the 2-clause BSD license license allows that, but AGPL code
can't be modified as 2-clause BSD, because AGPL doesn't allow that.
Of course, if we get all of the authors to agree on it, we can always add
whatever crazy license we want, regardless of what we have already.
#### Practical differences
The distinction between the permissive 2-clause BSD license and the AGPL seem
to matter quite little in the case of Urchin.
1. Urchin is written in an interpreted language (shell), so it would be
hard to distribute usefully without providing the source code.
2. Urchin usually just runs tests; it doesn't get compiled with the rest of
the code (also because it's in shell). Thus, I think a GPL license on Urchin
wouldn't infect the code being tested.
### Specification of the shell to run tests in
Urchin previously had separate methods for setting the TEST_SHELL environment
variable and for setting the shell that would run the tests; the former was
set as an environment variable, and the latter was set with the -s flag..
Urchin now uses the -s flag for both of these settings, and it mostly ignores
the exported TEST_SHELL variable.
If you pass -n/--disable-cycling, Urchin will invoke tests ordinarily and will
only set the TEST_SHELL variable if it does not exist. If the TEST_SHELL
variable is absent, it will be set to /bin/sh.
Here is how you should write your tests for cross-shell testing, depending on
their structure.
* If you want a test file to run in the same shell every time and to have
access to the TEST_SHELL variable, usually for invoking the program that
you are testing, then set the file's shebang line.
* If you want a test file to be run in a different shell every time, do not
set the shebang line. TEST_SHELL variable will be set to correspond with the
shell that is presently invoking the test file, though you probably won't
need this variable.
* If you want a test file to have access to a TEST_SHELL variable that you
set yourself, pass -n/--disable-cycling to urchin. Urchin will ignore the
shebang lines in this case.
### Source setup and teardown
setup, teardown, setup_dir, and teardown_dir are now sourced instead of
executed; they are referenced a bit like this.
(
. ./setup
./$thetestfile
. ./teardown
)
My intent is that you should be able to export variables in the setup files.
I think it would be fine to invoke the teardown files instead of sourcing them,
but I chose to source them anyway for consistency.
The disadvantage of this, and the reason I have been reluctant to do it,
is that these files now become much harder to debug, so I recommend keeping
your setup and teardown files very simple. I recommend either of the following
strategies if your setup file gets complicated.
1. Rename it to something starting with a dot, and explicitly source it
in your test file.
2. Export a path in your setup file, rewrite your setup file as a shell
program, and put the rewritten file in your path.
### Run on a file
Previously you could run urchin only on a directory (and, in turn, all files
in that directory). Now you can run Urchin on a single file.
This occurred to me when I wanted to run
urchin test/fast/Unit\ tests/nvm_ls_current
on the nvm tests. I wound up running this instead.
urchin test/fast/Unit\ tests/ | grep nvm_ls_current
But now I don't have to; the first of these commands will work.
When you run urchin on a file, the test suite root is determined (as with any
other Urchin call), and the test suite is recursively descended. Setup and
teardown files are sourced, and everything but the specified test file is
otherwise ignored.
If you don't explicitly specify the Urchin root with a .urchin_root file, we
consider the test suite root directory to be the parent of the file that
you ran Urchin on.
### Verbose output
### Timing
Urchin now reports the time, in seconds, that each test took and also the
total time that it took to run the whole test suite.
Urchin also allows you to set timeouts, in seconds, with the --timeout flag.
If you set a timeout flag and a test file takes longer to run, that run will
be killed, and the test will thus fail. The standard error message from the
timeout program will show up in the test output.
Both of these timers use the real time (not the CPU time for example),
so the times are not very precise and may be much larger than you expect.
Version 0.0.6
---------------------
* Produce TAP output with the -t flag.
* Add a + sign in front of directories in the normal output so that they
line up with non-directories.
* Display skipped tests in the normal output and in the TAP output.
* Correct some things in the documentation.
* Rearrange things in the documentation to be more clear.
* Pass the -e flag to exit urchin if any single test fails.
* Remove the undocumented, experimental -x flag now that shall exists.
* Display version number with the -v flag.
* Document why Urchin is called "Urchin"
* Update TODO
* Support mksh (Change a printf command.)
* Make long lines shorter.
These changes are made somewhat separately in the branches "exit-on-fail",
"remove-urchin-x", "tap", and "update-readme". They are rebased into one
branch, "tlevine-2016-02", for merging into "master".
Version 0.0.5
---------------------

View File

@ -1,8 +0,0 @@
Copyright (c) 2012, ScraperWiki Limited
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

8
Makefile Normal file
View File

@ -0,0 +1,8 @@
.PHONY: test install
test:
./urchin tests
./urchin -s sh -v ./cross-os-tests
install:
cp ./urchin /usr/bin

294
TODO Normal file
View File

@ -0,0 +1,294 @@
Things I want
=============
Wider testing
--------------
Test in other environments
* Specify a few different ones with Nix.
* Some sort of BSD
* Windows
Packaging
------------
Package for package managers.
* I want NixOS, of course.
* Debian is probably the big one.
Other interesting package managers
* Update the npm package
* Homebrew (for Mac)
Windows
----------
Try running Urchin in Windows somehow. Interpreters include
* CygWin (https://www.cygwin.com/)
* https://cygwin.com/setup-x86.exe
* MSYS (http://mingw.org/wiki/msys)
* GNU on Windows (https://github.com/bmatzelle/gow/wiki)
* Git for Windows (https://git-scm.com/download/win)
* https://github.com/git-for-windows/git/releases/download/v2.7.2.windows.1/Git-2.7.2-32-bit.exe
* win-bash (http://win-bash.sourceforge.net/)
shall
----------
Add shall to my NYC*BUG talk.
#!/usr/bin/env shall
echo This runs in several shells.
Linters
-----------
List some shell linters somewhere.
* ShellCheck
* checkbashisms
Rename to something other than "test"?
----------
Maybe wait until I have a use for this.
More sort alternatives
-----------
awk
https://stackoverflow.com/questions/20250937/sorting-lines-in-a-file-alphabetically-using-awk-and-or-sed
bash
https://stackoverflow.com/questions/7442417/how-to-sort-an-array-in-bash
Alternatives
--------------
JSON.sh test suite
Running in multiple environments
-----------------------------------
Setup for other environments includes the following.
* Installing packages
* `touch .zshrc`
* Copy urchin and tests
Fixtures
------------
I want to change the way that fixtures are done.
Instead of using setup, teardown, &c., use ordinary programs from within
your tests. For example.
# tests/.fixtures/tmp-dir
tmp=$(mktemp -d)
cd $tmp
@$
code=$?
cd /
rm -Rf $tmp
exit $code
# tests/blah
../.fixtures/tmp-dir 'blah blah blah'
It's best if I can wrap a bunch of commands in braces or paratheses
rather than just one command. Is there a nice way to do that?
Once I have this new way, I guess I might as well keep the old way.
I think the setup, teardown thing can be easier if you only have simple
fixtures. And since I'm going to keep it, I'm going to add another one.
* setup_dir runs once for the present directory.
* setup_children runs once for each child.
* setup_file runs once for each file descendent.
The present `setup` is renamed to `setup_children`, and the new
`setup_file` runs on each file (not directory) that is a child,
grandchild, great-grandchild, and so on.
Dependency checking
----------------------
You might want to skip tests based on dependencies. Currently you can
conditionally skip tests one at a time by exiting with code 3. I want to
be able to skip an entire directory.
So we add a new magic file called `dep`. If it exists, it is run before
everything else in the directory.
* If it exits with code 0, tests continue as if dep did not exist.
* If it exits with code 3, all tests in the directory are marked as
skipped.
* If it exits with code 1, all tests in the directory are marked as
failed. To make the implementation easier, I'll probably treat the
directory as a single test in this case.
A note on magic files
-------------------------
It is nice to have access to things like setup and dep (magic files)
once in a while, but you need to be doing rather substantial testing
before they make your test suite simpler; the documentation should
strongly recommend writing your tests without magic files and then
refactoring and only then considering moving things to magic files.
Remote testing
----------------
In order to test Urchin across multiple operating systems, I have
already added tests in Urchin's test suite that run Urchin tests in
remote servers. I would like to move this to Urchin itself so that
Urchin can test other things on remote servers.
Urchin's output presently looks like this.
Cycling with the following shells: sh bash dash mksh zsh
Running tests at 2016-04-07T12:33:49
Flags/
> --timeout output
. bash (0 seconds)
. dash (0 seconds)
. mksh (0 seconds)
. sh (0 seconds)
. zsh (0 seconds)
Done, took 1 second.
5 tests passed.
0 tests skipped.
0 tests failed.
After the change, the output should look like this.
Cycling with the following shells: sh dash mksh
Running tests at 2016-04-07T12:33:49
Flags/
> --timeout output
. dash on localhost (0 seconds)
. dash on localhost:8080 (0 seconds)
. dash on tlevine@hpux.polarhome.com (0 seconds)
. mksh on localhost (0 seconds)
. mksh on tlevine@hpux.polarhome.com (0 seconds)
. sh on localhost (0 seconds)
. sh on localhost:8080 (0 seconds)
. sh on tlevine@hpux.polarhome.com (0 seconds)
Done, took 1 second.
8 tests passed.
0 tests skipped.
0 tests failed.
This is just how the output should look; the tests run in whatever order
makes sense.
Bugs
-------
Both md5sum and md5 should be supported.
Trouble logging in to hpux, irix, miros, netbsd, tru64, qnx, ....
$ rsync -e 'ssh -p 785' urchin tlevine@hpux.polarhome.com:.blah
HP-UX hpux.polarhome.com B.11.11 U 9000/785 (ta)
Welcome to HPUX/PA... member of polarhome.com realm
bash: rsync: command not found
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: remote command not found (code 127) at io.c(226)
[sender=3.1.1]
OpenIndiana grep does not support -q
I get `/urchin: syntax error at line 84: \`}' unexpected` on
unixware and solaris.
mktemp
> tlevine@hpux.polarhome.com -p 785
F sh (8 seconds)
|
| HP-UX hpux.polarhome.com B.11.11 U 9000/785 (ta)
| Welcome to HPUX/PA... member of polarhome.com realm
|
|
| HP-UX hpux.polarhome.com B.11.11 U 9000/785 (ta)
| Welcome to HPUX/PA... member of polarhome.com realm
|
| mktemp: option requires an argument -- d
| ./urchin[96]: /tmp/tlevinea21441/log: Cannot create the specified file.
date
tlevine@hpux64$ ./urchin tests/ -n -vv
date: bad format character - s
So I need a portable seconds-from epoch
I also need to handle when no arguments are passed to urchin.
Exit code is wrong for which on HP-UX
## `$(...)`
Solaris doesn't support `$(...)`; you need `\`...\`` instead.
tlevine@solaris$ ./urchin --run-in-series tests/Errors/
./urchin: syntax error at line 84: `tmp=$' unexpected
I use this a lot.
$ grep -c '\$(' urchin
52
Darn
Update tests to support
* md5
* rsync
* mktemp
* epoch
* Report cycling by default
* New format for reporting cycling
Support systems without rsync
BSD mktemp
| NetBSD 6.1.3
| Welcome to NetBSD ...member of polarhome.com realm
|
| Usage: mktemp [-dqu] [-p <tmpdir>] {-t prefix | template ...}
| mkdir: : No such file or directory
| ./urchin: cannot create /log: permission denied
NetBSD
md5: unknown option -- q
usage: cksum [-n] [-a algorithm [-ptx] [-s string]] [-o 1|2]
[file ... | -c [-w] [sumfile]]
Things I can use to make things better
------------------------
${x##*blah}
$IFS and set --
Redirection, especiall <<-
Maybe fifo
for x in "$@"
until
readonly
getopts
Variable assignments specified with special built-in utilities remain in
effect after the built-in completes; this shall not be the case with a
regular built-in or other utility.

View File

@ -1,2 +0,0 @@
Totally different syntax and similar features, plus TAP output
https://github.com/sstephenson/bats

14
cross-os-tests/.run Executable file
View File

@ -0,0 +1,14 @@
params="$(basename "${0}")"
hostname="$(echo "${params}" | cut -d\ -f1)"
if echo "${params}" | grep -q \ ; then
flags="$(echo "${params}" | cut -d\ -f2-)"
fi
urchin_dir=.urchin-cross-shell-test
rsync --archive -e "ssh ${flags}" $RSYNC_FLAGS \
../urchin ../tests "${hostname}":"${urchin_dir}" ||
scp -r ${flags} ../urchin ../tests "${hostname}":"${urchin_dir}"
ssh "${hostname}" ${flags} \
"cd ${urchin_dir} && ./urchin --run-in-series tests"

View File

@ -0,0 +1,3 @@
#!/bin/sh
# apt-get install bash dash ksh posh pdksh mksh yash zsh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,3 @@
#!/bin/sh
RSYNC_FLAGS='--rsync-path=/usr/local/bin/rsync'
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,3 @@
#!/bin/sh
# SSH public key needs to be in ~/.etc/ssh/authorized_keys
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -0,0 +1,2 @@
#!/bin/sh
. ./.run

View File

@ -1,15 +0,0 @@
#!/bin/sh
# Run urchin in a bunch of different shells,
# including a shell that isn't quite POSIX-compatible (zsh)
for shell in dash bash ksh zsh; do
if which $shell > /dev/null 2> /dev/null; then
echo
echo Running urchin tests in $shell
$shell urchin tests | tail -n 3
else
echo
echo Skipping $shell because it is not in the PATH
fi
done
echo

98
docs/SORTING Normal file
View File

@ -0,0 +1,98 @@
On the criteria for ordering
==============================
I was confused by the documentation for sort's "-d" flag. This confusion
relates to GNU coreutil's locale-specific sort. [^]
Below I discuss sort order differences between different implementations
of sort and of sh "*" for my particular environments.
Sorting with sort
------------
Consider the following two sort commands.
printf '@ b\n- d\n? a\n~ c\n! e\n' | sort
printf '@ b\n- d\n? a\n~ c\n! e\n' | sort -d
With BusyBox v1.23.2 on NixOS 15.09, the first of these commands returns
ASCIIbetical order,
! e
- d
? a
@ b
~ c
and the second returns dictionary order.
? a
@ b
~ c
- d
! e
With GNU coreutils version 8.24 on NixOS, both commands return
dictionary order. The same is true for GNU coreutils version 8.23 on
Debian Wheezy.
? a
@ b
~ c
- d
! e
IEEE Std 1003.1, 2013 Edition [^^] specifies that the "-d" flag should
enable dictionary order. All of these versions of sort have clear
documentation about the order that should be returned when the "-d" flag
is set, (See --help, man, or info.) and the implementations match the
documentation as far as I can tell.
I have found no explicit documentation from any relevant source as to
what the default sort order should be. On the other hand, they all
suggest that "-d" produces an order different from the default order.
In GNU coreutils 8.24, for example, "-d" is a direction to "consider
only blanks and alphanumeric characters". It lacks any mention that the
"-d" flag has no effect or that it is the default. Furthermore, on my
first reading, I took it to mean that the default is to consider all
characters and that "-d" limits the considered characters to blanks and
alphanumeric characters.
Sorting in *
-------------
I think this is related to the order returned by "*" in sh.
The following sh code creates several files in a directory and then
calls "*", listing them in order.
printf '@ b\n- d\n? a\n~ c\n! e\n' | while read line; do
touch -- "${line}"
done
for file in *; do echo "$file"; done
On one computer, running FreeBSD, the order is apparently
ASCIIbetical.
! e
- d
? a
@ b
~ c
On two GNU systems, running NixOS and Debian, respectively, output is
in dictionary order. I'm not exactly sure what dictionary order is, but
it is something like sorting on the alphabetical characters before
sorting on the rest of the line.
? a
@ b
~ c
- d
! e
(I don't really know what dictionary order is, I was able to determine
that the above results are in dictionary order because of my investigation of
incompatible implementations of sort.)
[^] https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Sort-does-not-sort-in-normal-order_0021
[^^] http://pubs.opengroup.org/onlinepubs/9699919799/

109
docs/execution-flow Normal file
View File

@ -0,0 +1,109 @@
Here I discuss Urchin's general execution flow and how it is handled
specifically when tests are run on remote environments.
Steps of an Urchin run
----------------------
When Urchin runs a directory of files, it goes through the following
steps.
1. Head
2. Test
3. Foot
4. Reporting
Urchin stores files in a temporary directory, creating a new directory
on each invocation. The directory contains these things.
* head (file)
* test (file)
* foot (file)
* stdout (directory)
When run on remotes, the temporary directory corresponding to the local
master process additionally has these files.
* remote-test
Messages from the head, test, and foot steps go in the corresponding
files. In the head and foot phases, messages are just simple prints.
Messages from the test phase always correspond to a particular test
file, and they are written to the test file in a delimiter-separated
format.
Stdout and stderr from test runs are written to files in the stdout
directory, one file per test file per shell that the file is run in.
The reporting phase
----------------------
In most cases Urchin begins printing to the screen only during the
reporting phase. The only case where anything is printed beforehand is
when Urchin is run with -vvvv; that sets "+x", so the commands are
printed as they run, though all other output is still suppressed.
Test results are reported in the reporting phase. Four output formats
are available.
1. Urchin's human-readable format (default)
2. Test Anything Protocol
3. Delimiter-separated values (used internally)
4. Remote Urchin worker output
Most of the output is generated based on the delimiter-separated values
in the test log file. The first two formats also include stdout and
stderr from the tests, depending on verbosity level flags; when it needs
these, Urchin reads them from appropriate files in the temporary
directory.
I could discuss the further details of each format elsewhere.
Remotes
----------------------
When Urchin runs tests on a remote, it copies tests to the remote and
then calls Urchin on the remote with "--format=remote". This specifies
the following.
* The temporary directory should be kept, rather than deleted, after
Urchin runs.
* The path of the temporary directory should be printed as output.
* No other output should be printed to stdout.
After the remote Urchin finishes running, the local urchin downloads
the remote Urchin's test log file from the temporary directory.
It modifies the file to include the remote's name and then concatenates
the result to the "remote-test" file in the local temporary directory.
For example, the file from the remote might look like this,
:sh:Counting tests/.test/faila:0:not_ok
and the result might look like this.
nsa:sh:Counting tests/.test/faila:0:not_ok
This gets processed in the reporting step like usual, according to
whatever format is specified. Instead of printing just "sh" as the
environment in which the particular test was run, the report will print
"sh on nsa".
When it needs the stdout files, it prints them over ssh.
New flags
----------
In making this remotes feature, I wound up adding some others.
-r, --remote SSH host to use as a remote
-F, --format Output format, one of "urchin", "tap", "dsv", "remote"
Urchin runs only locally by default. If you pass at least one --remote
flag, Urchin runs tests only on the specified remotes; it can't run both
locally and remotely in the same run. If you want to do that, you could
wait until I add that feature, or you can add "localhost" as a remote.
Settings that I'm thinking about
* Port for rsync/ssh
* SSH protocol version
* --rsync-path
Can those all be set in ssh_config? Probably not --rsync-path, but
I guess I could just fix it on the remote.

View File

@ -0,0 +1,9 @@
with import <nixpkgs> {}; {
urchin = stdenv.mkDerivation {
name = "urchin";
buildInputs = [
busybox
bash dash mksh zsh
];
};
}

View File

@ -0,0 +1,39 @@
# A NixOS container to protect against accidental fork bombs
#
# Put this in /var/lib/containers/test/etc/nixos/configuration.nix
# See https://nixos.org/wiki/NixOS:Containers
{ config, lib, pkgs, ... }:
with lib;
{ boot.isContainer = true;
networking.hostName = mkDefault "urchin";
networking.useDHCP = false;
environment.systemPackages = with pkgs; [
# Urchin
bash dash mksh zsh
busybox
# Other
vim git rsync tmux
];
security.pam.loginLimits = [
# Prevent accidental fork bombs.
{ domain = "*"; item = "nproc"; type = "hard"; value = "200"; }
];
services.openssh = {
enable = true;
passwordAuthentication = false;
};
users.extraUsers.user = {
name = "tlevine";
uid = 1000;
isNormalUser = true;
home = "/home/tlevine";
extraGroups = [ "users" "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGvQyzr42/96acUTUedaeM2ee+DMt9bkxeurdeXji9sNE10MjjAUFtxPmSI8/BUZW2/a9ByblfaJEI+H+kFVPjVr+QGKXZluxcFMj2BLbH53fi9xLgoQRjb2aAXutb2Bp74/E8R1K+CuFfRRGQ5Spdnv44SLt04D6JbBLcLIcWTpQ4v5RaYr2U27jfiF9z0m+/opxvowEy2gnqlEXFxFk8jZHT4K0uLWm2ENjT6OpyOx8hWcKeAN2vRVRex3pJfSzswn0LpuCrM1rUZ4DRE+FABi8N21Q3MBaMRkwnZPwaZwKzv06q8bu23jYTqK5BrUPtOXeeVuroQXMc12H/6/Nh laptop"
];
};
}

View File

@ -0,0 +1,36 @@
#!/bin/sh
set -e
# Create the container.
if ! nixos-container list | grep ^urchin$ > /dev/null; then
sudo nixos-container create urchin
fi
# Configure the container.
sudo cp configuration.nix \
/var/lib/containers/urchin/etc/nixos/configuration.nix
sudo nixos-container update urchin
sudo nixos-container start urchin
# Create the git repository.
host="tlevine@$(nixos-container show-ip urchin)"
ssh "${host}" 'if mkdir urchin 2> /dev/null; then
cd urchin
git init
git config --add receive.denyCurrentBranch ignore
fi
'
# Push to the git repository
git push "${host}":urchin
# Print information
echo "Log in:
ssh ${host}
Add git remote
git remote add ${host} container
"

1
packages/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.tar.gz

11
packages/nongnu.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
name=urchin-$(../urchin --version)
tmp=$(mktemp -d)
mkdir $tmp/$name
cp ../urchin ../readme.md ../AUTHORS ../COPYING $tmp/$name
cd $tmp
tar czf $name.tar.gz $name
cd - > /dev/null
mv $tmp/$name.tar.gz .
rm -R $tmp

View File

@ -12,7 +12,7 @@
"bin": "./urchin",
"repository": {
"type": "git",
"url": "git://github.com/tlevine/urchin.git"
"url": "https://git.sdf.org/tlevine/urchin"
},
"keywords": [
"shell",

167
readme.md
View File

@ -1,40 +1,62 @@
**The repository at https://github.com/tlevine/urchin will go away. New location is https://git.sdf.org/tlevine/urchin.**
__ _
__ ____________/ /_ (_)___
/ / / / ___/ ___/ __ \/ / __ \
/ /_/ / / / /__/ / / / / / / /
\__,_/_/ \___/_/ /_/_/_/ /_/
Urchin is a test framework for shell. It is implemented in
portable /bin/sh and should work on GNU/Linux, Mac OS X, and
other Unix platforms.
Urchin is a portable shell program that runs a directory of Unix-style
programs and produces pretty output. It is normally used for testing
shell programs, where each test case corresponds to a single file in
the directory that Urchin runs.
Urchin is called "Urchin" because
[sea urchins](https://en.wikipedia.org/wiki/Sea_urchin)
have shells called "tests".
## Try it out
Urchin's tests are written in Urchin, so you can run them to see what Urchin
is like. Clone the repository
git clone git://github.com/tlevine/urchin.git
git clone https://git.sdf.org/tlevine/urchin
Run the tests
cd urchin
./urchin tests
The above command will run the tests in your system's default
shell, /bin/sh (on recent Ubuntu this is dash, but it could be
ksh or bash on other systems); to test urchin's cross-shell compatibility,
run this:
## Dependencies
Urchin depends on the following programs.
cd urchin
./cross-shell-tests
* sh
* echo
* printf
* mktemp
* readlink
* basename
* dirname
* sed
* grep
* cut
* true
* false
* which
* timeout
* sort
## Globally
Download Urchin like so (as root) (or use npm, below):
Vanilla installations of modern BSD and GNU systems usually include all
of these programs.
## Install
Urchin is contained in a single file, so you can install it by copying it to a
directory in your `PATH`. For example, you can run the following as root.
cd /usr/local/bin
wget https://raw.github.com/tlevine/urchin/master/urchin
wget https://git.sdf.org/tlevine/urchin/raw/branch/master/urchin
chmod +x urchin
Can be installed with npm too:
Urchin can be installed with npm too.
npm install -g urchin
@ -76,24 +98,47 @@ and directories have special meanings.
teardown
Directories are processed in a depth-first order. When a particular directory
is processed, `setup_dir` is run before everything else in the directory, including
subdirectories. `teardown_dir` is run after everything else in the directory.
is processed, `setup_dir` is sourced before everything else in the directory,
including subdirectories. `teardown_dir` is sourced after everything else in
the directory.
A directory's `setup` file, if it exists, is run right before each test file
within the particular directory, and the `teardown` file is run right after.
A directory's `setup` file, if it exists, is sourced right before each test
file within the particular directory is run, and the `teardown` file is
sourced right after.
Files are only run if they are executable, and files beginning with `.` are
ignored. Thus, fixtures and libraries can be included sloppily within the test
directory tree. The test passes if the file exits 0; otherwise, it fails.
In case you care about the order in which your tests execute, consider that
urchin looks for files within a directory in the following manner.
urchin looks for files within a directory in the following manner,
for file in *; do
do_something_with_test_file $file
done
Tests within a directory are executed in whatever order `*` returns.
so files are run in whatever order `*` produces. The order is
configured in your environment, at least in
[GNU systems](https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Sort-does-not-sort-in-normal-order_0021).
Other systems may ignore the locales configured in the environment and
always produce ASCIIbetical order.
Results are always printed in ASCIIbetical order, regardless of what
order the tests ran in.
Below you can see how the locale can affect the order.
$ printf '!c\n@a\n~b\n' | LC_COLLATE=C sort
!c
@a
~b
$ printf '!c\n@a\n~b\n' | LC_COLLATE=en_US.UTF-8 sort
@a
~b
!c
$ printf '!c\n@a\n~b\n' | sort -d
@a
~b
!c
### Writing cross-shell compatibility tests for testing shell code
@ -106,75 +151,55 @@ The specific approach depends on your test scenario:
* (b) Your scripts _source_ scripts containing portable shell code.
#### (a) Cross-shell tests with test scripts that _invoke_ shell scripts
Urchin sets the `TEST_SHELL` environment variable so that you may change the
shell with which your tests call other shell programs. To run your test
scripts in multiple shells you must call `$TEST_SHELL` in your tests and then
run urchin with the appropriate option.
First, consider using [shall](https://github.com/mklement0/shall).
#!/usr/bin/env shall
echo This is a test file.
Alternatively, you can use urchin's built-in recognition of the
`TEST_SHELL` environment variable.
In your test scripts, invoke the shell scripts to test via the shell
specified in environment variable `TEST_SHELL` rather than directly;
e.g.: `$TEST_SHELL ../foo bar` (rather than just `../foo bar`).
Note that if you alsow want your test scripts to work when run directly,
outside of Urchin, be sure to target scripts that happen to be in the
current directory with prefix `./`; e.g., `$TEST_SHELL ./baz`
(rather than `$TEST_SHELL baz`).
Then, on invocation of Urchin, prepend a definition of environment variable
`TEST_SHELL` specifying the shell to test with, e.g.: `TEST_SHELL=zsh urchin ./tests`.
To test with multiple shells in sequence, use something like:
Urchin runs tests in multiple different shells by default; Urchin has a
list of default shells, and the following command will run your tests in
all of those shells that Urchin detects.
for shell in sh bash ksh zsh; do
TEST_SHELL=$shell urchin ./tests
done
./urchin ./tests
You can override the default list of shells with the `-s` flag.
urchin -s sh -s ksh ./tests
You can also
If `TEST_SHELL` has no value, Urchin defines it as `/bin/sh`, so the test
scripts can rely on `$TEST_SHELL` always containing a value.
scripts can rely on `$TEST_SHELL` always containing a value when Urchin runs
them.
That said, we still recommand that you account for the possibility that
`$TEST_SHELL` does not contain a value so that you may run your test scripts
without Urchin. Supporting this case is very simple; when you invoke scripts
that happen to be in the current directory, be sure to use the prefix `./`,
e.g., `$TEST_SHELL ./baz` rather than `$TEST_SHELL baz`.
#### (b) Cross-shell tests with test scripts that _source_ shell scripts
If you _source_ shell code in your test scripts, it is the test scripts
themselves that must be run with the shell specified.
To that end, Urchin supports the `-s <shell>` option, which instructs
Urchin supports the `-s <shell>` option, which instructs
Urchin to invoke the test scripts with the specified shell; e.g., `-s bash`.
(In addition, Urchin sets environment variable `TEST_SHELL` to the specified
shell.)
Note that only test scripts that either have no shebang line at all or
have shebang line `#!/bin/sh` are invoked with the specified shell.
This allows non-shell test scripts or test scripts for specific
shells to coexist with those whose invocation should be controlled by `-s`.
This allows non-shell test scripts or test scripts for other languages
or for specific shells to coexist with those whose invocation should be
controlled by `-s`.
To test with multiple shells in sequence, use something like:
## References
for shell in sh bash ksh zsh; do
urchin -s $shell ./tests
done
On shell programming
<!--
#### (c) Cross shell tests with `urchin -x` (experimental)
If you run urchin with the `-x` flag, it will be as if you ran
`$TEST_SHELL`. Unless `$TEST_SHELL` isn't set, in which case it'll
be as if you ran `/bin/sh`. Putting this in she shebang line might
eventually work out to be a cleaner way of doing cross-shell testing.
#!/usr/bin/env urchin -x
test a = a
It might make sense if you do this.
export TEST_SHELL=zsh && urchin -x
export TEST_SHELL=bash && urchin -x
-->
## Alternatives to Urchin
Alternatives to Urchin are discussed in
[this blog post](https://blog.scraperwiki.com/2012/12/how-to-test-shell-scripts/).
## Ideas for new features
* Support [Nagios plugins](https://nagios-plugins.org/doc/guidelines.html)
* Stop running if a test fails so one can use Urchin as a
[setup framework](https://github.com/tlevine/urchin/issues/16).
* http://blackskyresearch.net/shelltables.txt
* http://blackskyresearch.net/try.sh.txt

View File

@ -1,3 +0,0 @@
#!/bin/sh
[ -f / ]

View File

@ -1,3 +0,0 @@
#!/bin/sh
[ -e / ]

2
tests/.gitignore vendored
View File

@ -1,2 +0,0 @@
.urchin.log
.urchin_stdout

View File

@ -1 +0,0 @@
echo $3

1
tests/.urchin_dir Normal file
View File

@ -0,0 +1 @@
series

View File

@ -1,6 +0,0 @@
#!/bin/sh
cd ..
export CDPATH=$PWD
./urchin -f 'tests/urchin exit code' >/dev/null

View File

@ -1,3 +0,0 @@
#!/bin/sh
../../urchin -h|grep -- -f

View File

@ -1,3 +0,0 @@
#!/bin/sh
../../urchin -h | grep -- -s

View File

@ -1,3 +0,0 @@
#!/bin/sh
../../urchin -h

View File

@ -0,0 +1 @@
true

View File

@ -0,0 +1,2 @@
#!/bin/sh
$TEST_SHELL ../../urchin -s sh .test-one | grep '1 test failed'

View File

@ -0,0 +1,2 @@
#!/bin/sh
$TEST_SHELL ../../urchin -s sh .test-one | grep '1 test passed'

View File

@ -0,0 +1,2 @@
#!/bin/sh
$TEST_SHELL ../../urchin -s sh .test | grep '7 tests passed.'

View File

@ -0,0 +1,2 @@
#!/bin/sh
$TEST_SHELL ../../urchin -s sh .test | grep '3 tests failed.'

View File

@ -1,2 +0,0 @@
#!/bin/sh
../../urchin .test-one | grep '1 test failed'

View File

@ -1,2 +0,0 @@
#!/bin/sh
../../urchin .test-one | grep '1 test passed'

View File

@ -1,3 +0,0 @@
#!/bin/sh
../../urchin .test | grep '7 tests passed.'

View File

@ -1,3 +0,0 @@
#!/bin/sh
../../urchin .test | grep '3 tests failed.'

View File

@ -1,7 +0,0 @@
#!/bin/sh
# Assuming that urchin was invoked with `TEST_SHELL=bash urchin ...`, $TEST_SHELL should contain 'bash'.
echo "\$TEST_SHELL: $TEST_SHELL"
[ "$TEST_SHELL" = 'bash' ]

View File

@ -1,5 +0,0 @@
#!/usr/bin/awk -f
# This script will only succeed if it is indeed processed by awk.
BEGIN { print "ok" }

View File

@ -1,10 +0,0 @@
#!/bin/sh
# Assuming that urchin was invoked with `-s bash`, this script should be being run with bash.
this_shell=$(ps -o comm= -p $$ && :)
echo "Running shell: $this_shell"
[ "$this_shell" = 'bash' ]

View File

@ -1,9 +0,0 @@
#!/bin/sh
# Assuming that urchin was invoked with `-s bash`, $TEST_SHELL should contain 'bash'.
echo "Running shell: $(ps -o comm= -p $$ && :)"
echo "\$TEST_SHELL: $TEST_SHELL"
[ "$TEST_SHELL" = 'bash' ]

View File

@ -1,8 +0,0 @@
#!/bin/sh
# Tests the `-s <shell> option, which invokes shebang-less and sh-shebang-line test scripts with the specified shell (for testing *sourced* shell code).
which bash >/dev/null || { echo "Cannot test -s option: bash cannot be located." >&2; exit 2; }
which /usr/bin/awk >/dev/null || { echo "Cannot test -s option: /usr/bin/awk not found." >&2; exit 2; }
../../urchin -s bash ./.test-run-by-specified-shell

View File

@ -0,0 +1 @@
/bin/sh

View File

@ -0,0 +1,11 @@
#!/bin/sh
# Assuming that urchin was invoked with this,
#
# TEST_SHELL=$PWD/.special-shell urchin ...
#
# $TEST_SHELL should contain '.special-shell'
echo "\$TEST_SHELL: $TEST_SHELL"
basename "$TEST_SHELL" | grep '.special-shell'

View File

@ -0,0 +1,3 @@
#!/usr/bin/env true
true will processed the contents of this script, but that
means that nothing will happen and the script will exit 0

View File

@ -0,0 +1,6 @@
#!/bin/sh
# Assuming that urchin was invoked with `-s bash`,
# this script should be being run with bash.
ps -o pid,comm,args | grep $$ | grep .special-shell

View File

@ -1,10 +1,10 @@
# By design, this file has no shebang line.
set -e
# Assuming that urchin was invoked with `-s bash`, this script should be being run with bash.
this_shell=$(ps -o comm= -p $$ && :)
this_shell="$(ps -o pid,comm | sed -n "s/^ *$$//p" | cut -d\ -f2)"
echo "Running shell: $this_shell"
[ "$this_shell" = 'bash' ]
basename "$this_shell" | grep .special-shell

View File

@ -0,0 +1,10 @@
#!/bin/sh
# Assuming that urchin was invoked with `-s bash`, $TEST_SHELL should contain 'bash'.
this_shell=$(ps -o pid,comm | sed -n "s/^ *$$//p" | cut -d\ -f2)
echo "Running shell: $this_shell"
echo "\$TEST_SHELL: $TEST_SHELL"
echo "$TEST_SHELL" | grep .special-shell

View File

@ -3,7 +3,6 @@
# Tests support for either passing through or defining a default value for environment variable TEST_SHELL.
# (for test scripts that want to invoke shell scripts with a specified shell).
which bash 2>/dev/null || { echo "Cannot test -s option: bash cannot be located." >&2; exit 1; }
# Test if $TEST_SHELL, when placed in urchin's environment, is passed through to the test scripts.
TEST_SHELL=bash ../../urchin ./.test-TEST_SHELL-passed-through
TEST_SHELL=.special-shell $TEST_SHELL \
../../urchin --disable-cycling ./.test-TEST_SHELL-passed-through

View File

@ -5,4 +5,5 @@
# Test if $TEST_SHELL - if *defined, but empty* - is exported with value '/bin/sh' by urchin
# and thus has that value inside the scripts.
TEST_SHELL= ../../urchin ./.test-TEST_SHELL-undefined_or_empty
TEST_SHELL= $TEST_SHELL \
../../urchin ./.test-TEST_SHELL-undefined_or_empty

View File

@ -5,5 +5,7 @@
# Test if $TEST_SHELL - if *undefined* - is exported with value '/bin/sh' by urchin
# and thus has that value inside test scripts.
s="$TEST_SHELL"
unset -v TEST_SHELL
../../urchin ./.test-TEST_SHELL-undefined_or_empty
"$s" ../../urchin ./.test-TEST_SHELL-undefined_or_empty

View File

@ -0,0 +1,5 @@
#!/bin/sh
# Tests the `-s <shell> option, which invokes shebang-less test scripts with
# the specified shell (for testing *sourced* shell code).
../../urchin -s .special-shell ./.test-run-by-specified-shell

View File

@ -0,0 +1 @@
export PATH="$PWD:$PATH"

View File

View File

@ -0,0 +1 @@
false

View File

@ -0,0 +1 @@
true

View File

View File

@ -0,0 +1 @@
$TEST_SHELL ../../urchin '.test/This test passes'

View File

@ -0,0 +1 @@
$TEST_SHELL ../../urchin '.test/This test skips'

View File

@ -0,0 +1,2 @@
$TEST_SHELL ../../urchin '.test/This test fails'
test $? -eq 1

Some files were not shown because too many files have changed in this diff Show More