[llvm-commits] [LNT] r154150 - in /lnt/trunk/utils: ./ README.txt check-sdist
Daniel Dunbar
daniel at zuster.org
Thu Apr 5 17:10:55 PDT 2012
Author: ddunbar
Date: Thu Apr 5 19:10:55 2012
New Revision: 154150
URL: http://llvm.org/viewvc/llvm-project?rev=154150&view=rev
Log:
Add a utility for checking the source distribution has the contents it should.
Added:
lnt/trunk/utils/
lnt/trunk/utils/README.txt
lnt/trunk/utils/check-sdist (with props)
Added: lnt/trunk/utils/README.txt
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/utils/README.txt?rev=154150&view=auto
==============================================================================
--- lnt/trunk/utils/README.txt (added)
+++ lnt/trunk/utils/README.txt Thu Apr 5 19:10:55 2012
@@ -0,0 +1,2 @@
+Utilities for the LNT project that aren't intended to be part of a source
+distribution.
Added: lnt/trunk/utils/check-sdist
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/utils/check-sdist?rev=154150&view=auto
==============================================================================
--- lnt/trunk/utils/check-sdist (added)
+++ lnt/trunk/utils/check-sdist Thu Apr 5 19:10:55 2012
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# 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."
+find . | \
+ grep -v '^\./.git' | \
+ grep -v '^\./dist' | \
+ grep -v '^\./utils' | \
+ grep -v '^\./docs/_build' | \
+ grep -v '^\./test-instance' | \
+ grep -v '^\./notes.txt' | \
+ grep -v '.pyc$' | grep -v '~$' | \
+ sort > /tmp/lnt_source_files.txt
+
+# Create the source distribution.
+echo "Creating source distribution."
+rm -rf 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#/$##' | \
+ grep -v '^\./PKG-INFO' | \
+ grep -v '^\./setup.cfg' | \
+ sort > /tmp/lnt_sdist_files.txt
+
+# Diff the files.
+echo "Running diff..."
+diff /tmp/lnt_source_files.txt /tmp/lnt_sdist_files.txt
+
Propchange: lnt/trunk/utils/check-sdist
------------------------------------------------------------------------------
svn:executable = *
More information about the llvm-commits
mailing list