From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id E75F61F560 for ; Fri, 22 Sep 2023 17:04:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1695402275; bh=OhbbOtgno6TdN3GYCuG/gmGObAJDCo+HzCqHhbIJB+g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nU0Y147BnmAn+Cq9r79tCJ4oY3dWereN0TcMEox+9R8fzgqgNpzrcDRFhxN3l+dfb pDuL4LWrNysfLK+e31orT/hQgFEmwz5EIiO02zBc7F9LkaA0F8+JRVQrBxaFxjpnN7 notGQG3Ce6bNL4aFPnH1LkZp1eu5UXM5ri/PcrwI= From: Eric Wong To: spew@80x24.org Subject: [PATCH 2/2] t/lei-mirror: avoid make(1) jobserver warning Date: Fri, 22 Sep 2023 17:04:34 +0000 Message-Id: <20230922170434.2602475-2-e@80x24.org> In-Reply-To: <20230922170434.2602475-1-e@80x24.org> References: <20230922170434.2602475-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We can't control `make test' nor user-defined targets in config.mak. There's no need for a jobserver to run `make help', anyways, so just let things be. While we're at it, allow the test to run in the odd case make(1) isn't available at all... --- t/lei-mirror.t | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/t/lei-mirror.t b/t/lei-mirror.t index 9b5d73ec..08961491 100644 --- a/t/lei-mirror.t +++ b/t/lei-mirror.t @@ -1,7 +1,7 @@ #!perl -w # Copyright (C) all contributors # License: AGPL-3.0+ -use strict; use v5.10.1; use PublicInbox::TestCommon; +use v5.12; use PublicInbox::TestCommon; use PublicInbox::Inbox; require_mods(qw(-httpd lei DBD::SQLite)); require_cmd('curl'); @@ -26,11 +26,14 @@ test_lei({ tmpdir => $tmpdir }, sub { is(PublicInbox::Git::try_cat("$t1/description"), "mirror of $http/t1/\n", 'description set'); ok(-f "$t1/Makefile", 'convenience Makefile added (v1)'); - my $make = which('make'); - is(xsys([$make, 'help'], undef, { -C => $t1, 1 => \(my $help) }), 0, - 'make help'); + SKIP: { + my $make = require_cmd('make', 1); + delete local @ENV{qw(MFLAGS MAKEFLAGS MAKELEVEL)}; + is(xsys([$make, 'help'], undef, { -C => $t1, 1 => \(my $help) }), + 0, "$make handled Makefile without errors"); + isnt($help, '', 'make help worked'); + } ok(-f "$t1/inbox.config.example", 'inbox.config.example downloaded'); - isnt($help, '', 'make help worked'); is((stat(_))[9], $created{v1}, 'inbox.config.example mtime is ->created_at'); is((stat(_))[2] & 0222, 0, 'inbox.config.example not writable');