forked from facebook/infer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests] convert pmd-xml test to Makefile
Reviewed By: jberdine Differential Revision: D4329648 fbshipit-source-id: c4bb17a
- Loading branch information
1 parent
dece9f1
commit 25e35e8
Showing
8 changed files
with
58 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
infer/tests/build_systems/expected_outputs/pmd-xml_report.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright (c) 2016 - present Facebook, Inc. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD style license found in the | ||
# LICENSE file in the root directory of this source tree. An additional grant | ||
# of patent rights can be found in the PATENTS file in the same directory. | ||
|
||
TESTS_DIR = ../.. | ||
|
||
ANALYZER = infer | ||
|
||
CODETOANALYZE_DIR = ../codetoanalyze | ||
|
||
CLANG_OPTIONS = -c | ||
INFER_OPTIONS = --project-root $(CODETOANALYZE_DIR) --pmd-xml | ||
INFERPRINT_OPTIONS = --issues-tests | ||
|
||
SOURCES = $(CODETOANALYZE_DIR)/hello.c | ||
|
||
include $(TESTS_DIR)/clang.make | ||
|
||
issues.exp.test: infer-out/report.json | ||
# grab only a few interesting fields from the xml to prevent flakiness | ||
@grep --only-matching -e ' \(name\|method\|rule\)="[^"]*"' infer-out/report.xml > $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name="hello.c" | ||
method="test" | ||
rule="NULL_DEREFERENCE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
dnl Copyright (c) 2015 - present Facebook, Inc. | ||
dnl All rights reserved. | ||
dnl | ||
dnl This source code is licensed under the BSD style license found in the | ||
dnl LICENSE file in the root directory of this source tree. An additional grant | ||
dnl of patent rights can be found in the PATENTS file in the same directory. | ||
|
||
dnl AC_CHECK_PYTHON_MODULE([python],[module]) | ||
dnl | ||
dnl checks if the given module is available from the given Python interpreter | ||
AC_DEFUN([AC_CHECK_PYTHON_MODULE], | ||
[dnl | ||
AC_MSG_CHECKING([for Python module $2]) | ||
if printf "import %s" $2 | $1 - 1> /dev/null 2> /dev/null; then | ||
AC_MSG_RESULT([ok]) | ||
AS_TR_SH([PYTHON_$2])=yes | ||
else | ||
AC_MSG_RESULT([unavailable]) | ||
AS_TR_SH([PYTHON_$2])=no | ||
fi | ||
AC_SUBST(AS_TR_SH([PYTHON_$2])) | ||
]) |