From: Ian Jackson Subject: [OSSTEST PATCH 1/6] Move flight_otherjob to Osstest.pm Date: Wed, 1 Jul 2015 12:59:38 +0100 Message-ID: <1435751983-18984-2-git-send-email-ian.jackson@eu.citrix.com> References: <1435751983-18984-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZAGgG-0005nl-5Y for xen-devel@lists.xenproject.org; Wed, 01 Jul 2015 11:59:56 +0000 In-Reply-To: <1435751983-18984-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org No functional change. Signed-off-by: Ian Jackson --- Osstest.pm | 8 ++++++++ Osstest/TestSupport.pm | 9 +-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Osstest.pm b/Osstest.pm index bf90153..6535401 100644 --- a/Osstest.pm +++ b/Osstest.pm @@ -34,6 +34,7 @@ BEGIN { csreadconfig getmethod postfork + flight_otherjob $dbh_tests db_retry db_retry_retry db_retry_abort db_begin_work db_prepare ensuredir get_filecontents_core_quiet system_checked @@ -302,6 +303,13 @@ sub csreadconfig () { #---------- generally useful subroutines ---------- +sub flight_otherjob ($$) { + my ($thisflight, $otherflightjob) = @_; + return $otherflightjob =~ m/^([^.]+)\.([^.]+)$/ ? ($1,$2) : + $otherflightjob =~ m/^\.?([^.]+)$/ ? ($thisflight,$1) : + die "$otherflightjob ?"; +} + sub get_filecontents_core_quiet ($) { # ENOENT => undef my ($path) = @_; if (!open GFC, '<', $path) { diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 699be7e..b5994a4 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -45,7 +45,7 @@ BEGIN { report_once store_runvar get_runvar get_runvar_maybe - get_runvar_default need_runvars flight_otherjob + get_runvar_default need_runvars unique_incrementing_runvar next_unique_name target_cmd_root target_cmd target_cmd_build @@ -283,13 +283,6 @@ sub need_runvars { die "missing runvars @missing "; } -sub flight_otherjob ($$) { - my ($thisflight, $otherflightjob) = @_; - return $otherflightjob =~ m/^([^.]+)\.([^.]+)$/ ? ($1,$2) : - $otherflightjob =~ m/^\.?([^.]+)$/ ? ($thisflight,$1) : - die "$otherflightjob ?"; -} - sub otherflightjob ($) { return flight_otherjob($flight,$_[0]); } -- 1.7.10.4