Author: vharron Date: Mon May 18 18:07:18 2015 New Revision: 237632 URL: http://llvm.org/viewvc/llvm-project?rev=237632&view=rev Log: Make it possible to run dotest on Linux without any parameters
dotest will select clang-3.5 by default and fall back on clang/gcc dotest will look for the lldb executable in the typical cmake output locations: {lldb}/../../../build/bin (next to llvm directory) {lldb}/../../../build/host/bin (next to llvm directory) {lldb}/../build/bin (next to lldb directory) {lldb}/../build/host/bin (next to lldb directory) Modified: lldb/trunk/test/dotest.py Modified: lldb/trunk/test/dotest.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=237632&r1=237631&r2=237632&view=diff ============================================================================== --- lldb/trunk/test/dotest.py (original) +++ lldb/trunk/test/dotest.py Mon May 18 18:07:18 2015 @@ -523,7 +523,12 @@ def parseOptionsAndInitTestdirs(): if platform_system == 'Darwin' and args.apple_sdk: compilers = [commands.getoutput('xcrun -sdk "%s" -find clang 2> /dev/null' % (args.apple_sdk))] else: - compilers = ['clang'] + # 'clang' on ubuntu 14.04 is 3.4 so we try clang-3.5 first + candidateCompilers = ['clang-3.5', 'clang', 'gcc'] + for candidate in candidateCompilers: + if which(candidate): + compilers = [candidate] + break if args.channels: lldbtest_config.channels = args.channels @@ -845,13 +850,18 @@ def getOutputPaths(lldbRootDirectory): result = [] if sys.platform == 'darwin': - result.extend(getXcodeOutputPaths(lldbRootDirectory)) + result.append(getXcodeOutputPaths(lldbRootDirectory)) # cmake builds? look for build or build/host folder next to llvm directory - # lldb is located in llvm/tools/lldb + # lldb is located in llvm/tools/lldb so we need to go up three levels llvmParentDir = os.path.abspath(os.path.join(lldbRootDirectory, os.pardir, os.pardir, os.pardir)) - result.extend(os.path.join(llvmParentDir, 'build', 'bin')) - result.extend(os.path.join(llvmParentDir, 'build', 'host', 'bin')) + result.append(os.path.join(llvmParentDir, 'build', 'bin')) + result.append(os.path.join(llvmParentDir, 'build', 'host', 'bin')) + + # some cmake developers keep their build directory beside their lldb directory + lldbParentDir = os.path.abspath(os.path.join(lldbRootDirectory, os.pardir)) + result.append(os.path.join(lldbParentDir, 'build', 'bin')) + result.append(os.path.join(lldbParentDir, 'build', 'host', 'bin')) return result _______________________________________________ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits