From ba3c8e33567033cd17f1e2eecc6eeb8a239797e4 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 11 Sep 2013 21:23:30 -0700 Subject: [PATCH] Ignore errors from "svn upgrade" in unit tests 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 --- .../api/__tests__/ArcanistRepositoryAPIStateTestCase.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php b/src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php index ecc7dd60..3afbbc2c 100644 --- a/src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php +++ b/src/repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php @@ -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);