1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-05 19:55:47 +03:00

154 Commits

Author SHA1 Message Date
Chad Austin
ef5c19e127 fix Watchman build on FreeBSD
Summary:
Watchman advertises support for FreeBSD but it's regressed a couple
ways. Ensure it builds on FreeBSD again with a Vagrantfile.

Reviewed By: ahornby

Differential Revision: D33989289

fbshipit-source-id: ff906bc219974bafbc349740ce6bddfe5bd2908f
2022-02-08 18:08:18 -08:00
Chad Austin
5cd35796ba add freebsd support
Summary: Add some basic support for FreeBSD to getdeps.

Reviewed By: ahornby

Differential Revision: D33989129

fbshipit-source-id: 42ff5f160b7e19c12196bb2e52a726f7815487bd
2022-02-08 18:08:18 -08:00
Chad Austin
8bf2b676b7 fix windows builds
Summary:
The new boost has an MSVC detection algorithm that 1) I don't
understand and 2) does not even seem deterministic. Since our internal
builds are pinned to vc142, force that in the manifest.

Reviewed By: fanzeyi

Differential Revision: D34085081

fbshipit-source-id: d8ce4d8e28aad14f6fa60f9227dafb546ce321e5
2022-02-08 14:08:20 -08:00
Chad Austin
9992a03119 upgrade boost to 1.78.0
Summary: Boost 1.69 does not build on Fedora 35, so upgrade to Boost 1.78.

Reviewed By: ahornby

Differential Revision: D33855670

fbshipit-source-id: 85469a835a1dab1a7d5222413b1f1349bdcff280
2022-02-03 15:03:10 -08:00
Chad Austin
a89428646a limit parallelism based on available RAM
Summary:
A long time ago, getdeps scheduled each build up to the number of hardware threads. For some builds, that was too heavy, so it got throttled back to only ever use half the hardware threads. This left parallelism on the table for CPU-bound projects that don't use much RAM per compilation.

This commit makes better use of the hardware with finer-grained logic that allows each manifest to specify a `job_weight_mib` estimate in MiB, and limit concurrency to `available_ram / job_weight`.

Reviewed By: ahornby

Differential Revision: D33754018

fbshipit-source-id: 785bed6c6cfe3c473244e0806a77cec1fc119e1f
2022-02-01 17:12:47 -08:00
Alex Hornby
c09d84789d move cargo logic to cargo.py
Summary:
Move cargo logic to separate file as builder.py was getting a bit large

It's just a move of source file for CargoBuilder.  Diff looks a bit big as I did hg cp to preserve history

Differential Revision: D33888925

fbshipit-source-id: 2d57343535ab087e09876edba4d00a6f0234fcd0
2022-01-31 13:52:11 -08:00
Chad Austin
423919dd7e opt into pyre
Summary:
Now that we have some type annotations, we might as well support
running the type checker.

Reviewed By: xavierd

Differential Revision: D33715757

fbshipit-source-id: baf693e4b2415e0e1aa50b569b744ca0cfb91337
2022-01-24 20:23:34 -08:00
Chad Austin
4fb4756ec9 remove legacy __future__ imports
Summary: The future is now.

Reviewed By: xavierd

Differential Revision: D33714537

fbshipit-source-id: 8d282bbe7391c4b72b70dab54a5c252060fba457
2022-01-24 20:23:34 -08:00
Alex Hornby
f2818094cf use the new --force-local-execution option
Summary: Use the new tpx option to run tests locally on the OSS CI hosts

Reviewed By: bigfootjon

Differential Revision: D33454014

fbshipit-source-id: dcf49dcebcd476c68b3eb46eb013079c30db52c7
2022-01-21 09:34:31 -08:00
Zsolt Dollenstein
10216910e9 Add --shared-libs arg to getdeps.py
Summary:
This diffs adds
* `--shared-libs` command line argument to the `build` command which enables building shared libraries for supported projects (cmake-based projects, boost, libevent)
* this flag overrides `BUILD_SHARED_LIBS` cmake flags in manifest files and from `--extra-cmake-defines`
* adds `shared_libs=on` expression support in manifest files
* for boost, the flag enables building shared libraries **in addition to** statically linked ones

Reviewed By: simonmar

Differential Revision: D27462289

fbshipit-source-id: d22ab434f7228c30472611bc323830d88efba0a5
2022-01-18 03:30:35 -08:00
Alex Hornby
88f96e63cb extract get_dependencies method
Summary:
A number of places were extracting dependencies from manifests, but only one was adding in the implicit dependencies for build tools.

Extract the logic to one place and use so that a change in a tool like cmake will now correctly affect all tools using cmake, as it will be taken into account as a dependency hash when the manifest's hash is computed.

Tests for this change revealed that install_dirs needed to be populated in reverse order from the manifest topo-sort, so have also addressed that

Reviewed By: wittgenst

Differential Revision: D32730717

fbshipit-source-id: 1b2a25e460de6085d274c99acfd391b3bd259264
2022-01-07 01:33:09 -08:00
Andres Suarez
b5f1afe216 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33330724

fbshipit-source-id: 8a798435742dedc96e2b6912179736b6a1c72491
2021-12-27 14:41:24 -08:00
Alex Hornby
e357474839 update python to 3.8
Summary:
Update to a newer python that builds on macOS Big Sur, make eden_scm depend on it and use it from PATH

python 3.8 requires libffi which is reference via its pkg-config setup,  however python's pkg-config libffi detection is broken (https://bugs.python.org/issue34823) with the documented workaround requiring an environment variable to be passed into its ./configure step, which is why this change also adds a feature to AutoconfBuilder

With the updated python in place I was able to remove disable_env_override_pkgconfig = 1
disable_env_override_path = 1 from the eden_scm config so that it actually uses the pkg-configs, PATHs and other settings from its dependencies. This should make future python and other dependency upgrades much simpler.

Reviewed By: HarveyHunt

Differential Revision: D32231261

fbshipit-source-id: a2b6addbe22f38e3d71618c802d2c6f836fdd86c
2021-11-26 00:02:15 -08:00
Alex Hornby
c8cc51cf8f bootstrap cmake in parallel
Summary: Lets make this faster

Reviewed By: Croohand

Differential Revision: D32614135

fbshipit-source-id: 2285bdb89c2ad982667261800f327f851a6cfcec
2021-11-23 05:03:44 -08:00
Alex Hornby
cb9a2f00e4 build openssl in parallel
Summary: Make it faster, the build can run in parallel.  Unfortunately install can't but its pretty quick anyway.

Reviewed By: Croohand

Differential Revision: D32608049

fbshipit-source-id: 6c86184993a065e29f95df658f1b50ba563a5b14
2021-11-23 05:03:44 -08:00
Alex Hornby
8297a3aa4a fix a flake8 lint
Summary: fix a lint, platform variable was declared twice

Reviewed By: Croohand

Differential Revision: D32605614

fbshipit-source-id: 8e43de8689bf30410273355444db9c3d94663d43
2021-11-23 05:03:44 -08:00
Alex Hornby
ac1a264215 update boost rpm package names for centos stream
Summary:
rpm names needed updating as boost-contract wasn't found.

The rpm names now include the boost version which should be handy when boost dependency is updated next

Unfortunately the centos boost 1.69 rpms aren't found automatically by the centos cmake boost rules, so this also adds builder.py logic to point to it using  BOOST_INCLUDEDIR and BOOST_LIBRARYDIR

Reviewed By: mzr

Differential Revision: D32140834

fbshipit-source-id: 3e2dd822613957ae4d7be5b73623ff581f11d02b
2021-11-05 05:20:15 -07:00
Xavier Deguillard
b810d2701c win: add --return-nonzero-on-failures to sc_testpilot
Summary:
For whatever reason, sc_testpilot default to --return-zero-on-failures, which
means that test failures are simply not reported properly to the signal box.
Fix that by explicitely passing --return-nonzero-on-failures

Reviewed By: fanzeyi

Differential Revision: D29509158

fbshipit-source-id: ef991f91df48e99769f96ffd8d7015cdf507c723
2021-07-01 09:13:32 -07:00
Xavier Deguillard
3d28082a35 testpilot: testpilot is broken on Sandcastle
Summary: Hack to use parexec and the par directly.

Reviewed By: chadaustin

Differential Revision: D29461444

fbshipit-source-id: 9ac6c1aa43728782b8de0a71446109f7fd5dab1d
2021-06-29 16:29:48 -07:00
Chad Austin
5b5ae812bc fix tpx command line when filtering is enabled
Summary:
The testpilot command line getdeps generated was not suitable for tpx
when filtering. tpx would consider the passed test filter an
environment variable.

Reorder a few things to at least make filtering work.

Reviewed By: fanzeyi

Differential Revision: D28976061

fbshipit-source-id: 21c45b3a4a59711a2a5da36a1bd11b7b4871ec5d
2021-06-09 09:23:41 -07:00
Guilherme Íscaro
cbe7c9dd5b feat: add support for compiling open/r on 64-bit arm linux (#95)
Summary:
Description:

Prior to this patch it was not possible to run open/r on linux running on ARM due to cmake and openssl being harded to download/compile for the x86_64 arch.

In order to prevent such problem this patch actively compiles cmake instead of using pre-compiled binaries and also allows the OpenSSLBuilder to provide the correct build args to openssl, thus not trying to compile or run x86_64 software.

Pull Request resolved: https://github.com/facebook/openr/pull/95

Test Plan: * built the project by using ./build/build_openr.sh

Reviewed By: wez

Differential Revision: D28224684

Pulled By: cooperlees

fbshipit-source-id: 9de61dc6d7dcf7116ec5c67f3f165cd4a4bb5e5c
2021-06-01 11:43:02 -07:00
Chad Austin
50397de0ae forward env vars through tpx
Summary:
The migration to tpx broke Watchman's tests because test_bser relies on YARN_YARN_OFFLINE_MIRROR being set in the environment and tpx doesn't forward environment variables into the test.

Explicitly forward them ourselves.

Reviewed By: fanzeyi

Differential Revision: D27897172

fbshipit-source-id: 16c8017a89979802bd9d443825ed4e22cb6ff6c9
2021-04-22 11:17:55 -07:00
Sandeep Kumar Pani
ab6a30c61c OSS jobs to tpx
Summary:
Tpx works well for all OSS jobs, we should migrate to Tpx instead of
relying testpilot.

Reviewed By: marcelogomez

Differential Revision: D27396539

fbshipit-source-id: dd1994be0eb3b4396764c1f3e68ddd6763b60139
2021-04-01 02:39:45 -07:00
Niles Rogoff
658463b7ce Retry bistro tests up to 5 times
Differential Revision: D25985696

fbshipit-source-id: 52ede8dc494f8bf1991dbfed455fbc6bbba83d87
2021-01-21 14:46:41 -08:00
Niles Rogoff
1d311072e0 Migrate bistro to getdeps
Summary:
This took a lot of cmake fuckery. I am guessing it will break the current travis-ci.org based build, since it no longer downloads gflags.

As I put this diff up, mvfst (a dependency of quic (a dependency of proxygen)) is not building right now due to another diff - a fix is in progress but isn't landed yet. I applied the fix locally for the test plan, but didn't include it in the diff.

Reviewed By: snarkmaster

Differential Revision: D25651851

fbshipit-source-id: b4f15ac7fa5293123710fe367c20d355c0970c42
2021-01-14 17:16:05 -08:00
Pedro Eugenio Rocha Pedreira
326b7f910e Add support for extra_cmake_defines
Summary:
`extra_cmake_defines` are extra flags that are passed to cmake when
compiling each one of the dependencies. For instance:
```
$ ./opensource/fbcode_builder/getdeps.py  build f4d --extra-cmake-define='{"CMAKE_CXX_FLAGS": "-mavx2 -mfma -mavx -mf16c -march=native"}'
```
It takes a json map as input, which can take a list of defines (key value
pairs).

Reviewed By: wez

Differential Revision: D25855781

fbshipit-source-id: 7f4fef2c66f4d12f23c8d7086d6a4f24fcc01ff7
2021-01-13 13:22:50 -08:00
Koray Polat
0041651bd0 Use half of available CPUs
Summary: During intensive builds using all available cores tends to crash the machine. Cutting default number of jobs by half prevents that.

Reviewed By: wez

Differential Revision: D25027757

fbshipit-source-id: 5ea6c77fe4363b9ee09e50de1a5cc33281872e1d
2020-11-30 22:31:45 -08:00
Lukas Piatkowski
950b3b1d0e rust-shed/futures_01_ext: rename futures_ext to futures_01_ext
Summary: As part of the effort to deprecate futures 0.1 in favor of 0.3 I want to create a new futures_ext crate that will contain some of the extensions that are applicable from the futures_01_ext. But first I need to reclame this crate name by renaming the old futures_ext crate. This will also make it easier to track which parts of codebase still use the old futures.

Reviewed By: farnz

Differential Revision: D24725776

fbshipit-source-id: 3574d2a0790f8212f6fad4106655cd41836ff74d
2020-11-05 06:06:46 -08:00
Lukas Piatkowski
a32fc1f993 mononoke/integration: create a Makefile to run tests as part of getdeps.py build (#67)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/67

With this change it will be possible to build dependencies of and run integration tests using getdeps.py.

This is the first goal of Q4 as per https://fb.quip.com/v8YzAYNSYgot: "Get Open Source version of integration tests running on Legocastle".

Before this diff:
The OSS integration tests run now on GitHub by:
- Building some test dependencies with getdeps.py
- Building some test dependencies with homebrew/apt-get
- Running tests via python script

The OSS integration tests were not running on Sandcastle.

After this diff:
The OSS integration tests run on Github by:
- Building and executing tests via getdeps.py (execution of tests happens by getdeps.py calling Make calling python script)

The OSS integration tests run on Sandcastle using the same getdeps.py setup as Github.

Reviewed By: krallin

Differential Revision: D24253268

fbshipit-source-id: cae249b72d076222673b8bbe4ec21866dcdbb253
2020-10-16 12:23:29 -07:00
John Reese
b0335039ca apply black 20.8b1 formatting update
Summary:
allow-large-files

black_any_style

Reviewed By: zertosh

Differential Revision: D24325133

fbshipit-source-id: b4afe80d1e8b2bc993f4b8e3822c02964df47462
2020-10-14 20:21:40 -07:00
Lukas Piatkowski
9c3f99b0c0 mononoke/integration tests: prepare dependencies for running tests by getdeps
Summary:
This diff adds all third party dependencies that are required by getdeps to be able to build and runn Mononoke's integration tests.

Also add a stub Makefile with no-op steps that will be filled in next diff.

Reviewed By: ahornby

Differential Revision: D24251894

fbshipit-source-id: 67384ecfd0ced6762dddc3c6e61feb1240b1162d
2020-10-13 09:51:42 -07:00
Genevieve Helsel
21ee1f0940 fix use before assignment case
Summary: If retries is 0, then `0 < 0` is false, meaning we will skip the `while` loop completely and just try to read retcode, which was never assigned.

Reviewed By: fanzeyi

Differential Revision: D23999523

fbshipit-source-id: fac4a1104eba3585fb52fc8d83163cb1a87b8fee
2020-09-30 13:39:06 -07:00
Lukas Piatkowski
8ecccf04e3 eden/edenapi and mononoke integration tests: add edenapi/tools to getdeps and use them in tests (#51)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/51

This diff extends capabilities of CargoBuilder in getdeps so that individual manifests can be build even without workspaces. Thanks to that a build for edenapi/tools can be made and its artifacts can be used in mononoke integration tests.

Reviewed By: StanislavGlebik

Differential Revision: D23574887

fbshipit-source-id: 8a974a6b5235d36a44fe082aad55cd380d84dd09
2020-09-18 04:21:00 -07:00
Koray Polat
1273272066 Add option to run tests without Testpilot even when it's available
Summary:
- Added a commandline flag to ignore testpilot even when it's available
- Fixed an oversight that caused getdeps to return 0 even if ctest tests have failed.

Reviewed By: wez

Differential Revision: D23161362

fbshipit-source-id: 1ed97c481315e2b39f1128680386390930194970
2020-08-18 09:07:28 -07:00
Zeyi (Rice) Fan
eb5b082107 set SDKROOT when it is not already set
Summary: `SDKROOT` is a requirement if we manually specify the location of the compiler on macOS. Otherwise it wouldn't be able to find the system libraries headers.

Reviewed By: wez

Differential Revision: D22577887

fbshipit-source-id: 98140e6f9e564d665db085d21023986b240b3732
2020-07-26 15:04:21 -07:00
Zeyi (Rice) Fan
ba88d5d42e attempt to specify boost to build with clang - take 2
Summary:
Original commit changeset: c6f013565680

Redo D22417488 (c22b8fcfce), with D22577887 fixing open source CI builds

Reviewed By: wez

Differential Revision: D22577884

fbshipit-source-id: 0c94483e05715493859d29bc2b58f0847a95826b
2020-07-26 15:04:21 -07:00
Lukasz Piatkowski
3c4fdab49e add Mononoke integration tests CI (#26)
Summary:
This diff adds a minimal workflow for running integrations tests for Mononoke. Currently only one test is run and it fails.

This also splits the regular Mononoke CI into separate files for Linux and Mac to match the current style in Eden repo.
There are the "scopeguard::defer" fixes here that somehow escaped the CI tests.
Some tweaks have been made to "integration_runner_real.py" to make it runnable outside FB context.
Lastly the change from using "[[ -v ... ]" to "[[ -n "${...:-}" ]]; in "library.sh" was made because the former is not supported by the default Bash version preinstalled on modern MacOS.

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/26

Reviewed By: krallin

Differential Revision: D22541344

Pulled By: lukaspiatkowski

fbshipit-source-id: 5023d147823166a8754be852c29b1e7b0e6d9f5f
2020-07-16 12:32:20 -07:00
Lukas Piatkowski
d6f17f0eb0 Back out "fix boost macOS build with new Xcode" (#27)
Summary:
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/27

Pull Request resolved: https://github.com/facebookexperimental/rust-shed/pull/9

Original diffs: D22417488 (c22b8fcfce), D22528869 (9f01d017a5)

Reviewed By: markbt

Differential Revision: D22571972

fbshipit-source-id: c6f013565680a757b642dd79e647207fce3351ec
2020-07-16 06:36:19 -07:00
Zeyi (Rice) Fan
9f01d017a5 teach getdeps to look for clang on macOS with xcrun in boost build
Reviewed By: wez

Differential Revision: D22528869

fbshipit-source-id: 66c394b6fafcc45503b593f9f6b0605b5578ce56
2020-07-15 10:21:57 -07:00
Lukasz Piatkowski
17391dd9f5 edenscm/hg: add GitHub Actions with CI for HG plus add fixes for getdeps (#25)
Summary:
Fixes include:
1. Passing "GETDEPS_BUILD_DIR" and "GETDEPS_INSTALL_DIR" env variable and using them in eden/scm/Makefile rather than assuming the source code is always in the same place regardless getdeps arguments (it isn't).
2. Added "fbthrift-source" and "fb303-source" to avoid unnecessary compilation (at least of fb303) and to put fbthrift and fb303 source code in an easy to locate place inside getdeps' "installed" folder.

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/25

Test Plan: sandcastle, check oss-eden_scm-darwin-getdeps

Reviewed By: farnz

Differential Revision: D22431872

Pulled By: lukaspiatkowski

fbshipit-source-id: 8ccbb090713ec085a5dd56df509eb58ab6fb9e34
2020-07-10 12:06:17 -07:00
Zeyi (Rice) Fan
16cae4e6f9 add retry flag to getdeps test
Summary: This commit adds a flag `--retry` to getdeps and teach it to run retry failed test. This allows us to still pass the tests when there are some flaky tests presents.

Reviewed By: wez

Differential Revision: D22291063

fbshipit-source-id: 572af48a52ceb4a9abbf530cc0154ded0120c0de
2020-07-06 16:04:00 -07:00
Lukas Piatkowski
b1f77bce82 eden/scm: provide getdeps.py way of building eden/scm on GitHub
Summary:
In order to do what the title says, this diff does:
1. Add the `eden/oss/.../third-party/rust/.../Cargo.toml` files. As mentioned in the previous diff, those are required by GitHub so that the third party dependencies that are local in fbsource are properly defined with a "git" dependency in order for Cargo to "link" crates properly.
2. Changes to `eden/scm/Makefile` to add build/install commands for getdeps to invoke. Those command knowing that they are called from withing getdeps context they link the dependencies brought by getdeps into their proper places that match their folder layout in fbsource. Those Makefile commands also pass a GETDEPS_BUILD env to the setup.py invocations so that it knows it is being called withing a getdeps build.
3. Changes to `eden/scm/setup.py` that add "thriftasset" that makes use of the getdeps.py provided "thrift" binary to build .py files out of thrift files.
4. Changes to `distutils_rust` to use the vendored crates dir provided by getdeps.
5. Changes to `getdeps/builder.py` and `getdeps/manifest.py` that enable more fine-grained configuratior of how Makefile builds are invoked.
6. Changes to `getdeps/buildopts.py` and `getdeps/manifest.py` to disable overriding PATH and pkgconfig env, so that "eden/scm" builds in getdeps using system libraries rather than getdeps-provided ones (NOTE: I've tried to use getdeps provided libraries, but the trickiest bit was that Rust links with Python, which is currently not providable by getdeps, so if you try to build everything the system provided Python libraries will collide with getdeps provided ones)
7. Added `opensource/fbcode_builder/manifests/eden_scm` for the getdeps build.

Reviewed By: quark-zju

Differential Revision: D22336485

fbshipit-source-id: 244d10c9e06ee83de61e97e62a1f2a2184d2312f
2020-07-02 17:53:56 -07:00
Zeyi (Rice) Fan
044f62d1a1 fix encoding bug
Summary: This bug can be triggered when your computer name contains emoji. getdeps.py will fail to create this file due to Python attempts to write the file as cp1252 (Windows's default encoding)

Reviewed By: wez

Differential Revision: D22171935

fbshipit-source-id: fc3be2d1050c17ddbe05a0fc91d6613865f092ce
2020-06-22 19:02:38 -07:00
Lukasz Piatkowski
0c7db3e979 GitHub Actions: fix running out of space on Ubuntu build workflow (#23)
Summary:
As per https://github.com/actions/virtual-environments/issues/709 there started to be some issies with Ubuntu envs running out of space. This should fix it.

Also our Cargo builds use a lot of space, changing them to be non-incremental and removing debug symbols keeps the build fast, but greatly reduces the disk space usage leaving us enough space on GitHub Actions virtual machines.
Pull Request resolved: https://github.com/facebookexperimental/eden/pull/23

Reviewed By: farnz

Differential Revision: D22160020

Pulled By: lukaspiatkowski

fbshipit-source-id: c23393e310c15ebf5a18b80f0bb5f1f894d24849
2020-06-22 07:50:24 -07:00
Lukas Piatkowski
24ed129271 cargo_from_buck: add the patch section to Cargo workspace and allow workspace appending to existing manifest
Summary:
Two changes here:
1. The `[patch.crates-io]` section of `third-party/rust/Cargo.toml` is being now copied over to workspaces generated by autocargo for OSS and in the runtime generated Cargo.toml file for cargo-fbcode builds. Without that some projects could be buildable in Buck internally, but not externally on GitHub due to missing patches.
2. If a `[workspace]` Cargo.toml file is being generated and there is already a generated Cargo.toml file in the same directory then instead of overriding that file the `[workspace]` (and `[patch]`) sections are appended to that Cargo.toml file.

Reviewed By: farnz

Differential Revision: D22023144

fbshipit-source-id: dec54491c36c2ee0ab29eefb722b3eceaef6ffe1
2020-06-17 06:29:07 -07:00
Lukas Piatkowski
f717e5ed41 rust-shed: add secure_utils to the shed
Reviewed By: StanislavGlebik

Differential Revision: D21549859

fbshipit-source-id: 0e143354a60578732ae1eed8c3c71b9f859e3958
2020-06-03 13:12:17 -07:00
Xavier Deguillard
a01757bb45 getdeps: add filtering of tests
Summary:
For large projects, with lots of tests, running all the tests can take a lot
of time, but for quick development iteration, only a subset of the tests may
be needed to run.

On non-Windows platforms, this can be easily achieved by manually executing
the individual tests binaries and use the builtin filtering mechanism of that
test binary to achieve the goal. On Windows, this can quickly become
impossible as DLLs might not be available, and the right PATH would need to
be manually specified by hand to execute the tests binaries[0].

To solve this, let's simply provide a unified way of running specific tests
by passing in a regexp. Both testpilot and CTest do support regex to execute
specific tests. My understanding is that cargo doesn't yet allows regex, but
will in the future.

[0]: And a missing DLLs would produce no output when executed from
     PowerShell, which makes this very confusing.

Reviewed By: wez

Differential Revision: D21484774

fbshipit-source-id: ee32e950e25bb2a498a2b364a447955a917b0590
2020-05-11 11:50:15 -07:00
Wez Furlong
406d65ca7b getdeps: try harder to avoid ccache on sandcastle
Summary:
A small number of hosts are impacted by some local misconfiguration like this:

```
ccache /usr/bin/c++  -DHAVE_PCLMUL -DHAVE_SSE42 -DOS_LINUX -DROCKSDB_FALLOCATE_PRESENT -DROCKSDB_LIB_IO_POSIX -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_NO_DYNAMIC_EXTENSION -DROCKSDB_PLATFORM_POSIX -DROCKSDB_PTHREAD_ADAPTIVE_MUTEX -DROCKSDB_RANGESYNC_PRESENT -DROCKSDB_SCHED_GETCPU_PRESENT -DROCKSDB_SUPPORT_THREAD_LOCAL -DSNAPPY -I/var/sandcastle/temp/fbcode_builder_getdeps/extracted/rocksdb-v6.8.1.tar.gz/rocksdb-6.8.1 -I/var/sandcastle/temp/fbcode_builder_getdeps/extracted/rocksdb-v6.8.1.tar.gz/rocksdb-6.8.1/include -I/var/sandcastle/temp/fbcode_builder_getdeps/extracted/rocksdb-v6.8.1.tar.gz/rocksdb-6.8.1/third-party/folly -isystem /var/sandcastle/temp/fbcode_builder_getdeps/extracted/rocksdb-v6.8.1.tar.gz/rocksdb-6.8.1/third-party/gtest-1.8.1/fused-src -isystem /var/sandcastle/temp/fbcode_builder_getdeps/installed/snappy-8kzrVQJKWlYwtUKTyQTv0R3_bltgjXecrUEMwSpi-vI/include -W -Wextra -Wall -Wsign-compare -Wshadow -Wno-unused-parameter -Wno-unused-variable -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -Wno-strict-aliasing -std=c++11 -fno-omit-frame-pointer -momit-leaf-frame-pointer -fno-builtin-memcmp -O2 -g -DNDEBUG -MD -MT CMakeFiles/rocksdb.dir/cache/lru_cache.cc.o -MF CMakeFiles/rocksdb.dir/cache/lru_cache.cc.o.d -o CMakeFiles/rocksdb.dir/cache/lru_cache.cc.o -c /var/sandcastle/temp/fbcode_builder_getdeps/extracted/rocksdb-v6.8.1.tar.gz/rocksdb-6.8.1/cache/lru_cache.cc
ccache: error: /home/facebook/.ccache/ccache.conf: No such file or directory
```

let's try to avoid it!

Reviewed By: simpkins

Differential Revision: D21460408

fbshipit-source-id: 95b1fe019ff36eb8acb8476af997c220a7947436
2020-05-08 09:46:44 -07:00
Adam Simpkins
74541a941f getdeps: avoid blowing away too much data when invalidating the CMake cache
Summary:
Previously getdeps would remove the entire top-level `CMakeFiles` directory
from the build output when it wanted to invalidate the CMake cache.  This
directory is used to keep all of the compiled object files for any libraries
or executables defined in the top-level CMakeLists.txt file.  Blowing away
this directory forces all of these sources to be re-compiled, even if this was
not necessary.  This is particularly problematic for folly, which compiles all
of its source files via rules in the top-level CMakeLists.txt target file.

I did have the code still blow away the CMake error and output logs in this
directory: in the past I have seen situations where CMake would not update
these files on new CMake runs if they already existed.

Reviewed By: wez

Differential Revision: D21360668

fbshipit-source-id: 6fcd1a8e371d756114fbab60d8636be8cd5f8978
2020-05-04 17:19:00 -07:00
Wez Furlong
8a433489a1 eden: enable rocksdb in the windows build
Summary:
In the initial stages of the windows port we had
problems building rocksdb on windows, so we disabled it.

These days we're able to build it and detect it--we even
require it in the cmake code, but hadn't gotten around
to telling the rest of the code that we can use it.

This commit re-enables it in the build but leaves sqlite
as the default engine until we're able to perform some
benchmarking.

Rocksdb itself has some build issues on Windows; it doesn't
use cmake to locate dependencies, so even though we built
snappy it doesn't know how to find it without modifying the
source:
https://github.com/facebook/rocksdb/blob/master/thirdparty.inc#L4

For that reason, we disable the use of Snappy in the Windows build.
However, in the version of rocksdb that we were using, it would
default to trying to use Snappy even though it wasn't compiled in
and throw an exception.

I've upgraded to a newer version of rocksdb that will simply not
use compression if no compression was enabled at build time.

Given that we mostly store relatively small objects, I'm assuming
that the lack of compression is fine for now.

Reviewed By: xavierd

Differential Revision: D21319896

fbshipit-source-id: 2a2d06d4bd5382706e9220f9b4a2de99dc18311d
2020-05-01 10:33:23 -07:00