Summary:
This gets almost all of folly building with buck. There are a few
cases we don't support yet (custom test wrappers for spooky test
binaries, dlopen-enabled exception tracer binary, etc), but the
vast majority is covered.
Test Plan: built all build targets and ran all tests buck
Reviewed By: sdwilsh@fb.com
Subscribers: tjackson, sdwilsh, fugalh, njormrod
FB internal diff:
D1577256
Tasks:
5055879
CHECK_ERR(r);
buf[r] = '\0';
- fs::path helper(buf);
- helper.remove_filename();
- helper /= "file_test_lock_helper";
+ // NOTE(agallagher): Our various internal build systems layout built
+ // binaries differently, so the two layouts below.
+ fs::path me(buf);
+ auto helper_basename = "file_test_lock_helper";
+ fs::path helper;
+ if (fs::exists(me.parent_path() / helper_basename)) {
+ helper = me.parent_path() / helper_basename;
+ } else if (fs::exists(
+ me.parent_path().parent_path() / helper_basename / helper_basename)) {
+ helper = me.parent_path().parent_path()
+ / helper_basename / helper_basename;
+ } else {
+ throw std::runtime_error(
+ folly::to<std::string>("cannot find helper ", helper_basename));
+ }
TemporaryFile tempFile;
File f(tempFile.fd());
#include <thread>
#include <gflags/gflags.h>
+#include <glog/logging.h>
#include <gtest/gtest.h>
-#include <common/logging/logging.h>
#include <time.h>
using namespace folly::detail;