How do I run the tests in the Facebook folly library? - folly

I've downloaded and built the Facebook Folly code on my Ubuntu 20.04.02 system. I built and installed googletest, and made sure to use the CMake flag -DBUILD_TESTS=ON to enable building the tests.
But how do I run the tests? I've looked around the build and source tree, don't see anything obvious. Google didn't help, either.
When I run make test in the _build directory, I get
$ make test
Running tests...
Test project /home/chad/f14/folly/_build
No tests were found!!!

Related

How to recompile and run after modifying golang web code,Project build based on makefile

I am debugging an open source golang web project
https://github.com/studygolang/studygolang
Use the build command in the documentation "make build" and "make start",and then the project running.
The problem is when I modify some code,How to recompile the project。
I try “make reload”,but it not work. how to do ?
Simply run make build again. You can read the Makefile located in the base directory of the project to learn what it does.

Shared library under Windows and CMake: DLL not found before installation

The library mylib consists of the library proper, in directory lib/, and a test suite, in directory test/. It is completely under CMake control:
mylib/CMakeLists.txt:
...
add_subdirectory(lib)
add_subdirectory(test)
...
mylib/lib/CMakeLists.txt:
...
add_library(my_lib ${src_files})
...
mylib/test/CMakeLists.txt:
...
add_executable(mytest mytest.c)
target_link_libraries(mytest mylib)
Build steps are:
mkdir build
cd build
cmake ..
make
ctest # or make test
make install
Works under Linux, stable since many years. Under Windows10 though, a message window pops up, entitled "mytest.exe - System error": "The code execution cannot proceed because mylib.dll was not found. Reinstalling the program may fix this problem."
No, installing (rather than reinstalling) would not be a good solution: I need to first test the library before I install it (btw: this excludes most solutions proposed in response to somewhat similar questions).
Isn't CMake supposed to work cross-platform? What is the minimally invasive adjustment to make the above build steps work under Windows?
The right way of doing this on Windows is to populate the PATH environment variable for the test run:
set_tests_properties(your_test_name
PROPERTIES
ENVIRONMENT PATH="path-containing-your-dll")
I believe you can use generator expression if path-containing-your-dll is a function of an artifact that you generate in your build.
Cherry on top: since cmake 3.13, the variable VS_DEBUGGER_ENVIRONMENT can also be set on the target for having a nice debugging behaviour inside Visual Studio (eg. being able to debug the application directly from Visual instead of going through ctest).

Travis not compiling all cocoapods

for a RubyMotion gem, I use Travis for the tests.
The tests are passing locally but fail on Travis.
The reason is quite simple, all the code from one pod is not fully compiled.
If you look at https://travis-ci.org/bmichotte/ProMotion-XLForm at line 838 (for the actual build), it compile only those files
Build ./Pods.xcodeproj [XLForm - Release]
Compile ./XLForm/XLForm/XL/Helpers/NSExpression+XLFormAdditions.m
Compile ./XLForm/XLForm/XL/Helpers/NSArray+XLFormAdditions.m
Compile ./XLForm/XLForm/XL/Helpers/NSPredicate+XLFormAdditions.m
Compile ./XLForm/XLForm/XL/Helpers/NSObject+XLFormAdditions.m
Compile ./XLForm/XLForm/XL/Helpers/NSString+XLFormAdditions.m
while locally, it compile all files.
I'm not sure who is guilty (cocoapods, rubymotion, motion-cocoapods, ...) ? because it use the exact same version as I am using except xcode (6.1 on Travis, 6.4 locally).
Any idea why this occurs ?
Ok, so after a --trace, I was able to find the issue
The pod I use, use nonnull, null_unspecified and other keywords supported by XCode 6.3+ while the default XCode on Travis is 6.1...
Adding osx_image: xcode6.4 on my .travis.yml corrected the issue...
Now, I only have to get a RubyMotion install on this.

Code::Blocks build from bash

I'm developing a C++ application in Code::Blocks.
My program has a few dependencies and has to run under Linux and Windows, this is why
I use Code::Blocks.
Now I'd like to include Travis CI for testing the builds.
On the Travis server, where I have no X11, I won't be able to run Code::Blocks. How can I build my project without Code::Blocks. (Is there a possibility to create "a Makefile" out of the .cbp-file?
This page (Code::Blocks Wiki) mentions there is a --build flag, but you need Code::Blocks & X11. Is there a server way without X11?
You can not run anything which require X11 on Travis, and as far as I know, there is no way to launch a build using Code::Blocks without requiring X11.
The best choice would be to set up your project differently, for example using a Makefile. You will be able to configure Code::Blocks to use your Makefile and also to build on Travis using the make command.
You can also consider using CMake (especially if you are not familiar with Makefile syntax, but not only). This will let you configure your project in a more high level way (compared to a Makefile), and then you will be able to generate a Makefile or a project for the IDE of your choice.
I used cbp2make (C::B Forum entry).
It is quite simple
cbp2make -in project.cbp -out Makefile
and it worked immediatly, even with a more complex configuration
than a simple command line project in Code::Blocks.
It also generates the same build targets as in Code::Blocks. For example make Release would work.
The debian package list shows only a few dependencies, so X11 is not required.

How to build NodeJS in XCode IDE?

How can I build NodeJS within the XCode IDE as a project? NodeJS build instructions say that it should be built with:
./configure
make
make install
However I wish to build within the XCode IDE.
What I really want to do is embed NodeJS within my application, so I think if I can build NodeJS within XCode then I can just adjust it to add my application once I have NodeJS building and running.
I made some progress I think by getting V8 to compile in XCode, now I am trying to add NodeJS to the V8 project.
Run ./configure --xcode in node repository root and you will get node.xcodeproj file you want.
As of this commit in Node.js - https://github.com/nodejs/node/pull/20328 one must do -
./configure -- -f xcode

Resources