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
008d8a2829
test tap format
...
and find new cross-shell bugs in urchin!
2016-02-28 20:03:49 +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
77da4ce194
generating tests
2016-02-28 19:18:54 +00:00
Thomas Levine
4c84456574
formatting
2016-02-28 18:41:00 +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
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
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
bb103757e4
implement exit code 3 thing
2016-02-26 17:37:39 +00:00
Thomas Levine
43674f12e2
more accepting molly-guard
2016-02-26 16:23:41 +00:00
Thomas Levine
87bb9f4660
link to COPYING file on web
2016-02-08 16:09:00 +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
2ac3a52707
fix printf to work in mksh
2016-02-08 15:50:12 +00:00
Thomas Levine
2be0151213
document the --help flag
2016-01-29 17:20:18 +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
8e669c40a6
add + indent symbol so directories line up
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
d525c1793b
remove "urchin -x"
...
unnecessary now that shall exists
2016-01-28 15:23:12 +00:00
Michael Klement
0385dcd86e
Fixed blog link in read-me and commented out experimental -x option for now.
2014-12-05 18:50:19 -05:00
Michael Klement
2847b020b4
Make sure that CDPATH isn't set, as it causes cd
to behave unpredictably - notably, it can produce output, which breaks fullpath().
...
Also: Improved CLI help, updated URLs in read-me, cleaned up package.json:
I've tried to clarify the intent of `-x` in the CLI help, but I haven't touched the read-me in that respect.
I don't see any benefit to `-x`:
* Just using `#/bin/sh` as the shebang line in combination with `-s <shell>` gives you the same functionality,
* When it comes to invoking scripts from _within_ test scripts, nothing can do the work for you: you consciously have to mark the invocation with _something_ to indicate that it should be controlled from the outside; it won't get any easier than `$TEST_SHELL ...`
* Finally, using a shebang line such as `#!/usr/bin/env urchin -x` is problematic for two reasons:
* Some platforms can handle only *1* argument in a shebang line.
* In a _package-local_ installation, `#!/usr/bin/env` may not find the Urchin executable.
I'm also not sure how the following (from `readme.md`) fits in the picture:
> It might make sense if you do this.
export TEST_SHELL=zsh && urchin -x
export TEST_SHELL=bash && urchin -x
(As an aside: To achieve the same thing, you don't need `export`; `TEST_SHELL=zsh urchin -x` and `TEST_SHELL=bash urchin -x` is the better choice.)
How does this relate to use in a _shebang line_?
`urchin_help()` now uses a here-doc: easier to maintain, and should work in all Bourne-like shells.
`readmeFilename` removed from `package.json`:
> "The readmeFilename does not need to ever be in your actual package.json file" - npm/npm#3573
2014-12-03 09:54:15 -05:00
Michael Klement
fae24e926a
Improved CLI help, updated URLs in read-me
2014-11-06 22:21:05 -05:00
Thomas Levine
90abc2640d
update the -h help text
2014-11-05 17:49:53 +00:00
Thomas Levine
bf8c404784
fix -sh
2014-11-05 17:46:19 +00:00
Thomas Levine
bb41d5a156
zsh support
2014-11-05 17:38:22 +00:00
Thomas Levine
1f115df222
urchin -sh
2014-11-05 17:18:31 +00:00
Michael Klement
2f97421164
Hint added to read-me re standalone invocation of tests that use TEST_SHELL; revision of wording in read-me; argument checking no longer treats a missing dir. argument as an explicitly specified argument.
2014-10-18 10:34:30 -04:00
Michael Klement
1e9611e732
Support for cross-shell testing added, via option -s <shell>
and env. variable TEST_SHELL
.
...
* For **tests that _source_ shell scripts**: **option `-s <shell>`** now tells urchin to invoke test scripts with the specified shell (only shebang-less and `#!/bin/sh` tests scripts).
* For **tests that _invoke_ schell scripts**: instruct users to write their tests to always **invoke via environment variable `TEST_SHELL` (e.g., `$TEST_SHELL ../foo`)**, and invoke urchin with that variable defined as needed, e.g., `TEST_SHELL=ksh urchin ./tests`; urchin defaults `TEST_SHELL` to `/bin/sh`.
See updated `readme.md` for details.
2014-10-17 17:16:12 -04:00
Michael Klement
deb77cb5de
Various bug fixes and cleanup.
...
* bug fixes:
* fixed directory-existence argument check
* fixed how `.urchin_stdout` files are cleaned up
* fixed instances of error/warning messages outputting to stdout instead of stderr
* documentation, help and error-message improvements:
* added specific error message if the (non-option) argument is not a directory
* improved wording of CLI help
* readme.md: replaced obsolete URL http://www.urchin.sh with https://github.com/scraperwiki/urchin
* readme.md: made the fact clearer that `./cross-shell-tests` only tests urchin's _own_ cross-shell compatibility
* HISTORY: fixed typo
* formatting and logging improvements:
* added timestamp to the beginning of log files (`.urchin.log`)
* captured output from failed tests is now printed in *red* to draw attention
* test summary now prints the number of failed tests in the appropriate color for instant feedback (green, if none failed; red, otherwise)
* cleanup
* removed unused test files, simplified some tests
2014-10-16 16:37:51 -04:00
David Jones
b95b010c0d
Set the exit status to reflect pass/fail.
...
For Travis compatibility, we set the exit code to non-zero when
any tests fail.
Fixes #5 .
2014-03-17 13:43:13 +00:00
David Jones
8d53676743
Ensure we can cd into directories starting with a hyphen. Fixes #3 .
2013-07-26 12:51:01 +01:00
David Jones
31da4fae92
Print date and duration.
2013-06-28 10:48:43 +01:00
David Jones
e892c565cb
Removed spurious output from grep.
2013-06-28 10:47:51 +01:00
David Jones
0110a72965
remove pointless use of echo
2013-06-27 18:27:40 +01:00
David Jones
a900722fb7
Fix bug when test is called "-n"
2013-06-26 08:15:07 +01:00
David Jones
3062e58a75
Use singular / plural form correctly.
2013-06-20 18:56:29 +01:00
David Jones
31b3f89827
Make it a /bin/sh script. For greater good.
2013-06-19 07:46:31 +01:00
David Jones
ecc857a101
Replace bash-specific &> with portable equivalent.
2013-06-19 07:45:19 +01:00
David Jones
2470af64b4
Relocate stdout_file so that urchins in different directories do
...
not clash.
2013-06-19 07:34:07 +01:00
David Jones
feb2f1c26c
Add helpful --help option and give usage on bogus options.
2013-06-18 22:21:31 +01:00
David Jones
40f9a967c3
Replace non-portable use of echo -ne with entirely lovely and
...
portable printf.
2013-06-18 22:11:04 +01:00
Thomas Levine
0c6837cfbd
blah
2012-10-11 15:47:08 -04:00
Thomas Levine
a9558acec0
fullpath
2012-10-11 14:50:03 -04:00
Thomas Levine
f85970e7a8
improve readlink degredation
2012-10-11 14:25:40 -04:00
Thomas Levine
10802b89df
remove &>>
2012-10-11 14:00:55 -04:00
Thomas Levine
9c24cc2184
move constants
2012-10-11 02:34:20 -04:00
Thomas Levine
a5176e1262
refactor
2012-10-11 02:21:05 -04:00
Thomas Levine
a2d7b41ca1
better dir tchecking
2012-10-11 02:02:06 -04:00
Thomas Levine
b37756d5de
help
2012-10-11 01:52:29 -04:00
Thomas Levine
a1b8922901
flags
2012-10-11 01:46:02 -04:00
Thomas Levine
ccef0dfbce
white space
2012-10-11 01:17:20 -04:00
Thomas Levine
d2cfa34be8
stdout is weird
2012-10-11 01:15:48 -04:00
Thomas Levine
99ae54e992
counting
2012-10-11 01:10:43 -04:00
Thomas Levine
83b0e53536
hierarchy
2012-10-10 20:43:13 -04:00
Thomas Levine
a145e75907
log setup/teardown stuff
2012-10-10 20:31:18 -04:00
Thomas Levine
103f571059
oops, don't source
2012-10-10 19:46:58 -04:00
Thomas Levine
be4a5fc698
take an argument
2012-10-10 15:51:06 -04:00
Thomas Levine
1bd7b4adf6
changes
2012-10-10 15:47:21 -04:00
Thomas Levine
693e6cd438
oops
2012-10-10 14:43:41 -04:00
Thomas Levine
ea5e74b03e
oops exit code
2012-10-10 14:40:49 -04:00
Thomas Levine
f79da9215c
hide all output
2012-10-10 14:30:34 -04:00
Thomas Levine
59b3497af1
setup_dir v setup
2012-10-10 14:25:44 -04:00
Thomas Levine
065e72eb7a
stuff
2012-10-10 06:09:18 -04:00
Zarino Zappia
a70f1f6033
pretty test output, and test stdout written to temporary file
2012-10-09 16:45:20 +01:00
Thomas Levine
1dec252a52
urchin usage help thingy
2012-10-08 10:43:14 -04:00
Thomas Levine
9c88b9d5d4
make test name red
2012-10-08 10:34:17 -04:00
Thomas Levine
45df979ec5
setup sourcing test
2012-10-08 10:29:15 -04:00
Thomas Levine
0be1383078
match the source in the docs
2012-10-08 10:25:23 -04:00
Thomas Levine
accdf268d8
allow starting in the correct directory
2012-10-08 10:18:48 -04:00
Thomas Levine
82f17b7172
docs
2012-10-08 10:16:49 -04:00
Thomas Levine
f57ee0d217
print name of failing test
2012-10-08 09:26:44 -04:00
Thomas Levine
6685bc6182
run executable stuff
2012-10-08 08:59:14 -04:00
Thomas Levine
05c478baa9
meta-tests
2012-10-08 08:50:48 -04:00
Thomas Levine
3368947b3b
main
2012-10-04 12:43:49 -04:00
Thomas Levine
d0d4593ce8
aoeu
2012-10-04 07:32:33 -04:00
Thomas Levine
c21599318f
recurse function
2012-10-04 07:29:34 -04:00
Thomas Levine
5384988326
add urchin
2012-10-04 07:24:03 -04:00