Don't use stderr as an identifier name
[folly.git] / folly / experimental / test / ProgramOptionsTest.cpp
index 3a0f4ca1c771af6b6109c564f8ae7b1ee5320e4f..9dd175c13e75beb9aa7921c563bfb4fef69ead26 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2016 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,8 +27,12 @@ namespace folly { namespace test {
 namespace {
 
 std::string getHelperPath() {
+  const auto basename = "program_options_test_helper";
   auto path = fs::executable_path();
-  path.remove_filename() /= "program_options_test_helper";
+  path.remove_filename() /= basename;
+  if (!fs::exists(path)) {
+    path = path.parent_path().parent_path() / basename / basename;
+  }
   return path.native();
 }