Skip to content

Commit

Permalink
[cpt]Remove sudo requirement for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reikdas committed May 4, 2020
1 parent ae36b2a commit c30d804
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,14 @@ if platform.system() not in ['Windows']:
# require it.
if not os.path.exists(os.path.join(config.test_exec_root, "..", "..", "clang", "test")):
config.test_exec_root = os.path.join(config.test_exec_root, "..", "..")
llvm_revision = urlopen(
"https://raw.githubusercontent.com/root-project/cling/master/LastKnownGoodLLVMSVNRevision.txt"
).readline().strip().decode('utf-8')
subprocess.Popen(['sudo svn export http://llvm.org/svn/llvm-project/llvm/branches/{0}/utils/lit utils/lit'.format(llvm_revision)],
# FIXME: Commit hardcoded - unable to get revision
#llvm_revision = urlopen(
# "https://raw.githubusercontent.com/root-project/cling/master/LastKnownGoodLLVMSVNRevision.txt"
# ).readline().strip().decode('utf-8')
commit = '6a075b6de4cafebec9ca1ff9eec7229a617c93f6'
subprocess.Popen(['wget https://github.com/llvm/llvm-project/archive/{0}.zip &&
unzip {0}.zip "llvm-project-{0}/llvm/utils/lit/*" && mkdir utils/ &&
mv llvm-project-{0}/llvm/utils/lit/ utils/'.format(commit)],
cwd=config.llvm_src_root,
shell=True,
stdin=subprocess.PIPE,
Expand Down

0 comments on commit c30d804

Please sign in to comment.