Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: third_party/lit/utils/check-sdist

Issue 1663053003: [fusl] Add llvm's lit tool to third_party (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: move down a dir Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/lit/utils/check-coverage ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/lit/utils/check-sdist
diff --git a/third_party/lit/utils/check-sdist b/third_party/lit/utils/check-sdist
new file mode 100755
index 0000000000000000000000000000000000000000..f03266a16888949a3c6b6243c7d245802589a805
--- /dev/null
+++ b/third_party/lit/utils/check-sdist
@@ -0,0 +1,45 @@
+#!/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 '^\./notes.txt' | \
+ 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
« no previous file with comments | « third_party/lit/utils/check-coverage ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698