[llvm-commits] [zorg] r99153 - in /zorg/trunk: lnt/README.txt lnt/tests/DB/Create.py lnt/tests/DB/Import.py lnt/tests/Misc/SubmitAndEmail.py lnt/tests/Web/NightlytestMachinesRoot.py lnt/tests/Web/NightlytestRoot.py lnt/tests/Web/NightlytestRunRoot.py lnt/tests/Web/RootPage.py lnt/tests/lit.cfg test/lnt_tests

Daniel Dunbar daniel at zuster.org
Sun Mar 21 17:55:16 PDT 2010


Author: ddunbar
Date: Sun Mar 21 19:55:16 2010
New Revision: 99153

URL: http://llvm.org/viewvc/llvm-project?rev=99153&view=rev
Log:
LNT: Update tests, and add notes in the README.txt on how to do LNT development.

Added:
    zorg/trunk/test/lnt_tests   (with props)
Modified:
    zorg/trunk/lnt/README.txt
    zorg/trunk/lnt/tests/DB/Create.py
    zorg/trunk/lnt/tests/DB/Import.py
    zorg/trunk/lnt/tests/Misc/SubmitAndEmail.py
    zorg/trunk/lnt/tests/Web/NightlytestMachinesRoot.py
    zorg/trunk/lnt/tests/Web/NightlytestRoot.py
    zorg/trunk/lnt/tests/Web/NightlytestRunRoot.py
    zorg/trunk/lnt/tests/Web/RootPage.py
    zorg/trunk/lnt/tests/lit.cfg

Modified: zorg/trunk/lnt/README.txt
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/README.txt?rev=99153&r1=99152&r2=99153&view=diff
==============================================================================
--- zorg/trunk/lnt/README.txt (original)
+++ zorg/trunk/lnt/README.txt Sun Mar 21 19:55:16 2010
@@ -60,8 +60,10 @@
 
  4. Add the zorg.wsgi app to your Apache configuration. You should set also
     configure the WSGIDaemonProcess and WSGIProcessGroup variables if not
-    already done. If running in a virtualenv you will need to configure that as
-    well.
+    already done.
+
+    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
@@ -69,3 +71,29 @@
 
  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
+------------------------
+
+Developing LNT should be done under a virtualenv (most likely in 'develop'
+mode). Currently, the tests require:
+
+ 1. 'lit', the LLVM test runner, is available.
+
+ 2. The hosted application is live at http://localhost/perf/.
+
+ 3. lnt/tests/lit.cfg should be modified to have the correct '%email_host' and
+    '%email_to' substitutions.
+
+To run the tests, use, e.g.,
+
+  lit -sv $ROOT/lnt/tests
+
+or
+
+  lit -sv $ZORG_ROOT/test
+
+to run the zorg and LNT tests all at once.
+
+Note that currently the email test will actually send you email.

Modified: zorg/trunk/lnt/tests/DB/Create.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/DB/Create.py?rev=99153&r1=99152&r2=99153&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/DB/Create.py (original)
+++ zorg/trunk/lnt/tests/DB/Create.py Sun Mar 21 19:55:16 2010
@@ -3,7 +3,7 @@
 # RUN: python %s %t.db
 
 import sys
-from viewer.PerfDB import PerfDB, Run
+from lnt.viewer.PerfDB import PerfDB, Run
 
 # Check creation.
 

Modified: zorg/trunk/lnt/tests/DB/Import.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/DB/Import.py?rev=99153&r1=99152&r2=99153&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/DB/Import.py (original)
+++ zorg/trunk/lnt/tests/DB/Import.py Sun Mar 21 19:55:16 2010
@@ -1,7 +1,7 @@
 # RUN: rm -f %t.db
 # RUN: sqlite3 %t.db ".read %src_root/db/CreateTables.sql"
 
-# RUN: %src_root/import/ImportData --show-sample-count \
+# RUN: %src_root/lnt/import/ImportData --show-sample-count \
 # RUN:     %t.db %S/Inputs/sample-a-small.plist |\
 # RUN:   FileCheck -check-prefix=IMPORT-A-1 %s
 
@@ -10,7 +10,7 @@
 # IMPORT-A-1: ADDED: 90 tests
 # IMPORT-A-1: ADDED: 90 samples
 
-# RUN: %src_root/import/ImportData --show-sample-count \
+# RUN: %src_root/lnt/import/ImportData --show-sample-count \
 # RUN:     %t.db %S/Inputs/sample-b-small.plist |\
 # RUN:   FileCheck -check-prefix=IMPORT-B %s
 
@@ -19,7 +19,7 @@
 # IMPORT-B: ADDED: 0 tests
 # IMPORT-B: ADDED: 90 samples
 
-# RUN: %src_root/import/ImportData --show-sample-count \
+# RUN: %src_root/lnt/import/ImportData --show-sample-count \
 # RUN:     %t.db %S/Inputs/sample-a-small.plist |\
 # RUN:   FileCheck -check-prefix=IMPORT-A-2 %s
 
@@ -32,7 +32,7 @@
 # RUN: python %s %t.db
 
 import datetime, sys
-from viewer.PerfDB import PerfDB, Run, Test
+from lnt.viewer.PerfDB import PerfDB, Run, Test
 
 db = PerfDB(sys.argv[1])
 

Modified: zorg/trunk/lnt/tests/Misc/SubmitAndEmail.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/Misc/SubmitAndEmail.py?rev=99153&r1=99152&r2=99153&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/Misc/SubmitAndEmail.py (original)
+++ zorg/trunk/lnt/tests/Misc/SubmitAndEmail.py Sun Mar 21 19:55:16 2010
@@ -2,11 +2,11 @@
 # RUN: sqlite3 %t.db ".read %src_root/db/CreateTables.sql"
 
 # FIXME: Find a way to test email works, without being annoying.
-# RUN: %src_root/import/ImportData \
+# RUN: %src_root/lnt/import/ImportData \
 # RUN:  --show-sample-count \
 # RUN:  --commit=0 \
-# RUN:  --email-on-import=1 --email-host=relay.example.com \
-# RUN:  --email-from=example at example.com --email-to=example at example.com \
+# RUN:  --email-on-import=1 --email-host=%email_host \
+# RUN:  --email-from=lnt-test at llvm.org --email-to=%email_to \
 # RUN:  --email-base-url=ZORG_TEST %t.db %S/Inputs/sample-a-small.plist > %t
 # RUN: FileCheck %s < %t
 

Modified: zorg/trunk/lnt/tests/Web/NightlytestMachinesRoot.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/Web/NightlytestMachinesRoot.py?rev=99153&r1=99152&r2=99153&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/Web/NightlytestMachinesRoot.py (original)
+++ zorg/trunk/lnt/tests/Web/NightlytestMachinesRoot.py Sun Mar 21 19:55:16 2010
@@ -1,4 +1,4 @@
-# RUN: curl -s http://localhost/zorg/nightlytest/machines/1/ | FileCheck %s
+# RUN: curl -s %base_url/nightlytest/machines/1/ | FileCheck %s
 # CHECK: <h1>LLVM Nightly Test Results</h1>
 # CHECK: Render Time:
 

Modified: zorg/trunk/lnt/tests/Web/NightlytestRoot.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/Web/NightlytestRoot.py?rev=99153&r1=99152&r2=99153&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/Web/NightlytestRoot.py (original)
+++ zorg/trunk/lnt/tests/Web/NightlytestRoot.py Sun Mar 21 19:55:16 2010
@@ -1,3 +1,3 @@
-# RUN: curl -s http://localhost/zorg/nightlytest/ | FileCheck %s
+# RUN: curl -s %base_url/nightlytest/ | FileCheck %s
 # CHECK: <h2>LLVM Nightly Test</h2>
 # CHECK: Render Time:

Modified: zorg/trunk/lnt/tests/Web/NightlytestRunRoot.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/Web/NightlytestRunRoot.py?rev=99153&r1=99152&r2=99153&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/Web/NightlytestRunRoot.py (original)
+++ zorg/trunk/lnt/tests/Web/NightlytestRunRoot.py Sun Mar 21 19:55:16 2010
@@ -1,9 +1,9 @@
-# RUN: curl -s http://localhost/zorg/nightlytest/1/ | FileCheck --check-prefix=BRIEF %s
+# RUN: curl -s %base_url/nightlytest/1/ | FileCheck --check-prefix=BRIEF %s
 # BRIEF: <h1>LLVM Nightly Test Results</h1>
 # BRIEF: See Full Test Results
 # BRIEF: Render Time:
 
-# RUN: curl -s http://localhost/zorg/nightlytest/1/?full=1 | FileCheck --check-prefix=FULL %s
+# RUN: curl -s %base_url/nightlytest/1/?full=1 | FileCheck --check-prefix=FULL %s
 # FULL: <h1>LLVM Nightly Test Results</h1>
 # FULL: See Brief Test Results
 # FULL: Render Time:

Modified: zorg/trunk/lnt/tests/Web/RootPage.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/Web/RootPage.py?rev=99153&r1=99152&r2=99153&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/Web/RootPage.py (original)
+++ zorg/trunk/lnt/tests/Web/RootPage.py Sun Mar 21 19:55:16 2010
@@ -1,2 +1,2 @@
-# RUN: curl -s http://localhost/zorg/ | FileCheck %s
+# RUN: curl -s %base_url/ | FileCheck %s
 # CHECK: <h2>LLVM Testing DB</h2>

Modified: zorg/trunk/lnt/tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/tests/lit.cfg?rev=99153&r1=99152&r2=99153&view=diff
==============================================================================
--- zorg/trunk/lnt/tests/lit.cfg (original)
+++ zorg/trunk/lnt/tests/lit.cfg Sun Mar 21 19:55:16 2010
@@ -6,12 +6,9 @@
 # Configuration file for the 'lit' test runner.
 
 # name: The name of this test suite.
-config.name = 'Zorg'
+config.name = 'LNT'
 
 # testFormat: The test format to use to interpret tests.
-#
-# For now we require '&&' between commands, until they get globally killed and
-# the test runner updated.
 execute_external = platform.system() != 'Windows'
 config.test_format = lit.formats.ShTest(execute_external)
 
@@ -28,3 +25,10 @@
 config.environment['PYTHONPATH'] = src_root
 
 config.substitutions.append(('%src_root', src_root))
+
+# FIXME: Write better tests.
+config.substitutions.append(('%base_url', 'http://localhost/perf'))
+
+# FIXME: Very gross.
+config.substitutions.append(('%email_host', 'relay.example.com'))
+config.substitutions.append(('%email_to', 'example at example.com'))

Added: zorg/trunk/test/lnt_tests
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/test/lnt_tests?rev=99153&view=auto
==============================================================================
--- zorg/trunk/test/lnt_tests (added)
+++ zorg/trunk/test/lnt_tests Sun Mar 21 19:55:16 2010
@@ -0,0 +1 @@
+link ../lnt/tests/
\ No newline at end of file

Propchange: zorg/trunk/test/lnt_tests
------------------------------------------------------------------------------
    svn:special = *





More information about the llvm-commits mailing list