diff options
author | Colin Walters <walters@verbum.org> | 2017-06-14 21:44:04 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-06-16 09:31:16 +0000 |
commit | 2bab43fb224edc5b0bfacc79881e387b8de67c4a (patch) | |
tree | ad20632d64c2623dbdab11a9a5dfc254e6b684fc /tests/test-symbols.sh | |
parent | 3e3a0f0766918e4750d136bcb2782482135d0b49 (diff) | |
download | ostree-2bab43fb224edc5b0bfacc79881e387b8de67c4a.tar.gz |
lib: Split symbol versioning into -released and -devel
So far a lot of submitted PR have added symbols into the first
section. Split the file into `-released` and `-devel` to make
this more obvious.
To further enforce things, we hardcode a checksum of the `-released`
file in `test-symbols.sh`. Only release commits should update that
checksum.
Did you notice I like checksums?
Closes: #931
Approved by: pwithnall
Diffstat (limited to 'tests/test-symbols.sh')
-rwxr-xr-x | tests/test-symbols.sh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/test-symbols.sh b/tests/test-symbols.sh index 54f469fb..9018e6f3 100755 --- a/tests/test-symbols.sh +++ b/tests/test-symbols.sh @@ -17,10 +17,12 @@ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -set -euo pipefail +set -xeuo pipefail -echo '1..2' +echo '1..3' +released_syms=${G_TEST_SRCDIR}/src/libostree/libostree-released.sym +devel_syms=${G_TEST_SRCDIR}/src/libostree/libostree-devel.sym if echo "$OSTREE_FEATURES" | grep --quiet --no-messages "experimental"; then experimental_sym="${G_TEST_SRCDIR}/src/libostree/libostree-experimental.sym" experimental_sections="${G_TEST_SRCDIR}/apidoc/ostree-experimental-sections.txt" @@ -30,7 +32,7 @@ else fi echo "Verifying all expected symbols are actually exported..." -grep --no-filename ' ostree_[A-Za-z0-9_]*;' ${G_TEST_SRCDIR}/src/libostree/libostree.sym $experimental_sym | sed -e 's,^ *\([A-Za-z0-9_]*\);,\1,' | sort -u > expected-symbols.txt +grep --no-filename ' ostree_[A-Za-z0-9_]*;' ${released_syms} ${devel_syms} ${experimental_sym} | sed -e 's,^ *\([A-Za-z0-9_]*\);,\1,' | sort -u > expected-symbols.txt eu-readelf -a ${G_TEST_BUILDDIR}/.libs/libostree-1.so | grep 'FUNC.*GLOBAL.*DEFAULT.*@@LIBOSTREE_' | sed -e 's,^.* \(ostree_[A-Za-z0-9_]*\)@@LIBOSTREE_[0-9A-Z_.]*,\1,' |sort -u > found-symbols.txt diff -u expected-symbols.txt found-symbols.txt echo "ok exports" @@ -43,3 +45,11 @@ grep --no-filename '^ostree_' ${G_TEST_SRCDIR}/apidoc/ostree-sections.txt $exper diff -u expected-documented.txt found-documented.txt echo 'ok documented symbols' + +# ONLY update this checksum in release commits! +cat > released-sha256.txt <<EOF +1cacda8ca5f9622da8c36565f58f76d3437f86b276e266a0d4cb531449153404 ${released_syms} +EOF +sha256sum -c released-sha256.txt + +echo "ok someone didn't add a symbol to a released version" |