From patchwork Fri Mar 15 14:23:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 160425 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp16827372jad; Fri, 15 Mar 2019 07:24:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+edgFbA/xJBhE1zGd1wdadsYVYGZ7Tltb/4rczb6k+WkgiQxXLpopcMr+dccejF0IbEKp X-Received: by 2002:a63:6985:: with SMTP id e127mr3711523pgc.101.1552659844833; Fri, 15 Mar 2019 07:24:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552659844; cv=none; d=google.com; s=arc-20160816; b=Bx+GeTmZ+x5yZhWpFm36RDt1t0A48f0jtGh+PzSU0CLKXwGOvWXVJXBzQsFZwy7X7I U6xN0Je4pqU0u2xJKcA3yyEdUHOj5oJyNtgtIrcyGJ4HIgBNzbm0N9pbygHeTAjWFZ0v /78trJelBM03eGDRlYGvKhiS0lLKGW3FcT+49ldlGamPLkbvyUOqP0H0nVkkIS040BPF uuXyv66qTtryBrqUL0lBJM8DQVczW+JAOFNj76eoU74TIggdYAuPDy/oQo7aJHsyCYvC 9JqRkTGV0jUjkmHWwMb926b4puFLWBhPswC1hppieL8dCYVq4zvw0zs93qHN+oy/+NHA 045g== 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=XtuQ99JI44J7+ukH4z2qRjMG6UuOX8EqeO6ZPljFCrNuo/aD1EcKbP6TaLPDkxsCkU K/BMFjD6PWqph3+j3Xbhf1Ome1bo7rauRNR2Wsdezmc5LXw7dv3oR5grhbwoIlWIKucD oshNGaUO4ig3a6PAkx19hJnP7zNCkymb9nsdRVcNVim2FLLqBmK92uaG+Psk1GA7hGV+ RoJ3lbpaplt6INcz2L3VYNMvtRo0uzMkrGZ7BeVyGBWcXIp6mMlpufby93VongChFOgu 7YWEzeO3ORR6+ilevJgZYFXFuV4vVk+DRZ9xS549NaRmLTL61nWSLLI5M26RCRTMWelt 0ntw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=j8JQIaQA; 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 x3si1858120pll.376.2019.03.15.07.24.04; Fri, 15 Mar 2019 07:24:04 -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=j8JQIaQA; 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 S1729195AbfCOOYE (ORCPT + 5 others); Fri, 15 Mar 2019 10:24:04 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:37749 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729063AbfCOOYD (ORCPT ); Fri, 15 Mar 2019 10:24:03 -0400 Received: by mail-wr1-f67.google.com with SMTP id y15so9796951wro.4 for ; Fri, 15 Mar 2019 07:24:02 -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=j8JQIaQAcDYp/hrniE3SlWhBVdcw1ZqCWLjKr0/Ak0tqUQlouW+DZxDQPG0/7qgwAT KjeO+sZYPF7lEEfPhUjTFHANi1QD55Xtag2L5IgvM+fh42UQVDyQeEkGNTQtwQcEBJK9 XWxofGZXydpFXng49gxtjTXN2ftNce5AQFa3BvJp3OIdO8ziWGriOM7m4qgVDG2uH+5J Z2eLq1qlsfJef8BnAcb879uO9UvWfIBrP4AP4FYJ60cpTteNBrJagHcIb7BEYujjmNr5 6LXpPqOxof1TPKBMpNYV5UH7T6Va6jspeD7AngJ98VUk+t9g91eHTftVCyy7ociyM3TH flbw== 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=e5apLKZA5/XIGSx3RMMObyg5P7SnqlqDhTx0K5XYSkLff+h8yskh1jfEeQ5GN5LFql yodWkcwZWW1Aqrt6leSbIX9BaGNqpQSmR4srTAQRSMfL32Fii/ejUng+80WjzI+3nmu7 69ZzSvNPoLVsQwbHeoEaLAC4lqAuvNbww1d+w5GW8wtJQe5wshsMeLRuWMMJ/UUEtu9c Sewps9VF7wX/ovww3PeyPV4r7qiFAWP8sq9XewSSPrC1kISkPxQLKTjIrAWrtPAEU+kH mnRXiJcYoBOI3FO9yVUbAClV5P6gQlmuRYGtyjlGEB6VfLeypyyK/7SdWDHO2MFKBWzq tdtA== X-Gm-Message-State: APjAAAUgLb7M1VQ5luyniXABPpW+OzbQVcY/w4fi2umOU5Bix9kCnqvL zgOG/4XcgNc0CsWjPgvB2ssDMg== X-Received: by 2002:a5d:6252:: with SMTP id m18mr2519314wrv.199.1552659842045; Fri, 15 Mar 2019 07:24:02 -0700 (PDT) Received: from localhost.localdomain (aputeaux-684-1-31-143.w90-86.abo.wanadoo.fr. [90.86.86.143]) by smtp.gmail.com with ESMTPSA id v18sm3267920wrr.90.2019.03.15.07.24.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Mar 2019 07:24:01 -0700 (PDT) From: Bartosz Golaszewski To: Anders Roxell Cc: linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: [libgpiod][PATCH 1/2] tests: enable installing tests to bindir Date: Fri, 15 Mar 2019 15:23:52 +0100 Message-Id: <20190315142353.17264-2-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190315142353.17264-1-brgl@bgdev.pl> References: <20190315142353.17264-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 \