Index: buildbot/osuosl/master/config/builders.py =================================================================== --- buildbot/osuosl/master/config/builders.py +++ buildbot/osuosl/master/config/builders.py @@ -721,6 +721,10 @@ build_type="Debug", test_archs=['x86_64', 'i386'], test_compilers=['clang', 'totclang', 'gcc4.8.2'], + remote_ip="173.255.116.181", + remote_dir="/lldb-buildbot/remotetest", + remote_test_archs=['x86_64'], + remote_test_compilers=['clang'], env={'SHELL':"/bin/bash"})}, {'name': "lldb-x86_64-darwin-13.4", 'slavenames': ["lldb-x86_64-darwin-13.4"], Index: zorg/buildbot/builders/LLDBBuilder.py =================================================================== --- zorg/buildbot/builders/LLDBBuilder.py +++ zorg/buildbot/builders/LLDBBuilder.py @@ -237,6 +237,69 @@ workdir='%s/tools/lldb/test' % llvm_objdir)) return f +# Add steps to run lldb test on remote target +def addLLDBRemoteTest(f, + bindir, + remote_ip, + remote_dir, + remote_test_archs, + remote_test_compilers, + env): + + if None in (remote_ip, remote_dir, remote_test_archs, remote_test_compilers): + return f + llvm_srcdir = "llvm" + llvm_builddir = "build" + # rsync + f.addStep(ShellCommand(name="rsync lldb-server", + command="rsync -hav bin/lldb-server* %s:%s" % (remote_ip, remote_dir), + description="rsync lldb-server", + env=env, + workdir='%s' % llvm_builddir)) + f.addStep(ShellCommand(name="rsync python2.7", + command="rsync -havL lib/python2.7 %s:%s" % (remote_ip, remote_dir), + description="rsync python2.7", + env=env, + workdir='%s' % llvm_builddir)) + # launch lldb-server + f.addStep(ShellCommand(name="launch lldb-server", + command="ssh %s screen -d -m %s/lldb-server platform --listen *:5432 --server" % (remote_ip, remote_dir), + description="launch lldb-server on remote host", + env=env, + workdir='%s' % llvm_builddir)) + + # Run Test with list of compilers and archs + for compiler in remote_test_compilers: + # find full path for top of tree clang + if compiler=='totclang': + compilerPath=bindir+'/clang' + else: + compilerPath = compiler + for arch in remote_test_archs: + DOTEST_OPTS=''.join(['--executable ' + bindir + '/lldb ', + '-A %s ' % arch, + '-C %s ' % compilerPath, + '-s lldb-test-traces-%s-%s ' % (compiler, arch), + '-u CXXFLAGS ', + '-u CFLAGS ', + '--platform-name remote-linux ', + '--platform-url connect://%s:5432 ' % remote_ip, + '--platform-working-dir %s' % remote_dir]) + f.addStep(LitTestCommand(name="test lldb Remote (%s-%s)" % (compiler, arch), + command=['../%s/tools/lldb/test/dosep.py' % llvm_srcdir, + '--options', + WithProperties(DOTEST_OPTS)], + description="test lldb", + parseSummaryOnly=True, + workdir='%s' % llvm_builddir)) + f=cleanSVNSourceTree(f, '%s/tools/lldb' % llvm_srcdir) + # terminate lldb-server on remote host + f.addStep(ShellCommand(name="terminate lldb-server", + command="ssh %s pkill lldb-server" % remote_ip, + description="terminate lldb-server", + env=env, + workdir='%s' % llvm_builddir)) + return f # Cmake bulid on Ubuntu # Build command sequence - cmake, ninja, ./dosep @@ -246,6 +309,10 @@ build_type, test_archs=None, test_compilers=None, + remote_ip=None, + remote_dir=None, + remote_test_archs=None, + remote_test_compilers=None, jobs='%(jobs)s', env=None, *args, @@ -256,6 +323,7 @@ llvm_srcdir = "llvm" llvm_builddir = "build" + bindir='%(builddir)s/' + llvm_builddir + '/bin' f = buildbot.process.factory.BuildFactory() @@ -298,6 +366,14 @@ env=env, haltOnFailure=True, workdir=llvm_builddir)) + # Remote test + f = addLLDBRemoteTest(f, + bindir, + remote_ip, + remote_dir, + remote_test_archs, + remote_test_compilers, + env) # Skip lldb-test if no test compiler or arch is specified if not test_archs or not test_compilers: return f @@ -306,8 +382,6 @@ # For now, the caller of this function should make sure that each target architecture is supported by builder machine # Run Test with list of compilers and archs - bindir='%(builddir)s/' + llvm_builddir + '/bin' - for compiler in test_compilers: # find full path for top of tree clang if compiler=='totclang':