From nobody Sun Apr 28 13:54:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575901747; cv=none; d=zohomail.com; s=zohoarc; b=EJK5I+cpzvUrdop+OyliNjOjMBnnoS3mnA65IXGg1IbY1nmDQs4VJ3GGqysbpTXyQSFSO3OPmJK7q36avYa9rZHPn87nWeNbWrU12vnnMg/CoCaCS0fkvOdb2xHXcxxmmTDmkE8cTGQbEg4qOpc8LlN4pkkp5ocUDXUQI4pC8h8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575901747; h=Content-Type: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=j+zhnqnWNfabJoxpsSc+mYSEpvqlK3JLIZhMQLr6odU=; b=SZe+jLUz9FnphrZ61ck6lW1QlSeG7AIOOksOvyMAIo6OyOA03Xe9c1hL+mIBSrW4wI5vakm7pgM/fS44DpORchF9R4+NZh/5T3zxRjDX6EUy1ifcz2I16UCgsJHWEWKah7133/dzDFJEjOZiMDyO9eAu2V7kggeb5HzU31vlNe8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1575901747525532.4078649270101; Mon, 9 Dec 2019 06:29:07 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-173-_8qMjeDGNBm9YIO2LAwvVg-1; Mon, 09 Dec 2019 09:29:04 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1461D800C7E; Mon, 9 Dec 2019 14:28:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D7A961001B2B; Mon, 9 Dec 2019 14:28:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7087283556; Mon, 9 Dec 2019 14:28:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB9EStTk030256 for ; Mon, 9 Dec 2019 09:28:55 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7E0D0194BB; Mon, 9 Dec 2019 14:28:55 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-120-98.rdu2.redhat.com [10.10.120.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 24B5990BC; Mon, 9 Dec 2019 14:28:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575901746; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=j+zhnqnWNfabJoxpsSc+mYSEpvqlK3JLIZhMQLr6odU=; b=deqN6Qu+cWWk0SLivwPEaXg95p74cpbV5I+q2WSnwrrg2WHIi2Ptd5L96Ijm+ms3mPcaaf FVvuG4PmwQtx1oc6PnTxsNkBQjri78lHBfDllynzFqLgSc56mKQLQThbPiLpiD+Rji3kJy nK3OBRLGnqeHYbMcH4kU+Rc2w7zXwjc= From: Cole Robinson To: libvir-list@redhat.com Date: Mon, 9 Dec 2019 09:30:09 -0500 Message-Id: <27e6969b9b0c98fcd6b048a7cb4c961c1ff429b0.1575901647.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Cole Robinson Subject: [libvirt] [PATCH 1/2] tests: fix REGENERATE test-wrap-argv.py usage X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: _8qMjeDGNBm9YIO2LAwvVg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The path needs to be adjusted for the new script location Signed-off-by: Cole Robinson Reviewed-by: J=C3=A1n Tomko --- tests/testutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testutils.c b/tests/testutils.c index 9312ff761e..a8215afa42 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -433,7 +433,7 @@ virTestRewrapFile(const char *filename) return -1; } =20 - script =3D g_strdup_printf("%s/test-wrap-argv.py", abs_srcdir); + script =3D g_strdup_printf("%s/scripts/test-wrap-argv.py", abs_top_src= dir); =20 cmd =3D virCommandNewArgList(python, script, "--in-place", filename, N= ULL); if (virCommandRun(cmd, NULL) < 0) --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun Apr 28 13:54:22 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575901754; cv=none; d=zohomail.com; s=zohoarc; b=cZkvoFkRIZyMNBZ28xr5SPAp5jjxUBAf/KHj/AChxmxJJCkSkGIqw6eRd3EGY+c4EmEUzhGokG391RQQMQQxXFGuwxB5FvfD7MENNp3+hQqFK7NMTMv3BP2w4NtnijRby8IjPQ3ZYlizOS/eLzayqrcK8SbABzpgk7jIFUHW+DE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575901754; h=Content-Type: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=W67HbSulcWM6syi+D2vhfv05tFNaF0UuwR2vqSBaLXg=; b=aLXXIZ9nuofC6YkpGiYkrvGU8R51J7qJb7LBu4lM3s5v0jiqEp9ENh4bBlyRMGasggn7K5zCQF/0mtdidbN7gtKLui5oUeYa/iIGr5jrCNfarZ8PYXRVCL7ucyiiOGtK2c+7ywPog0SXhpSGTq+nhcdWlvc7vPu0HYnUBhK3/8s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1575901754471778.9619441677992; Mon, 9 Dec 2019 06:29:14 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-34-3AXEXhfnPMWXPfbeJym3Vg-1; Mon, 09 Dec 2019 09:29:08 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 54430593AA; Mon, 9 Dec 2019 14:29:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D3381001B2B; Mon, 9 Dec 2019 14:29:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C682218089D0; Mon, 9 Dec 2019 14:29:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB9ESuR0030262 for ; Mon, 9 Dec 2019 09:28:56 -0500 Received: by smtp.corp.redhat.com (Postfix) id 126201C94F; Mon, 9 Dec 2019 14:28:56 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-120-98.rdu2.redhat.com [10.10.120.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id A9237194BB; Mon, 9 Dec 2019 14:28:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575901753; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=W67HbSulcWM6syi+D2vhfv05tFNaF0UuwR2vqSBaLXg=; b=X1jpTIro4fny2vH8YzQU9hGbM7/0ARmrI/dXi+yhPY71JrvYDO5Y7p28C4vUtC5dJfX77v 8VtdYjRd7QZiI8YSmslpg8e7TkqOeuCenFyhfoI3GPIuHqH7kYZYuOYEmsQ1yr9vc1uj2w eiOMH8owDn7b52P8VChw1PirA9e4He4= From: Cole Robinson To: libvir-list@redhat.com Date: Mon, 9 Dec 2019 09:30:10 -0500 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Cole Robinson Subject: [libvirt] [PATCH 2/2] tests: use PYTHON detected from configure X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: 3AXEXhfnPMWXPfbeJym3Vg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Extend configure to pass the detect python binary to C code, and use it in the test suite, rather than searching PATH Signed-off-by: Cole Robinson Reviewed-by: J=C3=A1n Tomko --- configure.ac | 1 + tests/testutils.c | 12 +----------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 2e5af075ea..6c7c186d18 100644 --- a/configure.ac +++ b/configure.ac @@ -705,6 +705,7 @@ AC_PATH_PROGS([PYTHON], [python3]) if test -z "$PYTHON"; then AC_MSG_ERROR(['python3' binary is required to build libvirt]) fi +AC_DEFINE_UNQUOTED([PYTHON], "$PYTHON", [path to python binary]) AC_PATH_PROG([FLAKE8], [flake8]) if test -z "$FLAKE8"; then AC_MSG_WARN(['flake8' binary is required to check python code style]) diff --git a/tests/testutils.c b/tests/testutils.c index a8215afa42..6efc877d0c 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -58,7 +58,6 @@ static size_t testCounter; static virBitmapPtr testBitmap; =20 char *progname; -static char *python; =20 virArch virTestHostArch =3D VIR_ARCH_X86_64; =20 @@ -428,14 +427,9 @@ virTestRewrapFile(const char *filename) virStringHasSuffix(filename, ".ldargs"))) return 0; =20 - if (!python) { - fprintf(stderr, "cannot rewrap %s: unable to find python in path",= filename); - return -1; - } - script =3D g_strdup_printf("%s/scripts/test-wrap-argv.py", abs_top_src= dir); =20 - cmd =3D virCommandNewArgList(python, script, "--in-place", filename, N= ULL); + cmd =3D virCommandNewArgList(PYTHON, script, "--in-place", filename, N= ULL); if (virCommandRun(cmd, NULL) < 0) goto cleanup; =20 @@ -919,9 +913,6 @@ int virTestMain(int argc, } } =20 - /* Find python early because some tests override PATH */ - python =3D virFindFileInPath("python"); - ret =3D (func)(); =20 virResetLastError(); @@ -931,7 +922,6 @@ int virTestMain(int argc, fprintf(stderr, " %-3zu %s\n", testCounter, ret =3D=3D 0 ? "OK" : = "FAIL"); } virLogReset(); - VIR_FREE(python); return ret; } =20 --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list