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 12, 2020
1 parent ae36b2a commit 0d4d7f1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,16 @@ 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, "..", "..")
# 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')
subprocess.Popen(['sudo svn export http://llvm.org/svn/llvm-project/llvm/branches/{0}/utils/lit utils/lit'.format(llvm_revision)],
if llvm_revision != "release_50":
raise Exception("Newer LLVM version required - Please update commit variable")
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 0d4d7f1

Please sign in to comment.