From patchwork Mon Dec 9 14:30:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 181031 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4421818ile; Mon, 9 Dec 2019 06:29:06 -0800 (PST) X-Google-Smtp-Source: APXvYqw4m1LtQWtNA972PworPyYDb6Vwj5NfylmEUY/UjNT0K2eozPAeRRXIkQKdbt8K5EKNlNkk X-Received: by 2002:a37:a4c6:: with SMTP id n189mr15329471qke.477.1575901746867; Mon, 09 Dec 2019 06:29:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575901746; cv=none; d=google.com; s=arc-20160816; b=AQq77phkXYB4uFa+IijRCgPYq1Fw7uyrV8IlpCZG90BeShQLPlrvN7HqsfVFNgoXF6 FLJO1ZElGDf3cmcXCKzGMxkQ4uXNIp4doLUF7j9hQcpSkUl9neRRdy9mkFn51k3q32uR n9nSr4O260r4XWj6gYdSB0OyHm+36oGOljRnKVhKbbs8xeW/A1mDW/bXN7IV1+cO6ztL lgMoaCAqZ8oQaK6ji3INptyK4SgSi+mAoq1SXqIC6sK8hN4t1w3Hd0ftN9Yfi7pYsGzR tPGFpDQT39dJtOiEd3ANg3wjzxBr1JdkbzdOESQPLCABWqqFcJqdxEAXF5hFT0pfSjFt 7r6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:errors-to:sender:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :delivered-to:dkim-signature; bh=j+zhnqnWNfabJoxpsSc+mYSEpvqlK3JLIZhMQLr6odU=; b=whDN0FgfpnpHhMjmgIjWIA1PRiRoR4zurYLqMUIIc5jU4ToUbJJMVZC0Rb89vHxw9e prukQsm11SNfFAHvzMqEjszAjB5l7tzpqxTWhQ+rKd9LgRVRPYxvoPKYL1XCwy8pnLWZ U4sg94DQHzohWVk6pasAzcQq41uaRYCtcbRQx0URClvCK0XACEUnfofccTkmqyqVUpA7 hFiXtsHzuLPsBKfqPcnjTE+B6CTB42Qo6aIFnwSVWMu5cVfnDEJOnH+hjBTHitS3pRdo jvBWm9ppIoXwG1YQ2fFITxXLnJrVRS75tapcR/3uUt19M59BGqWFILMdM6f13p9e9VTG KMtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=deqN6Qu+; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com. [207.211.31.120]) by mx.google.com with ESMTPS id a23si5709678qkn.339.2019.12.09.06.29.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Dec 2019 06:29:06 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=deqN6Qu+; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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= 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) Delivered-To: libvir-list@redhat.com 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) 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 The path needs to be adjusted for the new script location Signed-off-by: Cole Robinson --- tests/testutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list 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; } - script = g_strdup_printf("%s/test-wrap-argv.py", abs_srcdir); + script = g_strdup_printf("%s/scripts/test-wrap-argv.py", abs_top_srcdir); cmd = virCommandNewArgList(python, script, "--in-place", filename, NULL); if (virCommandRun(cmd, NULL) < 0) From patchwork Mon Dec 9 14:30:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 181033 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4421947ile; Mon, 9 Dec 2019 06:29:13 -0800 (PST) X-Google-Smtp-Source: APXvYqz9U4KU4S2HVuF59tG1PTl4RAvFXJNoQb8e73e+PCvT/Fgs/FxOtmnVMZ6+Rxrglo2PaiZW X-Received: by 2002:ac8:745a:: with SMTP id h26mr13776618qtr.318.1575901753718; Mon, 09 Dec 2019 06:29:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575901753; cv=none; d=google.com; s=arc-20160816; b=hZefUDcn+JBXl9k3Pj1Qjlar7E2jftUqxGCMs5XcKBqC5iCYjX4ZSzAoHUQGESRDO2 gRmwotb6BfBD+vbaiOpqHKB7Maw4TCSUYzGejf3LQJwmWVed5Gmcr0cyEcNBwIUVXgdP o6i2yGUwprtc7NECpfYI5l8XuBLQ0jELSk7QQj5wO70U14xPqkylTgByXYe7strd+S84 tfFOfjIDeKcOd6Ln71A0gvbVZg1ZB56Q1w4uk2cFylhDlhKYMKE1Se32qtzqf89yjUh2 2IQ1p9pE4ZmU/Yl/Q47z4rcKyfClYug/s/qNUqK7utTt4pKXwdVDnpI9mH4UPcju5nSd Jfww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:errors-to:sender:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :delivered-to:dkim-signature; bh=W67HbSulcWM6syi+D2vhfv05tFNaF0UuwR2vqSBaLXg=; b=GzwQuAbw3m+yYszRjaIDpJB7LKSoyenVjY01I3rjGoWr8r+0qqrsWrPMizAIYjXzQi vu8sVa+pRdQzs++irK3Vp7b43afCq1c8JIxOxDSHWHDCgZzuV9BZKRic3nmpEXJa9RWo kUU9Djx+kP39X2MmiEakv1KTe6Z0I+mlzD+5MoFmxh9Ub45bFqEHEdvtE6POPgF198wc KDRZ3ZLaCfnLM4kGfzQkE/B+dCxxeTKLVKmjvB+pGzcIgmtvuDGwe63Q8+oVbTcTDJcj 4VUGEoPRUkWfZmMQ7jKMYM2YxjG4Nb4DisKNXsGk4Q2gk9oPPRpXQKFzdmLYQnNywXD6 bRLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X1jpTIro; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com. [205.139.110.120]) by mx.google.com with ESMTPS id l24si14434211qtq.184.2019.12.09.06.29.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Dec 2019 06:29:13 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X1jpTIro; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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= 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) Delivered-To: libvir-list@redhat.com 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) 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 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 --- configure.ac | 1 + tests/testutils.c | 12 +----------- 2 files changed, 2 insertions(+), 11 deletions(-) -- 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list 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; char *progname; -static char *python; virArch virTestHostArch = VIR_ARCH_X86_64; @@ -428,14 +427,9 @@ virTestRewrapFile(const char *filename) virStringHasSuffix(filename, ".ldargs"))) return 0; - if (!python) { - fprintf(stderr, "cannot rewrap %s: unable to find python in path", filename); - return -1; - } - script = g_strdup_printf("%s/scripts/test-wrap-argv.py", abs_top_srcdir); - cmd = virCommandNewArgList(python, script, "--in-place", filename, NULL); + cmd = virCommandNewArgList(PYTHON, script, "--in-place", filename, NULL); if (virCommandRun(cmd, NULL) < 0) goto cleanup; @@ -919,9 +913,6 @@ int virTestMain(int argc, } } - /* Find python early because some tests override PATH */ - python = virFindFileInPath("python"); - ret = (func)(); virResetLastError(); @@ -931,7 +922,6 @@ int virTestMain(int argc, fprintf(stderr, " %-3zu %s\n", testCounter, ret == 0 ? "OK" : "FAIL"); } virLogReset(); - VIR_FREE(python); return ret; }