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

Unified Diff: tests/test_compress.sh

Issue 7109015: Update XZ Utils to 5.0.3 (in deps) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xz/
Patch Set: Created 9 years, 7 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 | « tests/files/good-1-lzma2-5.xz ('k') | tests/test_files.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/test_compress.sh
===================================================================
--- tests/test_compress.sh (revision 50504)
+++ tests/test_compress.sh (working copy)
@@ -9,6 +9,14 @@
#
###############################################################################
+# If xz wasn't built, this test is skipped.
+if test -x ../src/xz/xz ; then
+ :
+else
+ (exit 77)
+ exit 77
+fi
+
# Find out if our shell supports functions.
eval 'unset foo ; foo() { return 42; } ; foo'
if test $? != 42 ; then
@@ -29,7 +37,7 @@
if $XZ -cd tmp_compressed > tmp_uncompressed ; then
:
else
- echo "Decoding failed: $* $FILE"
+ echo "Decompressing failed: $* $FILE"
(exit 1)
exit 1
fi
@@ -37,34 +45,39 @@
if cmp tmp_uncompressed "$FILE" ; then
:
else
- echo "Decoded file does not match the original: $* $FILE"
+ echo "Decompressed file does not match" \
+ "the original: $* $FILE"
(exit 1)
exit 1
fi
- if $XZDEC tmp_compressed > tmp_uncompressed ; then
- :
- else
- echo "Decoding failed: $* $FILE"
- (exit 1)
- exit 1
- fi
+ if test -n "$XZDEC" ; then
+ if $XZDEC tmp_compressed > tmp_uncompressed ; then
+ :
+ else
+ echo "Decompressing failed: $* $FILE"
+ (exit 1)
+ exit 1
+ fi
- if cmp tmp_uncompressed "$FILE" ; then
- :
- else
- echo "Decoded file does not match the original: $* $FILE"
- (exit 1)
- exit 1
+ if cmp tmp_uncompressed "$FILE" ; then
+ :
+ else
+ echo "Decompressed file does not match" \
+ "the original: $* $FILE"
+ (exit 1)
+ exit 1
+ fi
fi
# Show progress:
echo . | tr -d '\n\r'
}
-XZ="../src/xz/xz --memory=28MiB --threads=1"
-XZDEC="../src/xzdec/xzdec --memory=4MiB"
-unset XZ_OPT
+XZ="../src/xz/xz --memlimit-compress=48MiB --memlimit-decompress=5MiB \
+ --no-adjust --threads=1 --check=crc64"
+XZDEC="../src/xzdec/xzdec" # No memory usage limiter available
+test -x ../src/xzdec/xzdec || XZDEC=
# Create the required input files.
if ./create_compress_files ; then
@@ -80,7 +93,7 @@
rm -f tmp_compressed tmp_uncompressed
trap 'rm -f tmp_compressed tmp_uncompressed' 0
-# Encode and decode each file with various filter configurations.
+# Compress and decompress each file with various filter configurations.
# This takes quite a bit of time.
echo "test_compress.sh:"
for FILE in compress_generated_* "$srcdir"/compress_prepared_*
« no previous file with comments | « tests/files/good-1-lzma2-5.xz ('k') | tests/test_files.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698