[llvm-commits] [LNT] r154565 - in /lnt/trunk: MANIFEST.in setup.py tests/lit.cfg tests/utils/ tests/utils/Installation.py tests/utils/SourceDistribution.py utils/check-sdist
Daniel Dunbar
daniel at zuster.org
Wed Apr 11 16:46:30 PDT 2012
Author: ddunbar
Date: Wed Apr 11 18:46:30 2012
New Revision: 154565
URL: http://llvm.org/viewvc/llvm-project?rev=154565&view=rev
Log:
Fix some distribution problems.
- Source and install were missing migration scripts (because they live outside the package hierarchy).
- Source distribution should exclude test output files.
Also, added optional tests (only under --param long=1) which check the source distribution sanity and the installation sanity.
Added:
lnt/trunk/tests/utils/
lnt/trunk/tests/utils/Installation.py
lnt/trunk/tests/utils/SourceDistribution.py
Modified:
lnt/trunk/MANIFEST.in
lnt/trunk/setup.py
lnt/trunk/tests/lit.cfg
lnt/trunk/utils/check-sdist
Modified: lnt/trunk/MANIFEST.in
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/MANIFEST.in?rev=154565&r1=154564&r2=154565&view=diff
==============================================================================
--- lnt/trunk/MANIFEST.in (original)
+++ lnt/trunk/MANIFEST.in Wed Apr 11 18:46:30 2012
@@ -4,8 +4,11 @@
recursive-include examples *
recursive-include lnt/server/ui/static *.css *.js *.html *.ico *.txt
recursive-include lnt/server/ui/templates *.html
+recursive-include lnt/server/db/migrations *
include lnt/server/ui/static/flot/Makefile
include lnt/external/stats/README.txt
global-exclude *pyc
global-exclude *~
prune docs/_build
+prune tests/*/Output
+prune tests/*/*/Output
Modified: lnt/trunk/setup.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/setup.py?rev=154565&r1=154564&r2=154565&view=diff
==============================================================================
--- lnt/trunk/setup.py (original)
+++ lnt/trunk/setup.py Wed Apr 11 18:46:30 2012
@@ -71,7 +71,7 @@
'static/*.js',
'static/*.css',
'templates/*.html'],
- },
+ 'lnt.server.db': ['migrations/*.py'] },
packages = find_packages(),
Modified: lnt/trunk/tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/lit.cfg?rev=154565&r1=154564&r2=154565&view=diff
==============================================================================
--- lnt/trunk/tests/lit.cfg (original)
+++ lnt/trunk/tests/lit.cfg Wed Apr 11 18:46:30 2012
@@ -28,9 +28,13 @@
config.environment['PYTHONPATH'] = src_root
config.substitutions.append(('%src_root', src_root))
+config.substitutions.append(('%{src_root}', src_root))
config.substitutions.append(('%{shared_inputs}', os.path.join(
src_root, 'tests', 'SharedInputs')))
+if lit.params.get('long', None):
+ config.available_features.add('long')
+
# Enable coverage.py reporting, assuming the coverage module has been installed
# and sitecustomize.py in the virtualenv has been modified appropriately.
if lit.params.get('check-coverage', None):
Added: lnt/trunk/tests/utils/Installation.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/utils/Installation.py?rev=154565&view=auto
==============================================================================
--- lnt/trunk/tests/utils/Installation.py (added)
+++ lnt/trunk/tests/utils/Installation.py Wed Apr 11 18:46:30 2012
@@ -0,0 +1,12 @@
+# Check that installation functions properly (mainly try and catch cases where
+# we didn't install package data properly).
+#
+# RUN: rm -rf %t.venv
+# RUN: virtualenv %t.venv
+# RUN: %t.venv/bin/python %{src_root}/setup.py install
+# RUN: rm -rf %t.installation
+# RUN: %t.venv/bin/lnt create %t.installation
+#
+# Disable this test by default, it is very slow because it does a full install.
+#
+# REQUIRES: long
Added: lnt/trunk/tests/utils/SourceDistribution.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/utils/SourceDistribution.py?rev=154565&view=auto
==============================================================================
--- lnt/trunk/tests/utils/SourceDistribution.py (added)
+++ lnt/trunk/tests/utils/SourceDistribution.py Wed Apr 11 18:46:30 2012
@@ -0,0 +1,9 @@
+# Check that our source distribution is "clean" (includes everything we need it
+# to).
+#
+# RUN: %{src_root}/utils/check-sdist %{src_root}
+#
+# Disable this test by default, it isn't particularly slow but it is a tad
+# invasive.
+#
+# REQUIRES: long
Modified: lnt/trunk/utils/check-sdist
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/utils/check-sdist?rev=154565&r1=154564&r2=154565&view=diff
==============================================================================
--- lnt/trunk/utils/check-sdist (original)
+++ lnt/trunk/utils/check-sdist Wed Apr 11 18:46:30 2012
@@ -1,5 +1,9 @@
#!/bin/sh
+if [ $# == 1 ]; then
+ cd $1
+fi
+
# Create a list of all the files in the source tree, excluding various things we
# know don't belong.
echo "Creating current directory contents list."
@@ -10,18 +14,19 @@
grep -v '^\./docs/_build' | \
grep -v '^\./test-instance' | \
grep -v '^\./notes.txt' | \
+ grep -v '/Output' | \
grep -v '.pyc$' | grep -v '~$' | \
sort > /tmp/lnt_source_files.txt
# Create the source distribution.
echo "Creating source distribution."
-rm -rf dist
+rm -rf LNT.egg-info dist
python setup.py sdist > /tmp/lnt_sdist_log.txt
# Creating list of files in source distribution.
echo "Creating source distrubution file list."
tar zft dist/LNT*.tar.gz | \
- sed -e 's#LNT-[0-9.]*/#./#' | \
+ sed -e 's#LNT-[0-9.dev]*/#./#' | \
sed -e 's#/$##' | \
grep -v '^\./PKG-INFO' | \
grep -v '^\./setup.cfg' | \
@@ -29,5 +34,9 @@
# Diff the files.
echo "Running diff..."
-diff /tmp/lnt_source_files.txt /tmp/lnt_sdist_files.txt
-
+if (diff /tmp/lnt_source_files.txt /tmp/lnt_sdist_files.txt); then
+ echo "Diff is clean!"
+else
+ echo "error: there were differences in the source lists!"
+ exit 1
+fi
More information about the llvm-commits
mailing list