[tests] port ck imports test to a Makefile

Reviewed By: jberdine

Differential Revision: D4329617

fbshipit-source-id: c0bcfd4
master
Jules Villard 8 years ago committed by Facebook Github Bot
parent 6c056f535a
commit 241b4b04fa

@ -13,7 +13,7 @@ ifeq ($(IS_FACEBOOK_TREE),yes)
include $(ROOT_DIR)/facebook/Makefile.env
endif
BUILD_SYSTEMS_TESTS = assembly ck_analytics clang_translation linters project_root_rel
BUILD_SYSTEMS_TESTS = assembly ck_analytics ck_imports clang_translation linters project_root_rel
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 = [
'componentkit_imports',
'delete',
'fail',
'gradle',
@ -474,14 +473,6 @@ class BuildIntegrationTest(unittest.TestCase):
{'compile': ['analyze'],
'infer_args': ['--reactive']}])
def test_clang_component_kit_imports(self):
test('componentkit_imports',
'component quality analyzer skips imports',
os.path.join(CODETOANALYZE_DIR, 'componentkit'),
[{'compile': ['clang', '-x', 'objective-c++', '-std=c++11', '-c',
'-fblocks', 'TestIgnoreImports.mm'],
'infer_args': ['--cxx', '--no-filtering', '-a', 'linters']}])
def test_fail_on_issue(self):
test('fail', '--fail-on-issue flag',
CODETOANALYZE_DIR,

@ -0,0 +1,20 @@
# 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 = linters
CODETOANALYZE_DIR = ../codetoanalyze/componentkit
CLANG_OPTIONS = -x objective-c++ -std=c++11 -c -fblocks
INFER_OPTIONS = --no-filtering --project-root $(CODETOANALYZE_DIR)
INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(CODETOANALYZE_DIR)/TestIgnoreImports.mm
include $(TESTS_DIR)/clang.make

@ -0,0 +1 @@
TestIgnoreImports.mm, SomeClass_new, 18, MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE, []

@ -1,7 +0,0 @@
[
{
"bug_type": "MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE",
"file": "TestIgnoreImports.mm",
"procedure": "SomeClass_new"
}
]
Loading…
Cancel
Save