diff --git a/Makefile b/Makefile index a2c72da57..4965a717f 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ ifeq ($(IS_FACEBOOK_TREE),yes) include $(ROOT_DIR)/facebook//Makefile.env endif -BUILD_SYSTEMS_TESTS = ant project_root_rel +BUILD_SYSTEMS_TESTS = ant assembly project_root_rel DIRECT_TESTS= ifeq ($(BUILD_C_ANALYZERS),yes) diff --git a/infer/tests/build_systems/assembly/Makefile b/infer/tests/build_systems/assembly/Makefile new file mode 100644 index 000000000..4dc157da8 --- /dev/null +++ b/infer/tests/build_systems/assembly/Makefile @@ -0,0 +1,17 @@ +# 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 = ../.. +include $(TESTS_DIR)/clang.make + +ANALYZER = infer +CLANG_OPTIONS = -c +INFER_OPTIONS = --report-custom-error --developer-mode --project-root ../codetoanalyze + +SOURCES = \ + ../codetoanalyze/example.S \ + ../codetoanalyze/hello.c \ diff --git a/infer/tests/build_systems/assembly/issues.exp b/infer/tests/build_systems/assembly/issues.exp new file mode 100644 index 000000000..61a83f1d4 --- /dev/null +++ b/infer/tests/build_systems/assembly/issues.exp @@ -0,0 +1 @@ +hello.c, test, 2, NULL_DEREFERENCE diff --git a/infer/tests/build_systems/build_integration_tests.py b/infer/tests/build_systems/build_integration_tests.py index 0b373609f..b7bc86698 100755 --- a/infer/tests/build_systems/build_integration_tests.py +++ b/infer/tests/build_systems/build_integration_tests.py @@ -61,7 +61,6 @@ CODETOANALYZE_DIR = os.path.join(SCRIPT_DIR, 'codetoanalyze') EXPECTED_OUTPUTS_DIR = os.path.join(SCRIPT_DIR, 'expected_outputs') ALL_TESTS = [ - 'assembly', 'buck', 'clang_compilation_database', 'cmake', @@ -329,13 +328,6 @@ def test(name, class BuildIntegrationTest(unittest.TestCase): - def test_ant_integration(self): - test('ant', 'Ant', - os.path.join(SCRIPT_DIR, os.pardir), - [{'compile': ['ant', 'compile']}], - clean_commands=[['ant', 'clean']], - available=lambda: is_tool_available(['ant', '-version'])) - def test_javac_integration( self, enabled=None, @@ -515,11 +507,6 @@ class BuildIntegrationTest(unittest.TestCase): 'infer_args': reactive_args}, {'compile': ['analyze']}]) - def test_clang_assembly(self): - test('assembly', 'compile with assembly code', CODETOANALYZE_DIR, - [{'compile': ['clang', '-x', 'c', '-c', 'hello.c', '-x', - 'assembler-with-cpp', 'example.S']}]) - def test_clang_component_kit_imports(self): test('componentkit', 'component quality analyzer skips imports', os.path.join(CODETOANALYZE_DIR, 'componentkit'), diff --git a/infer/tests/build_systems/expected_outputs/assembly_report.json b/infer/tests/build_systems/expected_outputs/assembly_report.json deleted file mode 100644 index a6ed10eff..000000000 --- a/infer/tests/build_systems/expected_outputs/assembly_report.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "bug_type": "NULL_DEREFERENCE", - "file": "hello.c", - "procedure": "test" - } -] \ No newline at end of file