test that running infer deletes the previous infer-out folder

Reviewed By: martinoluca

Differential Revision: D3736634

fbshipit-source-id: 9fb0c80
master
Jules Villard 9 years ago committed by Facebook Github Bot 1
parent 4e2cc84bcb
commit 2da8940a80

@ -63,6 +63,7 @@ ALL_TESTS = [
'cc1',
'cmake',
'componentkit',
'delete',
'fail',
'gradle',
'javac',
@ -522,6 +523,15 @@ class BuildIntegrationTest(unittest.TestCase):
extra_check=pmd_check,
available=lambda: has_lxml)
def test_infer_deletes_infer_out(self):
# Test that two consecutive analyses do not pollute each other:
# the expected results of running infer on hello.c then on
# hello2.c is that only the bug in hello2.c is reported.
test('delete', 'infer deletes infer-out',
CODETOANALYZE_DIR,
[{'compile': ['clang', '-c', 'hello.c']},
{'compile': ['clang', '-c', 'hello2.c']}])
if __name__ == '__main__':
# hackish capturing of the arguments after '--'

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