]> khamidou — GitHub mirrors - arcanist.git/commitdiff
two small changes for "arc unit" post hook
authormgummelt <mgummelt@fb.com>
Fri, 9 Sep 2011 00:36:20 +0000 (17:36 -0700)
committermgummelt <mgummelt@fb.com>
Fri, 9 Sep 2011 01:25:54 +0000 (18:25 -0700)
Summary:
1) unit engine getter method in the unit workflow

   we store some information (unit test results) in the engine that we
   need to access in the "arc unit" post hook

2) make requireCleanWorkingCopy() public

   "arc unit" doesn't need to be clean in general, but we'd like the
   option to upgrade the workflow to require it if necessary.  We use
   this for ensuring a repo is clean before updating unit test
   results.

Test Plan: Used both features in a custom post hook in arc unit

Reviewers: epriestley

Reviewed By: epriestley

CC: dpepper, aran, epriestley
Differential Revision: 917

src/workflow/base/ArcanistBaseWorkflow.php
src/workflow/unit/ArcanistUnitWorkflow.php

index 7d0de227bf90ac1b7391252c29e9a535344f867c..b7fe41c4f4b7a4316a29b3464e2266f9420e672b 100644 (file)
@@ -573,7 +573,7 @@ class ArcanistBaseWorkflow {
     return empty($this->arguments['allow-untracked']);
   }
 
-  protected function requireCleanWorkingCopy() {
+  public function requireCleanWorkingCopy() {
     $api = $this->getRepositoryAPI();
 
     $working_copy_desc = phutil_console_format(
index d6c14a0aa3389415add46696287936749ddd8ffd..1048890541adff5eb2f32276c61cb6349f0013da 100644 (file)
@@ -60,6 +60,10 @@ EOTEXT
     return true;
   }
 
+  public function getEngine() {
+    return $this->engine;
+  }
+
   public function run() {
 
     $working_copy = $this->getWorkingCopy();