From patchwork Wed Aug 15 14:38:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francois Perrad X-Patchwork-Id: 177687 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 6B1B62C0086 for ; Thu, 16 Aug 2012 00:55:42 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7F740A05AC; Wed, 15 Aug 2012 14:55:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J5RZZpUDT3z3; Wed, 15 Aug 2012 14:55:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B3DD1A05FB; Wed, 15 Aug 2012 14:39:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 7F5E98F753 for ; Wed, 15 Aug 2012 14:39:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 7618C80554 for ; Wed, 15 Aug 2012 14:39:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jg-tmZYfQtdq for ; Wed, 15 Aug 2012 14:39:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by whitealder.osuosl.org (Postfix) with ESMTPS id E0A8A8ED3F for ; Wed, 15 Aug 2012 14:39:04 +0000 (UTC) Received: by wibhm2 with SMTP id hm2so4286449wib.10 for ; Wed, 15 Aug 2012 07:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=4oFyoGkXEPl1isNwif1kP6yh4216haDXmIOo3Mwo22Q=; b=BJyapA8hzsKg3Zo3ALzXCN2XP128/Aa07gk/Pq8wxiJkPcp0KC0awwQaQ91OqFCF/O r5r6WKpNP050/VVwWxC9UXg7Ap6+UPAqJ7FqTer94dAa5BW+Db5JN95sJBDT+uFpRphM B/jKXoIxM188yW/xiRoBpVqcRxdbuA1q+c2UcrcV7ZZ15Kn3ZB4f1Ulh2aIPOt4ofm+X vLwXoKW+Y+SVckR5AjgouYcWTQy4BthitOWCXhHsV5cNfoMnVeqVy6c9n1+cNGZs1of3 f2BNhlXQGQi16qzMqvFxEGqNuufGTmbstTVPZXqBiQrTns64sG7/THXvauPchhxTByxw vqFQ== Received: by 10.180.84.164 with SMTP id a4mr37532496wiz.12.1345041542836; Wed, 15 Aug 2012 07:39:02 -0700 (PDT) Received: from xubuntu-12.04 (125.135.193.77.rev.sfr.net. [77.193.135.125]) by mx.google.com with ESMTPS id dc3sm28981440wib.7.2012.08.15.07.39.01 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 15 Aug 2012 07:39:02 -0700 (PDT) From: Francois Perrad To: buildroot@busybox.net Date: Wed, 15 Aug 2012 16:38:24 +0200 Message-Id: <1345041514-31539-2-git-send-email-francois.perrad@gadz.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1345041514-31539-1-git-send-email-francois.perrad@gadz.org> References: <1345041514-31539-1-git-send-email-francois.perrad@gadz.org> Subject: [Buildroot] [PATCH 02/12] microperl: how to test it ? X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Francois Perrad --- package/microperl/Config.in | 9 +++++++++ package/microperl/microperl.mk | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/package/microperl/Config.in b/package/microperl/Config.in index 256e271..54df7e2 100644 --- a/package/microperl/Config.in +++ b/package/microperl/Config.in @@ -15,6 +15,15 @@ config BR2_PACKAGE_MICROPERL_MODULES Module dependencies are not automatic so check your needs. You can't use XS modules like IO. +config BR2_PACKAGE_MICROPERL_INSTALL_TESTSUITE + bool "install testsuite" + help + Install the test suite on target. + # cd /root/microperl/t + # rm -f perl + # ln -s /usr/bin/microperl perl + # ./perl TEST base/*.t cmd/*.t + menu "module bundles" config BR2_PACKAGE_MICROPERL_BUNDLE_CGI diff --git a/package/microperl/microperl.mk b/package/microperl/microperl.mk index b2a912a..0269b3f 100644 --- a/package/microperl/microperl.mk +++ b/package/microperl/microperl.mk @@ -144,8 +144,20 @@ define MICROPERL_INSTALL_TARGET_CMDS # Remove test files find $(TARGET_DIR)/$(MICROPERL_MODS_DIR) -type f -name *.t \ -exec rm -f {} \; + $(MICROPERL_INSTALL_TESTSUITE) endef +ifdef BR2_PACKAGE_MICROPERL_INSTALL_TESTSUITE +define MICROPERL_INSTALL_TESTSUITE + $(INSTALL) -m644 -D $(@D)/t/TEST $(TARGET_DIR)/root/microperl/t/TEST + $(INSTALL) -m644 -D $(@D)/t/harness $(TARGET_DIR)/root/microperl/t/harness + cp -r $(@D)/lib $(TARGET_DIR)/root/microperl/lib + cp -r $(@D)/t/base $(TARGET_DIR)/root/microperl/t/base + cp -r $(@D)/t/cmd $(TARGET_DIR)/root/microperl/t/cmd + echo "BEGIN { chdir 't' if -d 't'; @INC = ('../lib', '.'); } 1;" > $(TARGET_DIR)/root/microperl/TestInit.pm +endef +endif + define MICROPERL_UNINSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/usr/bin/perl rm -f $(TARGET_DIR)/usr/bin/microperl