[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/9] tests: introduce tree-wide code style checking
|
From: |
Eric Blake |
|
Subject: |
Re: [PATCH v3 1/9] tests: introduce tree-wide code style checking |
|
Date: |
Wed, 20 Jul 2022 12:08:20 -0500 |
|
User-agent: |
NeoMutt/20220429 |
On Wed, Jul 20, 2022 at 05:31:52PM +0100, Daniel P. Berrangé wrote:
> > > diff --git a/meson.build b/meson.build
> > > index 65a885ea69..d8ef24bacb 100644
> > > --- a/meson.build
> > > +++ b/meson.build
> > > @@ -18,6 +18,8 @@ config_host = keyval.load(meson.current_build_dir() /
> > > 'config-host.mak')
> > > enable_modules = 'CONFIG_MODULES' in config_host
> > > enable_static = 'CONFIG_STATIC' in config_host
> > >
> > > +in_gitrepo = run_command('test', '-d', '.git', check:
> > > false).returncode() == 0
> >
> > Should we use Meson's fs.is_dir() rather than running a shell?
> > (https://mesonbuild.com/Fs-module.html)
>
> Will investigate
Probably not a good idea as-is; .git need not be a directory, but can
also be a symlink. So 'test -e .git' is the better check (see
scripts/qemu-version.sh); but if you can write an existence check in
meson (instead of a directory check), then go for it.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[PATCH v3 9/9] tests/style: check qemu/osdep.h is NOT included in all .h/.c.inc files, Daniel P . Berrangé, 2022/07/07
[PATCH v3 6/9] misc: ensure qemu/osdep.h is included first in all .c files, Daniel P . Berrangé, 2022/07/07
[PATCH v3 3/9] tests/style: check for mixups of bool constants with int variables, Daniel P . Berrangé, 2022/07/07