blob: 126f5e823a6a22395b0c512ba1f6cad35f5e5b3d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/bash
# selftest — build six twice and assert the wheels tarballs are byte-identical.
# The smallest check that fails if the reproducible-tar normalization breaks.
set -eu
here=$(cd "$(dirname "$0")" && pwd)
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT
# Fixed epoch so both runs use the same mtime (we are testing tar determinism,
# not epoch derivation).
OUTPUT="$tmp/a" "$here/mkwheels" six 1.16.0 1620000000 >/dev/null
OUTPUT="$tmp/b" "$here/mkwheels" six 1.16.0 1620000000 >/dev/null
a=$(md5sum "$tmp/a/six-wheels-1.16.0.tar.gz" | cut -d' ' -f1)
b=$(md5sum "$tmp/b/six-wheels-1.16.0.tar.gz" | cut -d' ' -f1)
if [ "$a" = "$b" ]; then
echo "PASS: reproducible ($a)"
else
echo "FAIL: tarballs differ ($a != $b)" >&2
exit 1
fi
|