summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2013-01-31 00:21:59 +0000
committerDaniel Dunbar <daniel@zuster.org>2013-01-31 00:21:59 +0000
commitb399246c91127de1e2749852d6d8c44a25a42580 (patch)
treef1000190de12e49e4a1f033ddba8fd7cf4541653 /llvm/utils/lit
parentf74e41ab470eabf1516e04ecb74c68c14c50157c (diff)
downloadbcm5719-llvm-b399246c91127de1e2749852d6d8c44a25a42580.tar.gz
bcm5719-llvm-b399246c91127de1e2749852d6d8c44a25a42580.zip
[lit] Add a MANIFEST file and a script for sanity checking the source dist.
llvm-svn: 174002
Diffstat (limited to 'llvm/utils/lit')
-rw-r--r--llvm/utils/lit/MANIFEST.in7
-rwxr-xr-xllvm/utils/lit/utils/check-sdist44
2 files changed, 51 insertions, 0 deletions
diff --git a/llvm/utils/lit/MANIFEST.in b/llvm/utils/lit/MANIFEST.in
new file mode 100644
index 00000000000..6491a02dd13
--- /dev/null
+++ b/llvm/utils/lit/MANIFEST.in
@@ -0,0 +1,7 @@
+include TODO lit.py
+recursive-include tests *
+global-exclude *pyc
+global-exclude *~
+prune tests/Output
+prune tests/*/Output
+prune tests/*/*/Output
diff --git a/llvm/utils/lit/utils/check-sdist b/llvm/utils/lit/utils/check-sdist
new file mode 100755
index 00000000000..6186446aba1
--- /dev/null
+++ b/llvm/utils/lit/utils/check-sdist
@@ -0,0 +1,44 @@
+#!/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."
+find . | \
+ grep -v '^\./.gitignore' | \
+ grep -v '^\./dist' | \
+ grep -v '^\./utils' | \
+ grep -v '^\./venv' | \
+ grep -v '^\./lit.egg-info' | \
+ grep -v '^\./lit/ExampleTests' | \
+ grep -v '/Output' | \
+ grep -v '__pycache__' | \
+ grep -v '.pyc$' | grep -v '~$' | \
+ sort > /tmp/lit_source_files.txt
+
+# Create the source distribution.
+echo "Creating source distribution."
+rm -rf lit.egg-info dist
+python setup.py sdist > /tmp/lit_sdist_log.txt
+
+# Creating list of files in source distribution.
+echo "Creating source distribution file list."
+tar zft dist/lit*.tar.gz | \
+ sed -e 's#lit-[0-9.dev]*/#./#' | \
+ sed -e 's#/$##' | \
+ grep -v '^\./PKG-INFO' | \
+ grep -v '^\./setup.cfg' | \
+ grep -v '^\./lit.egg-info' | \
+ sort > /tmp/lit_sdist_files.txt
+
+# Diff the files.
+echo "Running diff..."
+if (diff /tmp/lit_source_files.txt /tmp/lit_sdist_files.txt); then
+ echo "Diff is clean!"
+else
+ echo "error: there were differences in the source lists!"
+ exit 1
+fi
OpenPOWER on IntegriCloud