]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Ignore errors from "svn upgrade" in unit tests
authorepriestley <git@epriestley.com>
Thu, 12 Sep 2013 04:23:30 +0000 (21:23 -0700)
committerepriestley <git@epriestley.com>
Thu, 12 Sep 2013 04:23:30 +0000 (21:23 -0700)
Summary: See discussion in D6893. Different versions of `svn` do different stuff, just ignore any possible error here.

Test Plan: Ran unit tests.

Reviewers: andrewjcg, btrahan

Reviewed By: andrewjcg

CC: aran
Differential Revision: https://secure.phabricator.com/D6946

src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php

index ecc7dd605f16074c16348cc76a88b090cb6d6c41..3afbbc2cc270106b15e9623c91607ca0ee3409aa 100644 (file)
@@ -40,7 +40,12 @@ final class ArcanistRepositoryAPIStateTestCase extends ArcanistTestCase {
     if ($api instanceof ArcanistSubversionAPI) {
       // Upgrade the repository so that the test will still pass if the local
       // `svn` is newer than the `svn` which created the repository.
-      $api->execxLocal('upgrade');
+
+      // NOTE: Some versions of Subversion (1.7.x?) exit with an error code on
+      // a no-op upgrade, although newer versions do not. We just ignore the
+      // error here; if it's because of an actual problem we'll hit an error
+      // shortly anyway.
+      $api->execManualLocal('upgrade');
     }
 
     $this->assertCorrectState($test, $api);