From patchwork Mon Mar 18 16:10:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 160497 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp2827207jad; Mon, 18 Mar 2019 09:10:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHIjwPdIo2iTnar8qWoD079V4KL59rcaoptPl1Jb2ms6jDxtpJT/lRztiyzOb2CFdIpMjc X-Received: by 2002:a63:61d7:: with SMTP id v206mr381189pgb.349.1552925441113; Mon, 18 Mar 2019 09:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552925441; cv=none; d=google.com; s=arc-20160816; b=l5PNWvjS1Qskmxu18XLgZ5Ez/YdYL7RSJ5lKvYeJ2j7fL4xmG57N50YthqQC3Kglxk 8Jv3oyXIAqOSorpEvnSGm/cUkusiMPCsfHPy0tLbu9aEEoNU8oPyrh6cn81tRacUwUwL uJ2Vg6EXxHSOrlOK++6CrI3b/3OYP141hj7lTP/zbj3mpcP72jwgTOqItmwIWjDrZVod eXbNzBoElncQQ/fYM8iDrgu7lfyBkauDbx7XD7ehcJDhMnXoSLN+hBO8hSP07iCs0rlt 1yEVJ/CQwNP2YCME8nhnLnqur/OSbd9fEFzUnFlRkQmh5SfpHAF5bMckgm5g2Q8k4R34 1KtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KdqDkYrTDEqN9vakI2bBqUBOD/OCU+61ucnMbJPmp4s=; b=Cv9hxdQBG96bIg3NRTBY383RfOUiAvJDkjgCqw+sby+QK/mFsq2A5kEp5hQKn6FXuj 9xaD/LLe/vGgiPFUG+4jxSRlWaIJpUexxYWChHTif+K/++35mL2jFuHtfbjh0nLxkEPj JqDyizLnZKiInMF/YLfRdkEPk35lvJml+eWknl0lmxeLMGNktf3WpnzuLjmXPt4AUeus ruc1YE3tjdOWx1X9pVdPke1naGOEykBLUIvw+trhCcysTAXA9Wke7/VIrFKmSR1leRTa 34nCuXdYozOmSprAYk0qWVfRRUb3R1EZ1T0NXfZkidxbv1e1ORanaOTVUOVmH1QDC4wy wSfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=N+LHeCLv; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u65si3385471pfj.218.2019.03.18.09.10.32; Mon, 18 Mar 2019 09:10:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=N+LHeCLv; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727215AbfCRQKU (ORCPT + 5 others); Mon, 18 Mar 2019 12:10:20 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:35772 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726897AbfCRQKT (ORCPT ); Mon, 18 Mar 2019 12:10:19 -0400 Received: by mail-wm1-f67.google.com with SMTP id 81so6159459wme.0 for ; Mon, 18 Mar 2019 09:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KdqDkYrTDEqN9vakI2bBqUBOD/OCU+61ucnMbJPmp4s=; b=N+LHeCLvXXVLDq3QVUXFths8PToZVQnBJsqmoTIeVVwMLWSU/ReZW73eL+W8t2/KdA YUzTh2sV4BqmqTWuEX3wd6zInCm/RJhA435WM4/Mq14hQ7dn2zuBK4n62BJru9ddYEcF cOrUbUCqpNLjs3+Yi9SvMMYS/Ndg88RdRNbAgYaqRdkn47Q1+JUIeTj5jgeY2eMvH7sq Fwv32UGEIqxhPQGvvFFN5N1fm0xDNz3wnYx8vyGH5N2SumcmoEY8EWRBsHY4SwDYGVof b2UqwnJynpLcGH2yhmxG7qd4WjmzkS6/lWQJwAbya1lt3LTIOIfspwZViJ5ARHy2OgWF M9gA== 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=KdqDkYrTDEqN9vakI2bBqUBOD/OCU+61ucnMbJPmp4s=; b=iO6bqxaRwayK+O5f1IBlxmJU3/fPleWyePgIMKyHpTzxw/MRxNs5NQdWhY3sPhFUy7 h5//11XuZa51/7chf0vMyfFqE8KsD3W47nBVIHWS6b3r1WiUDl9Q5FfndZKYE6ia4S64 nmEC2TP7v7t1VdCEIIkOH/nyFOg7jZxDAbfBTPk9XxX+4g5s9Ox+LWKhOEtEI5Mn8l8n aG61B1YoKKpddtVw53rVH1EJEFkqZo5QQcaz/piaqBpNb3kV2y/A0el2Y5yuUuK0tBed IT49pWvL8Gkra8ZsBGjHshDUN9XsvsSXao1VnOEurxbcOD8zVU8I10NQt/b/vMkeJBgI NoQA== X-Gm-Message-State: APjAAAXsbxj6USwoDMCadygsdJGbj/8HiCzr+dLLOhypP/r4ksr0muGX 38QuC+DgXwvLY1BQHLwqcVmUqA== X-Received: by 2002:a1c:f102:: with SMTP id p2mr12232304wmh.36.1552925418239; Mon, 18 Mar 2019 09:10:18 -0700 (PDT) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id q2sm23803401wrd.46.2019.03.18.09.10.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Mar 2019 09:10:17 -0700 (PDT) From: Bartosz Golaszewski To: Anders Roxell Cc: linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: [libgpiod][PATCH v2 1/2] tests: enable installing tests to bindir Date: Mon, 18 Mar 2019 17:10:13 +0100 Message-Id: <20190318161014.4660-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190318161014.4660-1-brgl@bgdev.pl> References: <20190318161014.4660-1-brgl@bgdev.pl> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Anders Roxell Add an enable option to configure that allows to install the testing binary to /bindir. Signed-off-by: Anders Roxell [Bartosz: trimmed the patch to fit the new approach] Signed-off-by: Bartosz Golaszewski --- configure.ac | 7 +++++++ tests/Makefile.am | 4 ++++ 2 files changed, 11 insertions(+) -- 2.20.1 diff --git a/configure.ac b/configure.ac index 4adff7b..8a9b81d 100644 --- a/configure.ac +++ b/configure.ac @@ -107,6 +107,13 @@ then AC_CHECK_HEADERS([sys/signalfd.h], [], [HEADER_NOT_FOUND_TOOLS([sys/signalfd.h])]) fi +AC_ARG_ENABLE([install-tests], + [AC_HELP_STRING([--enable-install-tests], + [enable install tests [default=no]])], + [if test "x$enableval" = xyes; then with_install_tests=true; with_tests=true; fi], + [with_install_tests=false]) +AM_CONDITIONAL([WITH_INSTALL_TESTS], [test "x$with_install_tests" = xtrue]) + AC_ARG_ENABLE([tests], [AC_HELP_STRING([--enable-tests], [enable libgpiod tests [default=no]])], diff --git a/tests/Makefile.am b/tests/Makefile.am index a6593b9..4d1e6d5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -11,7 +11,11 @@ AM_CFLAGS += -Wall -Wextra -g $(KMOD_CFLAGS) $(UDEV_CFLAGS) AM_LDFLAGS = -pthread LDADD = $(top_builddir)/lib/libgpiod.la $(KMOD_LIBS) $(UDEV_LIBS) +if WITH_INSTALL_TESTS +bin_PROGRAMS = gpiod-test +else check_PROGRAMS = gpiod-test +endif gpiod_test_SOURCES = gpiod-test.c \ gpiod-test.h \