[tests] convert clang multiple files test to Makefile

Reviewed By: jberdine

Differential Revision: D4329641

fbshipit-source-id: b850cca
master
Jules Villard 8 years ago committed by Facebook Github Bot
parent f57154372f
commit facdcbe6f2

@ -14,8 +14,8 @@ ifeq ($(IS_FACEBOOK_TREE),yes)
endif
BUILD_SYSTEMS_TESTS = \
assembly ck_analytics ck_imports clang_translation delete_results_dir fail_on_issue gradle \
javac linters make project_root_rel utf8_in_procname
assembly ck_analytics ck_imports clang_multiple_files clang_translation delete_results_dir \
fail_on_issue gradle javac linters make project_root_rel utf8_in_procname
ifneq ($(ANT),no)
BUILD_SYSTEMS_TESTS += ant
endif

@ -61,7 +61,6 @@ CODETOANALYZE_DIR = os.path.join(SCRIPT_DIR, 'codetoanalyze')
EXPECTED_OUTPUTS_DIR = os.path.join(SCRIPT_DIR, 'expected_outputs')
ALL_TESTS = [
'multiclang',
'ndk-build',
'pmd-xml',
'reactive',
@ -440,11 +439,6 @@ class BuildIntegrationTest(unittest.TestCase):
CODETOANALYZE_DIR,
[{'compile': ['clang', '-x', 'c', '-c', 'hello.unknown_ext']}])
def test_clang_multiple_source_files(self):
test('multiclang', 'clang multiple source files',
CODETOANALYZE_DIR,
[{'compile': ['clang', '-c', 'hello.c', 'hello2.c']}])
def test_reactive_multiple_capture(self):
reactive_args = ['-a', 'capture', '--reactive', '--continue']
test('reactive', 'reactive with multiple capture',

@ -0,0 +1,18 @@
# 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
CLANG_OPTIONS = -c
INFER_OPTIONS = --project-root ../codetoanalyze
INFERPRINT_OPTIONS = --issues-tests
SOURCES = ../codetoanalyze/hello.c ../codetoanalyze/hello2.c
include $(TESTS_DIR)/clang.make

@ -0,0 +1,2 @@
hello.c, test, 2, NULL_DEREFERENCE, [start of procedure test()]
hello2.c, test2, 2, NULL_DEREFERENCE, [start of procedure test2()]

@ -1,12 +0,0 @@
[
{
"bug_type": "NULL_DEREFERENCE",
"file": "hello.c",
"procedure": "test"
},
{
"bug_type": "NULL_DEREFERENCE",
"file": "hello2.c",
"procedure": "test2"
}
]
Loading…
Cancel
Save