folly: fix another test running under buck
authorAndrew Gallagher <agallagher@fb.com>
Fri, 31 Jul 2015 10:31:44 +0000 (03:31 -0700)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Fri, 31 Jul 2015 11:22:08 +0000 (04:22 -0700)
Reviewed By: @yfeldblum

Differential Revision: D2300047

folly/test/SubprocessTest.cpp

index 724dbd2407620fd80847a242ea6371a31a3a2eac..3b88f5aae571430adac2438204a4af54ee8fcf53 100644 (file)
@@ -195,8 +195,12 @@ TEST(SimpleSubprocessTest, FdLeakTest) {
 
 TEST(ParentDeathSubprocessTest, ParentDeathSignal) {
   // Find out where we are.
+  const auto basename = "subprocess_test_parent_death_helper";
   auto helper = fs::executable_path();
-  helper.remove_filename() /= "subprocess_test_parent_death_helper";
+  helper.remove_filename() /= basename;
+  if (!fs::exists(helper)) {
+    helper = helper.parent_path().parent_path() / basename / basename;
+  }
 
   fs::path tempFile(fs::temp_directory_path() / fs::unique_path());