[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/5] meson: fixes relpath may fail on win32. for example C:/m
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH 2/5] meson: fixes relpath may fail on win32. for example C:/msys64/mingw64/x.exe relative to E:/path/qemu-build would fail. |
Date: |
Tue, 25 Aug 2020 10:04:49 +0100 |
User-agent: |
Mutt/1.14.6 (2020-07-11) |
Subject line is waaaaay too long here. The explanation should be
in the commit message body, not the subject.
On Tue, Aug 25, 2020 at 04:34:57PM +0800, luoyonggang@gmail.com wrote:
> From: Yonggang Luo <luoyonggang@gmail.com>
>
> ---
> scripts/mtest2make.py | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
> index bdb257bbd9..d7a51bf97e 100644
> --- a/scripts/mtest2make.py
> +++ b/scripts/mtest2make.py
> @@ -53,9 +53,16 @@ i = 0
> for test in json.load(sys.stdin):
> env = ' '.join(('%s=%s' % (shlex.quote(k), shlex.quote(v))
> for k, v in test['env'].items()))
> - executable = os.path.relpath(test['cmd'][0])
> + executable = test['cmd'][0]
> + try:
> + executable = os.path.relpath(executable)
> + except:
> + pass
> if test['workdir'] is not None:
> - test['cmd'][0] = os.path.relpath(test['cmd'][0], test['workdir'])
> + try:
> + test['cmd'][0] = os.path.relpath(executable, test['workdir'])
> + except:
> + test['cmd'][0] = executable
> else:
> test['cmd'][0] = executable
> cmd = '$(.test.env) %s %s' % (env, ' '.join((shlex.quote(x) for x in
> test['cmd'])))
> --
> 2.27.0.windows.1
>
>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
[PATCH 5/5] configure: replace all $PWD with $build_path that can handling msys2 properly, luoyonggang, 2020/08/25
Re: [PATCH 1/5] meson: SIMPLE_PATH_RE should match the full path token. Or the $ and : contained in path would not matched. if the path are start with C:/ and E:/, Daniel P . Berrangé, 2020/08/25