Re: [RFC/PATCH 3/4v2] test-lib: provide lazy TIME_COMMAND prereq
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Oct 16, 2012, 19:21 UTC
- Message-ID
- <507DB39C.3080005@kdbg.org>
- In-Reply-To
- <28ca29e59c5905ba7232dcdbe4661f37ef90cac5.1350399860.git.git@drmicha.warpmail.net>
Am 16.10.2012 17:07, schrieb Michael J Gruber:
Show 5 quoted lines
> Some test want to use the time command (not the shell builtin) and test > for its availability at /usr/bin/time. > > Provide a lazy prereq TIME_COMMAND which tests for $TEST_COMMAND_PATH, > which can be set from config.mak. It defaults to /usr/bin/time.
This avoids the builtin:
command time $that_command
It works for bash, ksh, zsh, and dash (where the latter doesn't have it as builtin).
-- Hannes