Re: [Shunit2-users] debian package
Brought to you by:
sfsetse
From: Kate W. <kat...@fo...> - 2010-04-09 10:13:03
|
shUnit2 is available for Gentoo Linux as well. Here is a mirror to a ebuild. http://mirror.leaseweb.com/pub/software/gentoo-x86-portage/dev-util/shunit2/ Two other libraries I've written, shFlags and log4sh are available via Blastwave for Solaris (they are maintained by a coworker of mine) if you want to look at them too. http://www.opencsw.org/packages/log4sh http://www.opencsw.org/packages/shflags I hadn't designed shUnit2 to be sourced into the environment and run at any time, but there is no reason that wouldn't work. Even for that use case though, it should be sourced with '.' and doesn't need the executable bit. The only thing I can think of (there may be more) for needing executable permissions is to test a non-executable shell script (no #! line, and no . sourcing line within the script needing to know where shunit2 is). $ shunit2 /path/to/some/unit_test.sh For the use case of a distribution (or rather multiple distributions) where the location of shUnit2 changes between them, going the sourcing route like you mention could be very advantageous. It's something I hadn't thought about. File a bug (if there isn't one) and I'll think about what needs to change. - kate On Fri, Apr 2, 2010 at 9:12 PM, lyase damasked <ly...@gm...> wrote: > I would think you are right there is not just one "good" location for the > file. > specially if some example ships with it or parallel and can "runs" > without failures in such a way that they stay that way between > releases of shunit2 on the distro. if this constraint is not too > binding to the development of shunit2. this may look like a very nice > feature to the release process so the maintenance of the user's > scripts be minimal. I didn't see shunit2 in other distro. I noticed in > the source the example's path have to be constant at least in relative > terms to the folder of shunit2. I am unsure if as users we should > assume . that will not change. > > I had been using shunit from tarball hence had the same issue of > being path dependent. which ended up been a real pain and high costs > (dropping the tests......). > i apologize my proposal to help is becoming more an enhancement & more > work on your sides. > let me just say i really like your stuff and hope to be using it for a > while. > > Lyase. > > > On Fri, Apr 2, 2010 at 9:06 AM, Ulrich Dangel <mr...@sp...> wrote: > > On Thursday 01 April 2010 13:11:20 lyase damasked wrote: > >> Sorry my mistake I did not know about the '.' operator.my tests looks > >> to be working well. > >> with > >> .-rw-r--r-- 1 root root 31191 2009-12-06 16:11 shunit2 > >> thanks for the great job. I love it. > >> lyase. > > > > Actually there is some slightly difference. If you make shunit2 > executable > > and put it into your PATH it is possible to load shunit2 directly via > > . shunit2 without specifying a path. > > What is the proposed way of installing shunit2 in a distribution? > > Any other distributions ships shunit2? If yes where do they put the file? > > > > The benefit would be that you do not have to specify the path for the > > shunit2 file, which could now easily change. > > > > > > Ulrich > > > -- Kate Ward <kat...@fo...> |