On Thu 31 Jan 2008 at 09:37AM, Tom Mueller wrote:
> Dan,
> Very nice! I really like that it appears that this will work for
> multiple platforms, right?
We can hope. I'm sure it needs some love. I did use the
subprocess module, which is hopefully portable.
> If you wouldn't mind sharing some early changes, I'd be willing to try
> this out on some other platforms as well (e.g., Windows).
I'll try to tidy up the patch and post it for review, and then
you should be able to try it out.
> I gather from below that the self.pkg(...) call automatically checks for
> a 0 return code unless there is a second argument?
Exactly, yes. I thought the implicit check for exit status = zero made
more sense than e.g. implicitly not checking the return code. This
streamlines the task of writing test cases.
> Also, the information that is dumped on a failure will be very helpful
> in finding which test failed.
I have been doing some more work on the harness and especially on
error reporting. Below please find a sample run of the tests cases I
currently have. It's not quite as speedy as I would like, something
we'll need to do more work on, I guess. My new code takes about 45
seconds to do a test run, a little slower than the existing
cli-complete, which runs in about 38 seconds (it starts/stops the depot
several fewer times). One the plus side, it represents about a 45%
reduction in the number of lines of test code, and each test could
be run separately to isolate problems.
Tomorrow I'll work on converting "upgrade.ksh" over. I will probably
defer the two-depots conversion. Aiming for putback early next week.
-dp
$ python cli-complete.py
NOTE: Adding
/net/snowdog/aux/dp/ips-fixes/gate/src/tests/../../proto/root_i386/usr/lib/python2.4/vendor-packages
to head of PYTHONPATH
NOTE: Adding '.' to head of PYTHONPATH
.......E.......
======================================================================
ERROR: KNOWN Bug 387. Please Fix Me!
----------------------------------------------------------------------
Traceback (most recent call last):
File "./cli/t_pkg_install_basics.py", line 231, in test_bug_387
comment = self.test_bug_387.__doc__)
File "./cli/testutils.py", line 170, in pkg
retcode, exit, output, comment)
UnexpectedExitCodeException: KNOWN Bug 387. Please Fix Me!
Install [EMAIL PROTECTED], dependent on [EMAIL PROTECTED], uninstall
recursively.
See http://defect.opensolaris.org/bz/show_bug.cgi?id=387
Expected exit status: 0. Got: 1. Output Follows:
.---------------------------------------------------------------------
| $ pkg status | grep foo@
| pkg://test/[EMAIL PROTECTED] installed ----
|
`---------------------------------------------------------------------
----------------------------------------------------------------------
Ran 15 tests in 43.507s
FAILED (errors=1)
--
Daniel Price - Solaris Kernel Engineering - [EMAIL PROTECTED] - blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss