testing a single applet; "command" command [was: Re: svn commit: trunk/busybox/testsuite]
Bernhard Fischer
rep.dot.nop at gmail.com
Wed Apr 30 07:05:26 UTC 2008
On Wed, Apr 30, 2008 at 02:01:45AM +0200, Denys Vlasenko wrote:
>On Tuesday 29 April 2008 18:18, Bernhard Fischer wrote:
>I hope these semi-useless discussions "how to make runtest
>the prettiest shell script ever" will not last forever. :(
ack. ;)
>> I think that it was possible to invoke one test-series for exactly one
>> applet by doing:
>> $ ./runtest test.tests
>
>$ ./runtest test [without ".tests"]
>
>It is still possible.
perfect. Thanks for the hint.
>
>> PS: reading test.tests, perhaps it would make sense to allow for
>> "command" to prevent using builtins? Just curious..
>
>Didn't understand you here...
test.tests contains this comment:
# Need to call 'busybox test', otherwise shell builtin is used
bash (fwiw) has a "command" which is documented as:
command [-pVv] command [arg ...]
Run command with args suppressing the normal shell function
lookup. Only builtin commands or commands found in the PATH are
executed. If the -p option is given, the search for command is
performed using a default value for PATH that is guaranteed to
find all of the standard utilities. If either the -V or -v
option is supplied, a description of command is printed. The -v
option causes a single word indicating the command or file name
used to invoke command to be displayed; the -V option produces a
more verbose description. If the -V or -v option is supplied,
the exit status is 0 if command was found, and 1 if not. If
neither option is supplied and an error occurred or command can‐
not be found, the exit status is 127. Otherwise, the exit sta‐
tus of the command builtin is the exit status of command.
So, since it doesn't ignore builtin commands it wouldn't really help if
implemented 1:1 like bash does.
Anyway, it was just a thought.
More information about the busybox
mailing list