[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 1/3] Move get_harness_rev to Osstest from Osstest::Executive.



No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 Osstest.pm           |   17 +++++++++++++++++
 Osstest/Executive.pm |   18 +-----------------
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/Osstest.pm b/Osstest.pm
index 4a763c6..969a2d0 100644
--- a/Osstest.pm
+++ b/Osstest.pm
@@ -38,6 +38,7 @@ BEGIN {
                       main_revision_job_cond other_revision_job_suffix
                       $dbh_tests db_retry db_retry_retry db_retry_abort
                       db_begin_work db_prepare
+                      get_harness_rev
                       ensuredir get_filecontents_core_quiet system_checked
                       nonempty visible_undef show_abs_time
                       %arch_debian2xen %arch_xen2debian $cfgvar_re
@@ -333,6 +334,22 @@ sub main_revision_job_cond ($) {
     return "(${\ other_revision_job_suffix($jobfield,'x') } = '')";
 }
 
+sub get_harness_rev () {
+    $!=0; $?=0;  my $rev= `git rev-parse HEAD^0`;
+    die "$? $!" unless defined $rev;
+
+    $rev =~ s/\n$//;
+    die "$rev ?" unless $rev =~ m/^[0-9a-f]+$/;
+
+    my $diffr= system 'git diff --exit-code HEAD >/dev/null';
+    if ($diffr) {
+        die "$diffr $! ?" if $diffr != 256;
+        $rev .= '+';
+    }
+
+    return $rev;
+}
+
 sub get_filecontents_core_quiet ($) { # ENOENT => undef
     my ($path) = @_;
     if (!open GFC, '<', $path) {
diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm
index bb2663a..01915ac 100644
--- a/Osstest/Executive.pm
+++ b/Osstest/Executive.pm
@@ -44,7 +44,7 @@ BEGIN {
     our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
     $VERSION     = 1.00;
     @ISA         = qw(Exporter);
-    @EXPORT      = qw(get_harness_rev grabrepolock_reexec
+    @EXPORT      = qw(grabrepolock_reexec
                       findtask @all_lock_tables
                       restrictflight_arg restrictflight_cond
                       report_run_getinfo report_altcolour
@@ -128,22 +128,6 @@ sub grabrepolock_reexec {
     }
 }
 
-sub get_harness_rev () {
-    $!=0; $?=0;  my $rev= `git rev-parse HEAD^0`;
-    die "$? $!" unless defined $rev;
-
-    $rev =~ s/\n$//;
-    die "$rev ?" unless $rev =~ m/^[0-9a-f]+$/;
-
-    my $diffr= system 'git diff --exit-code HEAD >/dev/null';
-    if ($diffr) {
-        die "$diffr $! ?" if $diffr != 256;
-        $rev .= '+';
-    }
-
-    return $rev;
-}
-
 #---------- database access ----------#
 
 sub opendb_state () {
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.