changeset 5956:8e78e0f316b3 stable

tests: improve tarball size check in test-check-sdist.t Instead of relying on globs for checking numbers, let's rely on find(1)'s ability to check file size in a more intelligent way. I would write the number as +800k, but it's not supported in some implementations of find, so it's not portable. Instead have to use "c" to make find(1) use bytes instead of 512-byte blocks, which is the default (???).
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 16 Jun 2021 08:29:28 +0300
parents 2068ff9ad72a
children 254e135b46ef
files tests/test-check-sdist.t
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-check-sdist.t	Mon Jun 14 16:41:29 2021 +0200
+++ b/tests/test-check-sdist.t	Wed Jun 16 08:29:28 2021 +0300
@@ -30,8 +30,8 @@
   no previously-included directories found matching '.gitlab'
   $ cd "$TESTTMP"/dist
 
-  $ wc -c hg-evolve-*.tar.gz
-  8????? hg-evolve-*.tar.gz (glob)
+  $ find hg-evolve-*.tar.gz -size +800000c
+  hg-evolve-*.tar.gz (glob)
 
   $ tar -tzf hg-evolve-*.tar.gz | sed 's|^hg-evolve-[^/]*/||' | sort > files
   $ wc -l files