Mercurial > evolve
comparison tests/test-check-sdist.t @ 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 | 13c406d9912c |
children | 9b507e5e6744 4d57a9f43eac 43bde39bbe65 |
comparison
equal
deleted
inserted
replaced
5955:2068ff9ad72a | 5956:8e78e0f316b3 |
---|---|
28 no previously-included directories found matching 'contrib' | 28 no previously-included directories found matching 'contrib' |
29 no previously-included directories found matching 'debian' | 29 no previously-included directories found matching 'debian' |
30 no previously-included directories found matching '.gitlab' | 30 no previously-included directories found matching '.gitlab' |
31 $ cd "$TESTTMP"/dist | 31 $ cd "$TESTTMP"/dist |
32 | 32 |
33 $ wc -c hg-evolve-*.tar.gz | 33 $ find hg-evolve-*.tar.gz -size +800000c |
34 8????? hg-evolve-*.tar.gz (glob) | 34 hg-evolve-*.tar.gz (glob) |
35 | 35 |
36 $ tar -tzf hg-evolve-*.tar.gz | sed 's|^hg-evolve-[^/]*/||' | sort > files | 36 $ tar -tzf hg-evolve-*.tar.gz | sed 's|^hg-evolve-[^/]*/||' | sort > files |
37 $ wc -l files | 37 $ wc -l files |
38 350 files | 38 350 files |
39 $ fgrep debian files | 39 $ fgrep debian files |