Mehdi Bouaziz
0bea163f77
[Makefile] Do nothing fancy when debugging Makefiles with VERBOSE=1
...
Reviewed By: jvillard
Differential Revision: D4851241
fbshipit-source-id: 6d761db
8 years ago
Jules Villard
f4cbba109e
add options to ./build-infer.sh to only opam deps, and to force the opam switch, delete yarn
...
Reviewed By: jberdine
Differential Revision: D4827998
fbshipit-source-id: ff06e75
8 years ago
Dulma Churchill
15ede90c44
[driver] Add warning about nothing captured
...
Reviewed By: jvillard
Differential Revision: D4795382
fbshipit-source-id: 7bd1909
8 years ago
Jules Villard
3ab6c43fb6
[tests] awesomize make output
...
Summary:
Hide the output of all the toplevel `make` actions and print messages instead, as if we had a better build system than Makefiles. When a command fails, print its stdout and stderr and prefix it with bold red letters. Also display timing information.
```
$ make -j 4 test
[17:39:18][27290] Facebook setup...
[17:39:18][27363] Building checkCopyright...
[17:39:18][27443] Validating facebook/...
[ 0s][27363] SUCCESS Building checkCopyright
[ 0s][27290] SUCCESS Facebook setup
[17:39:18][27863] Building clang plugin...
[ 0s][27443] SUCCESS Validating facebook/
[ 0s][27863] SUCCESS Building clang plugin
[17:39:18][27898] Building clang plugin OCaml interface...
[ 0s][27898] SUCCESS Building clang plugin OCaml interface
[17:39:18][27974] Testing Infer builds without warnings...
[17:39:18][28033] Building native Infer...
[ 12s][27974] SUCCESS Testing Infer builds without warnings
[17:39:30][28998] Testing Infer toplevel builds...
[ 6s][28998] SUCCESS Testing Infer toplevel builds
[17:39:36][31417] Running OCaml unit tests...
[17:39:36][31456] Testing infer OCaml REPL...
[ 6s][31417] SUCCESS Running OCaml unit tests
[ 9s][31456] SUCCESS Testing infer OCaml REPL
[ 92s][28033] SUCCESS Building native Infer
[17:40:50][ 2170] Building Java annotations...
[ 0s][ 2170] SUCCESS Building Java annotations
[17:40:50][ 2186] Building Infer models...
[ 11s][ 2186] SUCCESS Building Infer models
[17:41:01][ 2803] Running build assembly test...
[17:41:01][ 2861] Running build ck analytics test...
[17:41:01][ 2941] Running build ck imports test...
[17:41:01][ 3035] Running build clang compilation db escaped test...
[ 1s][ 3035] SUCCESS Running build clang compilation db escaped test
[17:41:02][ 3139] Running build clang compilation db relpath test...
[ 3s][ 2861] SUCCESS Running build ck analytics test
[17:41:04][ 3296] Running build clang multiple files test...
[*ERROR**][2803] *** ERROR Running build assembly test
[*ERROR**][2803] *** command: ( make INTERACTIVE=1 -C /home/jul/infer/infer/tests/build_systems/assembly test 2> >(grep -v warning: (ignoring old|overriding) (commands|recipe) for target) ; exit 0)
[*ERROR**][2803] *** CWD: /home/jul/infer
[*ERROR**][2803] *** stdout:
[*ERROR**][2803] make[1]: Entering directory '/home/jul/infer/infer/tests/build_systems/assembly'
[*ERROR**][2803] *** inner Testing infer/clang in build_systems/assembly
[*ERROR**][2803] *** inner command: /home/jul/infer/infer/bin/infer --results-dir infer-out --dump-duplicate-symbols --report-custom-error --developer-mode --project-root ../codetoanalyze --no-failures-allowed -a infer -- clang -c ../codetoanalyze/example.S ../codetoanalyze/hello.c
[*ERROR**][2803] *** inner CWD: /home/jul/infer/infer/tests/build_systems/assembly
[*ERROR**][2803] Capturing in make/cc mode...
[*ERROR**][2803] Starting analysis...
[*ERROR**][2803]
[*ERROR**][2803] legend:
[*ERROR**][2803] "F" analyzing a file
[*ERROR**][2803] "." analyzing a procedure
[*ERROR**][2803]
[*ERROR**][2803] Found 1 (out of 1) source files to be analyzed in /home/jul/infer/infer/tests/build_systems/assembly/infer-out
[*ERROR**][2803]
[*ERROR**][2803]
[*ERROR**][2803] No issues found
[*ERROR**][2803]
[*ERROR**][2803] ../../infer.make:30: recipe for target 'test' failed
[*ERROR**][2803] make[1]: Leaving directory '/home/jul/infer/infer/tests/build_systems/assembly'
[*ERROR**][2803] F.--- build_systems/assembly/issues.exp 2017-03-22 16:25:44.583854270 +0000
[*ERROR**][2803] +++ build_systems/assembly/issues.exp.test 2017-03-28 17:41:04.743678254 +0100
[*ERROR**][2803] @@ -1 +0,0 @@
[*ERROR**][2803] -hello.c, test, 2, NULL_DEREFERENCE, [start of procedure test()]
[*ERROR**][2803]
[*ERROR**][2803] Test output (build_systems/assembly/issues.exp.test) differs from expected test output build_systems/assembly/issues.exp
[*ERROR**][2803] Run the following command to replace the expected test output with the new output:
[*ERROR**][2803]
[*ERROR**][2803] make -C build_systems/assembly replace
[*ERROR**][2803]
[*ERROR**][2803] make[1]: *** [test] Error 1
[*ERROR**][2803] *** stderr:
Makefile:230: recipe for target 'build_assembly_test' failed
make: *** [build_assembly_test] Error 1
make: *** Waiting for unfinished jobs....
[...]
```
Reviewed By: jberdine
Differential Revision: D4781857
fbshipit-source-id: cbce26d
8 years ago
Jules Villard
cd421b4a5f
[make] print @ commands when passed VERBOSE=1
...
Summary:
It can be useful when debugging infer or the Makefiles themselves to see what
`make` is doing. Instead of editing Makefiles to remove `@` now you can `make
VERBOSE=1`.
This is just `git ls-files | grep -e Makefile -e '.*\.make' | xargs sed -e 's/^\t@/\t$(QUIET)/' -i`, and adding the definition of `QUIET` to Makefile.config.
Reviewed By: jeremydubreil
Differential Revision: D4779115
fbshipit-source-id: e6e4642
8 years ago
Jules Villard
0b4f4953a5
[build] move to ctypes stubs
...
Summary:
This removes the dependency of libffi, and gives better guarantees at
compile-time. A bit overkill to retrieve the width of the terminal but what do
you know...
Reviewed By: jberdine
Differential Revision: D4700003
fbshipit-source-id: 036989b
8 years ago
Jules Villard
6e1b83a204
[clang] add clang models to `CLANG_DEPS`
...
Summary:
This is helpful to make sure tests are up to date wrt the models.
Also made the Java deps depend on the models.jar instead of the model sources
as that's what the tests will be using. In particular, updating the sources of
the models will not update the results of a test unless someone rebuilds
models.jar, so rerunning the tests when the models haven't been rebuilt is
useless.
Reviewed By: akotulski
Differential Revision: D4635129
fbshipit-source-id: 75b4ab6
8 years ago
Jeremy Dubreil
c57323d67b
[infer][tests] The java tests should depend on the Java models
...
Summary: Modifying the models should invalidate the test results
Reviewed By: sblackshear
Differential Revision: D4518227
fbshipit-source-id: bc75170
8 years ago
Jules Villard
ca784cdb41
[cli] warn about deprecated options, clean up infer repo
...
Summary:
Also make sure we don't introduce deprecated options in our repo, eg when
calling infer from infer.
Reviewed By: jeremydubreil
Differential Revision: D4430379
fbshipit-source-id: 77ea7fd
8 years ago
Jules Villard
4aeea1af3b
[make] split Makefile.config.in into Makefile.autoconf.in and Makefile.config
...
Summary:
This will make it easier to bisect on top of this commit, as values in
Makefile.autoconf.in are not expected to change across commits, but
Makefile.config may fluctuate.
This should also make it easier to rebase stacks of diffs without having
to rerun `./autogen.sh && ./configure`.
Reviewed By: jberdine
Differential Revision: D4410077
fbshipit-source-id: 1119fb6
8 years ago