https://github.com/osquery/osquery logo
#core
Title
# core
t

TheHellaJeff

11/07/2019, 7:35 PM
Hey anybody, can I get some help on testing osquery? docs say `cmake --build . --target test`(https://osquery.readthedocs.io/en/latest/development/building/) but I get a
make: *** No rule to make target 'test'.  Stop.
response from my cwd:
osquery/build/osquery
anything I’m missing?
s

seph

11/07/2019, 7:38 PM
What command did you run. I can’t tell from your comment
t

TheHellaJeff

11/07/2019, 7:39 PM
I ran
cmake --build . --target test
s

seph

11/07/2019, 7:40 PM
Should be something like:
Copy code
mkdir build
cd build
cmake -DOSQUERY_BUILD_TESTS=ON ../
cmake --build . --target test
What did you run before that?
t

TheHellaJeff

11/07/2019, 7:42 PM
I just ran the `cmake build ../`so that makes sense, I didn’t have tests active
s

Stefano Bonicatti

11/07/2019, 7:48 PM
Beware that running
cmake --build . --target test
won't actually build the tests, it will only try to run them. You need to build with
cmake --build . -j <jobs>
first. This is all mentioned at the top of the
Testing
section in the docs.
We can maybe better clarify that part and put a
Build tests
title as its done with the run part.
12 Views