[llvm-commits] [zorg] r99161 - in /zorg/trunk/lnt: README.txt lnt/viewer/app.py lnt/viewer/zorg.cgi lnt/viewer/zorg.wsgi
Daniel Dunbar
daniel at zuster.org
Mon Mar 22 00:18:15 PDT 2010
Author: ddunbar
Date: Mon Mar 22 02:18:15 2010
New Revision: 99161
URL: http://llvm.org/viewvc/llvm-project?rev=99161&view=rev
Log:
LNT: Drop CGI support, install is now as easy as 1, 2, 3... 4. :)
Removed:
zorg/trunk/lnt/lnt/viewer/zorg.cgi
zorg/trunk/lnt/lnt/viewer/zorg.wsgi
Modified:
zorg/trunk/lnt/README.txt
zorg/trunk/lnt/lnt/viewer/app.py
Modified: zorg/trunk/lnt/README.txt
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/README.txt?rev=99161&r1=99160&r2=99161&view=diff
==============================================================================
--- zorg/trunk/lnt/README.txt (original)
+++ zorg/trunk/lnt/README.txt Mon Mar 22 02:18:15 2010
@@ -5,9 +5,9 @@
infrastructure. This is technically version "3.0" of the LLVM nightly test
architecture.
-LNT is written in Python and implements a (old-school) Quixote web-app,
-available by CGI and WSGI, and utilities for submitting data via LLVM's
-NewNightlyTest.pl in conjunction with LLVM's test-suite repository.
+LNT is written in Python and implements a WSGI web app on top of Quixote, along
+with utilities for submitting data via LLVM's NewNightlyTest.pl in conjunction
+with LLVM's test-suite repository.
The infrastructure has the following layout:
@@ -64,13 +64,6 @@
If running in a virtualenv you will need to configure that as well; see the
`modwsgi wiki <http://code.google.com/p/modwsgi/wiki/VirtualEnvironments>`_.
- 5. Add a link or copy of the zorg.cgi app in the appropriate place if you want
- to use the CGI script. The WSGI app is significantly faster, but currently
- can't handle submissions.
-
- 6. Create a zorg/lnt/viewer/resources/graphs directory, which the app uses to
- hold temporary files, and make sure it is writable by the Apache user.
-
Development Instructions
------------------------
Modified: zorg/trunk/lnt/lnt/viewer/app.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/app.py?rev=99161&r1=99160&r2=99161&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/app.py (original)
+++ zorg/trunk/lnt/lnt/viewer/app.py Mon Mar 22 02:18:15 2010
@@ -1,18 +1,10 @@
import os
import sys
-def create_publisher(configPath=None):
+def create_publisher(configPath):
import warnings
warnings.simplefilter("ignore", category=DeprecationWarning)
- if configPath is None:
- # We expect the config file to be adjacent to the absolute path of
- # the cgi script.
- #
- # FIXME: This behavior is deprecated and should be removed.
- configPath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
- "zorg.cfg")
-
configData = {}
exec open(configPath) in configData
Removed: zorg/trunk/lnt/lnt/viewer/zorg.cgi
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/zorg.cgi?rev=99160&view=auto
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/zorg.cgi (original)
+++ zorg/trunk/lnt/lnt/viewer/zorg.cgi (removed)
@@ -1,45 +0,0 @@
-#!/usr/bin/env python
-# -*- Python -*-
-
-import sys
-import os
-
-# These were just some local hacks I used at some point to enable testing with
-# MySQL. We were running afoul of cimport issues, I think. Revisit when we care
-# about MySQL.
-if 0:
- os.environ['PATH'] += ':/usr/local/mysql/bin'
-
- os.environ['PYTHON_EGG_CACHE'] = '/tmp'
- import MySQLdb
-
- import PerfDB
- db = PerfDB.PerfDB("mysql://root:admin@localhost/nt_internal")
- from PerfDB import Machine
- q = db.session.query(Machine.name).distinct().order_by(Machine.name)
- for i in q[:1]:
- break
-
-def create_publisher():
- import warnings
- warnings.simplefilter("ignore", category=DeprecationWarning)
-
- # We expect the config file to be adjacent to the absolute path of
- # the cgi script.
- configPath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
- "zorg.cfg")
- configData = {}
- exec open(configPath) in configData
-
- # Find the zorg installation dir.
- zorgDir = os.path.join(os.path.dirname(configPath),
- configData.get('zorg', ''))
- if zorgDir and zorgDir not in sys.path:
- sys.path.append(zorgDir)
-
- from viewer import publisher
- return publisher.create_publisher(configPath, configData)
-
-if __name__ == '__main__':
- from quixote.server import cgi_server
- cgi_server.run(create_publisher)
Removed: zorg/trunk/lnt/lnt/viewer/zorg.wsgi
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/zorg.wsgi?rev=99160&view=auto
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/zorg.wsgi (original)
+++ zorg/trunk/lnt/lnt/viewer/zorg.wsgi (removed)
@@ -1,13 +0,0 @@
-#!/usr/bin/env python2.6
-# -*- Python -*-
-
-import app
-
-application = app.create_app()
-
-if __name__ == '__main__':
- from wsgiref.simple_server import make_server
- print "Running test application."
- print " open http://localhost:8000/"
- httpd = make_server('', 8000, application)
- httpd.serve_forever()
More information about the llvm-commits
mailing list