@@ -467,28 +467,6 @@ def parseOptionsAndInitTestdirs():
467
467
lldbtest_config .codesign_identity = args .codesign_identity
468
468
469
469
470
- def getXcodeOutputPaths (lldbRootDirectory ):
471
- result = []
472
-
473
- # These are for xcode build directories.
474
- xcode3_build_dir = ['build' ]
475
- xcode4_build_dir = ['build' , 'lldb' , 'Build' , 'Products' ]
476
-
477
- configurations = [
478
- ['Debug' ],
479
- ['DebugClang' ],
480
- ['Release' ],
481
- ['BuildAndIntegration' ]]
482
- xcode_build_dirs = [xcode3_build_dir , xcode4_build_dir ]
483
- for configuration in configurations :
484
- for xcode_build_dir in xcode_build_dirs :
485
- outputPath = os .path .join (
486
- lldbRootDirectory , * (xcode_build_dir + configuration ))
487
- result .append (outputPath )
488
-
489
- return result
490
-
491
-
492
470
def setupTestResults ():
493
471
"""Sets up test results-related objects based on arg settings."""
494
472
# Setup the results formatter configuration.
@@ -515,37 +493,6 @@ def setupTestResults():
515
493
atexit .register (formatter_spec .cleanup_func )
516
494
517
495
518
- def getOutputPaths (lldbRootDirectory ):
519
- """
520
- Returns typical build output paths for the lldb executable
521
-
522
- lldbDirectory - path to the root of the lldb svn/git repo
523
- """
524
- result = []
525
-
526
- if sys .platform == 'darwin' :
527
- result .extend (getXcodeOutputPaths (lldbRootDirectory ))
528
-
529
- # cmake builds? look for build or build/host folder next to llvm directory
530
- # lldb is located in llvm/tools/lldb so we need to go up three levels
531
- llvmParentDir = os .path .abspath (
532
- os .path .join (
533
- lldbRootDirectory ,
534
- os .pardir ,
535
- os .pardir ,
536
- os .pardir ))
537
- result .append (os .path .join (llvmParentDir , 'build' , 'bin' ))
538
- result .append (os .path .join (llvmParentDir , 'build' , 'host' , 'bin' ))
539
-
540
- # some cmake developers keep their build directory beside their lldb
541
- # directory
542
- lldbParentDir = os .path .abspath (os .path .join (lldbRootDirectory , os .pardir ))
543
- result .append (os .path .join (lldbParentDir , 'build' , 'bin' ))
544
- result .append (os .path .join (lldbParentDir , 'build' , 'host' , 'bin' ))
545
-
546
- return result
547
-
548
-
549
496
def setupSysPath ():
550
497
"""
551
498
Add LLDB.framework/Resources/Python to the search paths for modules.
@@ -603,14 +550,6 @@ def setupSysPath():
603
550
if "LLDB_EXEC" in os .environ :
604
551
lldbtest_config .lldbExec = os .environ ["LLDB_EXEC" ]
605
552
606
- if not lldbtest_config .lldbExec :
607
- outputPaths = getOutputPaths (lldbRootDirectory )
608
- for outputPath in outputPaths :
609
- candidatePath = os .path .join (outputPath , 'lldb' )
610
- if is_exe (candidatePath ):
611
- lldbtest_config .lldbExec = candidatePath
612
- break
613
-
614
553
if not lldbtest_config .lldbExec :
615
554
# Last, check the path
616
555
lldbtest_config .lldbExec = which ('lldb' )
@@ -696,39 +635,23 @@ def setupSysPath():
696
635
lldbPythonDir , '..' , '..' )
697
636
698
637
if not lldbPythonDir :
699
- if platform .system () == "Darwin" :
700
- python_resource_dir = ['LLDB.framework' , 'Resources' , 'Python' ]
701
- outputPaths = getXcodeOutputPaths (lldbRootDirectory )
702
- for outputPath in outputPaths :
703
- candidatePath = os .path .join (
704
- outputPath , * python_resource_dir )
705
- if os .path .isfile (
706
- os .path .join (
707
- candidatePath ,
708
- init_in_python_dir )):
709
- lldbPythonDir = candidatePath
710
- break
711
-
712
- if not lldbPythonDir :
713
- print ("lldb.py is not found, some tests may fail." )
714
- else :
715
- print (
716
- "Unable to load lldb extension module. Possible reasons for this include:" )
717
- print (" 1) LLDB was built with LLDB_DISABLE_PYTHON=1" )
718
- print (
719
- " 2) PYTHONPATH and PYTHONHOME are not set correctly. PYTHONHOME should refer to" )
720
- print (
721
- " the version of Python that LLDB built and linked against, and PYTHONPATH" )
722
- print (
723
- " should contain the Lib directory for the same python distro, as well as the" )
724
- print (" location of LLDB\' s site-packages folder." )
725
- print (
726
- " 3) A different version of Python than that which was built against is exported in" )
727
- print (" the system\' s PATH environment variable, causing conflicts." )
728
- print (
729
- " 4) The executable '%s' could not be found. Please check " %
730
- lldbtest_config .lldbExec )
731
- print (" that it exists and is executable." )
638
+ print (
639
+ "Unable to load lldb extension module. Possible reasons for this include:" )
640
+ print (" 1) LLDB was built with LLDB_DISABLE_PYTHON=1" )
641
+ print (
642
+ " 2) PYTHONPATH and PYTHONHOME are not set correctly. PYTHONHOME should refer to" )
643
+ print (
644
+ " the version of Python that LLDB built and linked against, and PYTHONPATH" )
645
+ print (
646
+ " should contain the Lib directory for the same python distro, as well as the" )
647
+ print (" location of LLDB\' s site-packages folder." )
648
+ print (
649
+ " 3) A different version of Python than that which was built against is exported in" )
650
+ print (" the system\' s PATH environment variable, causing conflicts." )
651
+ print (
652
+ " 4) The executable '%s' could not be found. Please check " %
653
+ lldbtest_config .lldbExec )
654
+ print (" that it exists and is executable." )
732
655
733
656
if lldbPythonDir :
734
657
lldbPythonDir = os .path .normpath (lldbPythonDir )
0 commit comments