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 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.

> Last time we discussed, we agreed that Bash v4.2 would be a reasonable
> minimum for the kvm-unit-tests:
> 
>  https://www.spinics.net/lists/kvm/msg222139.html
> 
> Thus if the user installed bash from homebrew on macos, we should be fine?
> 
> Could you maybe replace this patch with a check for a minimum version of
> bash instead?
> 

No problem, if getopts works.

Thanks,
Roman



[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