Skip to content

Commit

Permalink
update googletest manifest so folly tests build
Browse files Browse the repository at this point in the history
Found that ubuntu 20.04 and 22.04 LTS googletest was too old to build the tests, so updated the googletest manifest.

Test plan:

build with system dependencies and without --no-tests
```
./build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive folly
./build/fbcode_builder/getdeps.py --allow-system-packages build --src-dir=.  folly
```

Before,  error
```
FAILED: CMakeFiles/exception_wrapper_test.dir/folly/test/ExceptionWrapperTest.cpp.o
/usr/bin/c++  -DBOOST_ALL_NO_LIB -DFOLLY_XLOG_STRIP_PREFIXES=\"/home/alex/local/folly:/home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZfollyZbuildZfbcode_builder/build/folly\" -DGFLAGS_IS_A_DLL=0 -D_GNU_SOURCE -D_REENTRANT -I/home/alex/local/folly -I. -isystem /home/alex/local/tmp/ubuntu-20.04/fbcode_builder_getdeps-ZhomeZalexZlocalZfollyZbuildZfbcode_builder/installed/fmt-LkF3PGJrv9IqRFUd-zFENY3ah_TiYc7ZX3G020GUw-I/include -O2 -g -DNDEBUG   -g -finput-charset=UTF-8 -fsigned-char -Wall -Wno-deprecated -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused -Wuninitialized -Wunused-label -Wunused-result -Wshadow-compatible-local -Wno-noexcept-type -faligned-new -fopenmp -pthread -std=gnu++17 -MD -MT CMakeFiles/exception_wrapper_test.dir/folly/test/ExceptionWrapperTest.cpp.o -MF CMakeFiles/exception_wrapper_test.dir/folly/test/ExceptionWrapperTest.cpp.o.d -o CMakeFiles/exception_wrapper_test.dir/folly/test/ExceptionWrapperTest.cpp.o -c /home/alex/local/folly/folly/test/ExceptionWrapperTest.cpp
In file included from /usr/include/gtest/gtest.h:375,
                 from /usr/include/gmock/internal/gmock-internal-utils.h:47,
                 from /usr/include/gmock/gmock-actions.h:51,
                 from /usr/include/gmock/gmock.h:59,
                 from /home/alex/local/folly/folly/portability/GMock.h:32,
                 from /home/alex/local/folly/folly/test/ExceptionWrapperTest.cpp:23:
/home/alex/local/folly/folly/test/ExceptionWrapperTest.cpp: In member function ‘virtual void ExceptionWrapper_throw_test_Test::TestBody()’:
/home/alex/local/folly/folly/test/ExceptionWrapperTest.cpp:72:7: error: ‘ThrowsMessage’ was not declared in this scope
   72 |       ThrowsMessage<std::runtime_error>(StrEq("payload")));
```

After, tests build
  • Loading branch information
ahornby committed Sep 18, 2023
1 parent 361216a commit 21eedf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/fbcode_builder/manifests/googletest
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gtest_force_shared_crt=ON
[cmake.defines.os=windows]
BUILD_SHARED_LIBS=ON

# 18.04 googletest is too old
[debs.not(all(distro=ubuntu,distro_vers="18.04"))]
# packaged LTS googletest is too old
[debs.not(all(distro=ubuntu,any(distro_vers="18.04",distro_vers="20.04",distro_vers="22.04")))]
libgtest-dev
libgmock-dev

0 comments on commit 21eedf9

Please sign in to comment.