summaryrefslogtreecommitdiffstats
path: root/clang/tools/scan-build-py/tests/unit
diff options
context:
space:
mode:
authorDevin Coughlin <dcoughlin@apple.com>2016-09-14 18:14:11 +0000
committerDevin Coughlin <dcoughlin@apple.com>2016-09-14 18:14:11 +0000
commitaed7b8ae864c4e7032ddfdfb95b6088eed2f4c93 (patch)
tree969e152a7f8de070986bc852c003de534005f868 /clang/tools/scan-build-py/tests/unit
parent0289c5bbcd7f0ce3982d803cd7f9830c85344b8e (diff)
downloadbcm5719-llvm-aed7b8ae864c4e7032ddfdfb95b6088eed2f4c93.tar.gz
bcm5719-llvm-aed7b8ae864c4e7032ddfdfb95b6088eed2f4c93.zip
[analyzer] scan-build-py: Remove relative path hack for SATestsBuild.py
Remove the relative path hack in scan-build-py that converts a fully qualified directory name and a fully qualified file path to a relative path before running the analyzer on a file. This hack is not needed: the bad interaction with SATestsBuild.py it was intended to address is actually the same underlying problem that r280768 fixed. Further, because the hack would always relativize paths, it caused SATestBuild.py to be unable to properly line up issues when the build system changed directory and then built a source file in a child directory but used a fully-qualified path for the source file. Differential Revision: https://reviews.llvm.org/D24470 llvm-svn: 281516
Diffstat (limited to 'clang/tools/scan-build-py/tests/unit')
-rw-r--r--clang/tools/scan-build-py/tests/unit/test_runner.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/clang/tools/scan-build-py/tests/unit/test_runner.py b/clang/tools/scan-build-py/tests/unit/test_runner.py
index b4730a1c519..2d090622332 100644
--- a/clang/tools/scan-build-py/tests/unit/test_runner.py
+++ b/clang/tools/scan-build-py/tests/unit/test_runner.py
@@ -219,20 +219,6 @@ class AnalyzerTest(unittest.TestCase):
self.assertEqual(['-DNDEBUG', '-UNDEBUG'], test(['-DNDEBUG']))
self.assertEqual(['-DSomething', '-UNDEBUG'], test(['-DSomething']))
- def test_set_file_relative_path(self):
- def test(expected, input):
- spy = Spy()
- self.assertEqual(spy.success,
- sut.set_file_path_relative(input, spy.call))
- self.assertEqual(expected, spy.arg['file'])
-
- test('source.c',
- {'file': '/home/me/source.c', 'directory': '/home/me'})
- test('me/source.c',
- {'file': '/home/me/source.c', 'directory': '/home'})
- test('../home/me/source.c',
- {'file': '/home/me/source.c', 'directory': '/tmp'})
-
def test_set_language_fall_through(self):
def language(expected, input):
spy = Spy()
OpenPOWER on IntegriCloud