On Wed 01 Aug 2012 at 01:26PM, Dan Price wrote: > On Mon 30 Jul 2012 at 03:40PM, Shawn Walker wrote: > > >I'll just write it to stderr instead-- it seems more sane than > > >inventing yet another new exception type. The other option would > > >be to print nothing, which would also be fine with me. > > > > The silent approach may be best; it should be pretty obvious if the > > terminal type is screwed up since the progress tracking will be > > different. And if it isn't obvious, then the caller needs to check > > that. > > Ok, so I have a new version of this fix posted. Here are the > changes: > > - Now silent on a TERM it doesn't understand; so the > core fix is now very trivial. > > - Turns out the previous tests sometimes interacted badly > with the api suite-- mostly due to the way libcurses > initializes itself; once you've called setupterm() once, > subsequent calls in the same process have no effect, which > makes testing various edge cases impossible. So I > reimplemented the tests in the CLI suite; this necessitated > adding a rough variant of Popen and of cmdline_run which > allows one to launch tests in a pty. I also migrated a > pkglint test which did essentially the same thing to use the > new API. > > It's the usual "3 lines to fix the bug, 100 lines to test the fix." > > https://cr.opensolaris.org/action/browse/pkg/dp/setupterm/
Sorry-- I forgot that I needed to add a few more things here-- I left out support for code coverage. I'll repost this in another hour or so. -dp -- Daniel Price, Solaris Kernel Engineering _______________________________________________ pkg-discuss mailing list pkg-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/pkg-discuss