Re: [kvm-unit-tests PATCH 6/7] configure: Add an option to specify getopt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28/08/2020 09.12, Roman Bolshakov wrote:
> On Fri, Aug 28, 2020 at 07:55:53AM +0200, Thomas Huth wrote:
>> On 10/08/2020 15.06, Roman Bolshakov wrote:
>>> macOS is shipped with an old non-enhanced version of getopt and it
>>> doesn't support options used by run_tests.sh. Proper version of getopt
>>> is available from homebrew but it has to be added to PATH before invoking
>>> run_tests.sh. It's not convenient because it has to be done in each
>>> shell instance and there could be many if a multiplexor is used.
>>>
>>> The change provides a way to override getopt and halts ./configure if
>>> enhanced getopt can't be found.
>>>
>>> Cc: Cameron Esfahani <dirty@xxxxxxxxx>
>>> Signed-off-by: Roman Bolshakov <r.bolshakov@xxxxxxxxx>
>>> ---
>>>  configure    | 13 +++++++++++++
>>>  run_tests.sh |  2 +-
>>>  2 files changed, 14 insertions(+), 1 deletion(-)
>>
>> Is this still required with a newer version of bash? The one that ships
>> with macOS is just too old...
>>
>> I assume that getopt is a builtin function in newer versions of the bash?
>>
> 
> Except it has `s` at the end. There's a getopts built-in in bash.
> I'll try to replace external getopt with getopts.

Ouch, ok, I wasn't aware of the difference between getopt and getopts. I
guess your patch here is ok in that case.

Or maybe we should simply revert d4d34e6484825ee5734b042c215c06
("run_tests: fix command line options handling") and state in the docs
that options have to be given before the tests on the command line...

 Thomas




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux