From 05b1b1824760d743354e6e446415fec44f7cec7c Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Sun, 21 Dec 2025 10:22:59 -0800 Subject: [PATCH] [LNT] Delete lnt specific files All of the LNT setup is now stored in the llvm/llvm-lnt repository, so we should not need any of these files anymore. --- llvm-lnt/blacklist | 47 --------------- llvm-lnt/fabfile.py | 124 --------------------------------------- llvm-lnt/kill_zombies.py | 25 -------- 3 files changed, 196 deletions(-) delete mode 100644 llvm-lnt/blacklist delete mode 100644 llvm-lnt/fabfile.py delete mode 100755 llvm-lnt/kill_zombies.py diff --git a/llvm-lnt/blacklist b/llvm-lnt/blacklist deleted file mode 100644 index 9352b7f00..000000000 --- a/llvm-lnt/blacklist +++ /dev/null @@ -1,47 +0,0 @@ -nts\..*O3.*.code_size -nts\..*Os.*.code_size -nts\..*O0.*.code_size -nts\..*Oz.*\.compile_time -nts\..*\.execution_time -nts\..*.SingleSource/.* -nts\..*.MultiSource/Applications/aha/.* -nts\..*.MultiSource/Applications/ALAC/.* -nts\..*.MultiSource/Applications/d/make_dparser.* -nts\..*.MultiSource/Applications/hbd/hbd.* -nts\..*.MultiSource/Applications/hexxagon/hexxagon.* -nts\..*.MultiSource/Applications/JM/ldecod/ldecod.* -nts\..*.MultiSource/Applications/lambda-0.1.3/lambda.* -nts\..*.MultiSource/Applications/lua/lua.* -nts\..*.MultiSource/Applications/minisat/minisat.* -nts\..*.MultiSource/Applications/oggenc/oggenc.* -nts\..*.MultiSource/Applications/sgefa/sgefa.* -nts\..*.MultiSource/Applications/SIBsim4/SIBsim4.* -nts\..*.MultiSource/Applications/siod/siod.* -nts\..*.MultiSource/Applications/spiff/spiff.* -nts\..*.MultiSource/Applications/viterbi/viterbi.* -nts\..*.MultiSource/Benchmarks/ASCI_Purple/SMG2000/smg2000.* -nts\..*.MultiSource/Benchmarks/ASC_Sequoia/.* -nts\..*.MultiSource/Benchmarks/BitBench/.* -nts\..*.MultiSource/Benchmarks/Fhourstones.* -nts\..*.MultiSource/Benchmarks/FreeBench/.* -nts\..*.MultiSource/Benchmarks/llubenchmark/.* -nts\..*.MultiSource/Benchmarks/MallocBench/.* -nts\..*.MultiSource/Benchmarks/McCat/.* -nts\..*.MultiSource/Benchmarks/mediabench/.* -nts\..*.MultiSource/Benchmarks/MiBench/automotive.* -nts\..*.MultiSource/Benchmarks/MiBench/consumer-jpeg/consumer-jpeg.* -nts\..*.MultiSource/Benchmarks/MiBench/consumer-lame/consumer-lame.* -nts\..*.MultiSource/Benchmarks/MiBench/network-.* -nts\..*.MultiSource/Benchmarks/MiBench/security-.* -nts\..*.MultiSource/Benchmarks/MiBench/telecomm-.* -nts\..*.MultiSource/Benchmarks/nbench/nbench.* -nts\..*.MultiSource/Benchmarks/NPB-serial/is/is.* -nts\..*.MultiSource/Benchmarks/Olden/.* -nts\..*.MultiSource/Benchmarks/PAQ8p/paq8p.* -nts\..*.MultiSource/Benchmarks/Prolangs-C.* -nts\..*.MultiSource/Benchmarks/Ptrdist/.* -nts\..*.MultiSource/Benchmarks/SciMark2-C/.* -nts\..*.MultiSource/Benchmarks/sim/.* -nts\..*.MultiSource/Benchmarks/Trimaran/.* -nts\..*.MultiSource/Benchmarks/TSVC/.* -nts\..*.MultiSource/Benchmarks/VersaBench/.* diff --git a/llvm-lnt/fabfile.py b/llvm-lnt/fabfile.py deleted file mode 100644 index 63dddb534..000000000 --- a/llvm-lnt/fabfile.py +++ /dev/null @@ -1,124 +0,0 @@ -""" Script to control the deployment of LNT to Google Cloud Instance. - - -""" - -import os -from os.path import expanduser - -import re -from fabric.api import env, cd, task, run, put -from fabric.api import sudo -from fabric.context_managers import hide -from fabric.operations import get, local - -here = os.path.dirname(os.path.realpath(__file__)) - -home = expanduser("~") - -env.use_ssh_config = True -env.output_prefix = False - -# The remote LNT venv location. -LNT_VENV = "/srv/lnt/sandbox" - -# Prefix a command with this to get to the venv. -IN_VENV = "source " + LNT_VENV + "/bin/activate; " - - -def in_venv(command): - """Run the command inside the LNT venv.""" - return IN_VENV + command - - -# The remote location of the LNT repo checkout. -LNT_PATH = "/srv/lnt/src/lnt/" -LNT_CONF_PATH = "/srv/lnt/install" - - -@task -def update(): - """Update the svn repo, then reinstall LNT.""" - with cd(LNT_PATH): - with cd(LNT_PATH + "/docs/"): - sudo('rm -rf _build') - with cd(LNT_PATH + "/lnt/server/ui/static"): - sudo('rm -rf docs') - sudo('git checkout docs') - - sudo("git pull --rebase") - run("git log -1 --pretty=%B") - with cd(LNT_PATH + "/docs/"): - sudo(in_venv("make")) - sudo(IN_VENV + "python setup.py install --server") - - put(here + "/blacklist", "/tmp/blacklist") - sudo("mv /tmp/blacklist /srv/lnt/install/blacklist") - put(here + "/kill_zombies.py", "/tmp/kill_zombies.py") - sudo("mv /tmp/kill_zombies.py /etc/cron.hourly/kill_zombies") - sudo("chmod +x /etc/cron.hourly/kill_zombies") - rotate_log() - service_restart() - - -@task -def log(): - get('/srv/lnt/install/lnt.log', 'lnt.log') - local('cat lnt.log') - - -@task -def new_log(): - """Show only lines since the last time the log was echoed.""" - if os.path.exists("lnt.log"): - lines = {line for line in open("lnt.log", 'r').readlines()} - else: - lines = set() - with hide('warnings'): - get('/srv/lnt/install/lnt.log', 'lnt.log', ) - new_lines = {line for line in open("lnt.log", 'r').readlines()} - for l in new_lines - lines: - print ' '.join(l.split()[2:]), - - -@task -def ps(): - sudo('ps auxxxf | grep gunicorn') - - -@task -def rotate_log(): - """Rotate the LNT log.""" - sudo('rm -rf /srv/lnt/install/gunicorn.error.log') - out = sudo('ps auxxxf | grep "gunicorn: master"') - pid = re.search(r'lnt\s+(?P\d+)\s+', out).groupdict()['pid'] - print pid - sudo('kill -USR1 ' + pid) - - -@task -def df(): - sudo('df -h') - - -@task -def kill_zombies(): - import re - out = sudo("ps auxxxf") - stranded = re.compile(r"^lnt\s+(?P\d+).*00\sgunicorn:\swork") - pids = [] - for line in out.split('\n'): - m = stranded.match(line) - if m: - pid = m.groupdict()['pid'] - pids.append(pid) - else: - print ">", line - for pid in pids: - sudo("kill -9 {}".format(pid)) - - -@task -def service_restart(): - """Restarting LNT service with Launchctl""" - sudo("systemctl restart gunicorn") diff --git a/llvm-lnt/kill_zombies.py b/llvm-lnt/kill_zombies.py deleted file mode 100755 index 41de4976f..000000000 --- a/llvm-lnt/kill_zombies.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/python -""" -Kill all the Zombie Gunicon processes. - -""" -import re -import subprocess - -out = subprocess.check_output(["ps", "auxxxf"]) - -stranded = re.compile(r"^lnt\s+(?P\d+).*00\sgunicorn:\swork") -pids = [] -for line in out.split('\n'): - m = stranded.match(line) - if m: - pid = m.groupdict()['pid'] - pids.append(pid) - else: - print ">", line - -if not pids: - print "No PIDs to kill." - -for pid in pids: - print subprocess.check_output(["kill", "-9", "{}".format(pid)])