Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.28 KB | None | 0 0
  1. #!/opt/local/bin/python2.6
  2.  
  3. import sys
  4. sys.path.insert(0, "_include_server/lib.macosx-10.6-x86_64-2.6")
  5.  
  6. from include_server import ( basics, include_analyzer_memoizing_node, parse_command )
  7. import unittest
  8. import os
  9.  
  10. #basics.opt_debug_pattern = 31
  11.  
  12. class MPLBug(unittest.TestCase):
  13.  
  14.     def setUp(self):
  15.         client_root_keeper = basics.ClientRootKeeper()
  16.         self.include_analyzer = (
  17.             include_analyzer_memoizing_node.IncludeAnalyzerMemoizingNode(
  18.                 client_root_keeper))
  19.  
  20.     def ProcessCompilationCommandLine(self, cmd, cwd):
  21.         return (self.include_analyzer.ProcessCompilationCommand(
  22.                 cwd,
  23.                 parse_command.ParseCommandArgs(
  24.                     parse_command.ParseCommandLine(cmd),
  25.                     cwd,
  26.                     self.include_analyzer.includepath_map,
  27.                     self.include_analyzer.directory_map,
  28.                     self.include_analyzer.compiler_defaults)))
  29.  
  30.     def test_MPLBug(self):
  31.         closure = self.ProcessCompilationCommandLine(
  32.             "g++ -c -I /opt/local/include -o evalperf.o evalperf.cpp",
  33.             os.getcwd())
  34.         print [ self.include_analyzer.realpath_map.String(i) for i in closure.keys() ]
  35.         print len(closure), "found"
  36.  
  37. unittest.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement