From nobody Tue Feb 10 06:58:50 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1598503917; cv=none; d=zohomail.com; s=zohoarc; b=DK/5fYwrvEyM9yz2RIBOKdcdb9CmI+KdjszOXGXWuUfGcrfyXc4YW7tW9rJRSggvR7rqAckuXTO8rF3u2VLYO1vUYBfYARW2IluQeUes5vx4aske/7mj8USkWYfLOatMZztBfCfxvjDR5MUzW8WAUDclr4Am7yPwSi5w00ktF3o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598503917; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7+MsaJjYLlKc/kuo4dhCFuDpn67NQClb7RmuHL3RlA8=; b=DvegxkU4yeOp5ywv2Dxl8AaUKETzvC/yyHSY1YNHqjzblyws+Lty+vA9fp0H/tZhgolMT9ky/W9OJ7KWNpu5agj0VXtUmYoDFAmLHeXAjTStDRVKl5VreDS5hCEMnVBLs9ZCWqmpbRmQahxZ0thJV4MbZUk5Xrf7isgITguT8Zo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598503917846117.66100392022884; Wed, 26 Aug 2020 21:51:57 -0700 (PDT) Received: from localhost ([::1]:60730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kB9tE-0007KZ-Lh for importer@patchew.org; Thu, 27 Aug 2020 00:51:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB9r8-0002uj-Di for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:49:46 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:46108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kB9r5-0003gk-Qs for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:49:46 -0400 Received: by mail-pg1-x544.google.com with SMTP id 31so2446534pgy.13 for ; Wed, 26 Aug 2020 21:49:43 -0700 (PDT) Received: from localhost.localdomain ([2401:c080:1c01:4fe:5400:2ff:fef1:b056]) by smtp.googlemail.com with ESMTPSA id n26sm902296pff.30.2020.08.26.21.49.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 21:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7+MsaJjYLlKc/kuo4dhCFuDpn67NQClb7RmuHL3RlA8=; b=C0m1ka4nMOIT8pbURzi32/XLZXhAAVj/llq5s7GnnlYPsVjBuzyUf647/wcrQxfECB shePWwDQBmS9T3WJhd3Oq9/vck9BCmcJvp1sTaf01DHOxtpBF0P1IO6jvf0d6bsux1Wz J8yCj6YDPQl+fmfH5Xssk7FVqq20ijww/51e7SDGo3I80VD3/DNgmSXk4v8wlhP4WFV/ RKJKucHsUr96aQRn9GIPjJwZgSt+lZ88nQEAI7cCFi3FD4c7Tnz3C98iWsvhCBpESsDR zOgK/ILy4yogUhy5sJPpxSzZ/D/3tLjTUFco4n7bIGkbpL22jzdZXtJR6Yoq5R2kYZYc j5sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7+MsaJjYLlKc/kuo4dhCFuDpn67NQClb7RmuHL3RlA8=; b=GPSvHtbkBDJcN6uN2pvaOSMr1eblAa6s5+dRtmfAxHoqGzhcWsnI1Yuciog6knM394 czgKzd6oWOklVQ+owWdP6VMSr7gyS6dHWjtiv1xqhW4bedyClwDojE3Pdy2zHwrBzQyL S629NtGwF9nAesk3/FftdXQ/5mx7i5CzmHrRFmXrMlq/fu4r1SmaZJF4BPQlCscMABYF AGt1l3sZOhZbfV8+tgMDZZmVo0kaUZwxbXVgVHchp9/YD2hzQR5NryR/o2ak5n8FV0jx PK8uBA9clX99DU3a9WlxKzicjwL+Q3s0CPf6gOpXdL1Xw0P29gHNfzT5w788wLKqxOUy otFQ== X-Gm-Message-State: AOAM532PKUT76WjOUs6BjwL3X5SeEJ8yNP9hKjqa+m/AzwaNL0mrTjKt HiwbbOZXjXjtxG7KuCzwcZduF50wzeNdXb7VZiU= X-Google-Smtp-Source: ABdhPJygoErTZpcYOEEZIwnw2ndhPQz3lOJ5nJTBI3YErIW/Z5+AEZKvx+BSQtXWbF/NPceT0FmMFw== X-Received: by 2002:a17:902:bf01:: with SMTP id bi1mr14688209plb.118.1598503781986; Wed, 26 Aug 2020 21:49:41 -0700 (PDT) From: luoyonggang@gmail.com To: qemu-devel@nongnu.org Subject: [PATCH 2/6] meson: fixes relpath may fail on win32. Date: Thu, 27 Aug 2020 12:49:13 +0800 Message-Id: <20200827044917.1356-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200827044917.1356-1-luoyonggang@gmail.com> References: <20200827044917.1356-1-luoyonggang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::544; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x544.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Yonggang Luo On win32, os.path.relpath would raise exception when do the following relpa= th: C:/msys64/mingw64/x.exe relative to E:/path/qemu-build would fail. So we try catch it for stopping it from raise exception on msys2 Signed-off-by: Yonggang Luo --- 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 =3D 0 for test in json.load(sys.stdin): env =3D ' '.join(('%s=3D%s' % (shlex.quote(k), shlex.quote(v)) for k, v in test['env'].items())) - executable =3D os.path.relpath(test['cmd'][0]) + executable =3D test['cmd'][0] + try: + executable =3D os.path.relpath(executable) + except: + pass if test['workdir'] is not None: - test['cmd'][0] =3D os.path.relpath(test['cmd'][0], test['workdir']) + try: + test['cmd'][0] =3D os.path.relpath(executable, test['workdir']) + except: + test['cmd'][0] =3D executable else: test['cmd'][0] =3D executable cmd =3D '$(.test.env) %s %s' % (env, ' '.join((shlex.quote(x) for x in= test['cmd']))) --=20 2.27.0.windows.1