[llvm-commits] [LNT] r167069 - /lnt/trunk/lnt/tests/compile.py
Michael Gottesman
mgottesman at apple.com
Tue Oct 30 17:14:12 PDT 2012
Author: mgottesman
Date: Tue Oct 30 19:14:12 2012
New Revision: 167069
URL: http://llvm.org/viewvc/llvm-project?rev=167069&view=rev
Log:
[compile test] Added support for .tar.gz archives.
I did it in such a manner that will preserve bad behavior that was
allowed before (i.e. zip files without zip extensions). Thus we will only
try and untar if the extension is .tar.gz and in all other cases will
try to unzip.
Modified:
lnt/trunk/lnt/tests/compile.py
Modified: lnt/trunk/lnt/tests/compile.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/compile.py?rev=167069&r1=167068&r2=167069&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/compile.py (original)
+++ lnt/trunk/lnt/tests/compile.py Tue Oct 30 19:14:12 2012
@@ -271,11 +271,19 @@
commands.mkdir_p(source_path)
print >>test_log, '%s: extracting sources for %r' % (
datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S'), name)
- p = subprocess.Popen(args=['unzip', '-q', archive_path],
- stdin=None,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- cwd=source_path)
+
+ if archive_path[-6:] == "tar.gz":
+ p = subprocess.Popen(args=['tar', '-xzf', archive_path],
+ stdin=None,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ cwd=source_path)
+ else:
+ p = subprocess.Popen(args=['unzip', '-q', archive_path],
+ stdin=None,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ cwd=source_path)
stdout,stderr = p.communicate()
if p.wait() != 0:
fatal(("unable to extract archive %r at %r\n"
More information about the llvm-commits
mailing list