Page MenuHomePhabricator

D11051.id.diff
No OneTemporary

D11051.id.diff

diff --git a/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyDiscoveryTestCase.php b/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyDiscoveryTestCase.php
--- a/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyDiscoveryTestCase.php
+++ b/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyDiscoveryTestCase.php
@@ -15,6 +15,8 @@
}
public function testMercurialCommitDiscovery() {
+ $this->requireBinaryForTest('hg');
+
$refs = $this->discoverRefs('HT');
$this->assertEqual(
array(
diff --git a/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyPullTestCase.php b/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyPullTestCase.php
--- a/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyPullTestCase.php
+++ b/src/applications/repository/engine/__tests__/PhabricatorWorkingCopyPullTestCase.php
@@ -10,6 +10,7 @@
}
public function testHgPullBasic() {
+ $this->requireBinaryForTest('hg');
$repo = $this->buildPulledRepository('HT');
$this->assertTrue(Filesystem::pathExists($repo->getLocalPath().'/.hg'));
diff --git a/src/applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php b/src/applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php
--- a/src/applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php
+++ b/src/applications/repository/worker/__tests__/PhabricatorChangeParserTestCase.php
@@ -203,6 +203,8 @@
}
public function testMercurialParser() {
+ $this->requireBinaryForTest('hg');
+
$repository = $this->buildDiscoveredRepository('CHB');
$viewer = PhabricatorUser::getOmnipotentUser();
diff --git a/src/infrastructure/testing/PhabricatorTestCase.php b/src/infrastructure/testing/PhabricatorTestCase.php
--- a/src/infrastructure/testing/PhabricatorTestCase.php
+++ b/src/infrastructure/testing/PhabricatorTestCase.php
@@ -218,5 +218,12 @@
}
}
+ protected function requireBinaryForTest($binary) {
+ if (!Filesystem::binaryExists($binary)) {
+ $this->assertSkipped(
+ pht('No binary "%s" found on this system, skipping test.', $binary));
+ }
+ }
+
}

File Metadata

Mime Type
text/plain
Expires
Tue, Jun 11, 3:02 PM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6299975
Default Alt Text
D11051.id.diff (2 KB)

Event Timeline