Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15400649
D11051.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11051.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 1:08 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7709533
Default Alt Text
D11051.diff (2 KB)
Attached To
Mode
D11051: Skip Mercurial tests if `hg` is not present
Attached
Detach File
Event Timeline
Log In to Comment