tests: Verify there are no duplicate symbols exported
This commit is contained in:
parent
88543529a2
commit
b48696539d
|
@ -8,7 +8,8 @@ dist_noinst_SCRIPTS = common.sh \
|
|||
test-pkcs11-tool-allowed-mechanisms.sh
|
||||
|
||||
TESTS = \
|
||||
test-manpage.sh \
|
||||
test-manpage.sh \
|
||||
test-duplicate-symbols.sh \
|
||||
test-pkcs11-tool-sign-verify.sh \
|
||||
test-pkcs11-tool-test.sh \
|
||||
test-pkcs11-tool-allowed-mechanisms.sh
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
SOURCE_PATH=../
|
||||
|
||||
EXPORTS=`find "${SOURCE_PATH}" -name "*exports"`
|
||||
|
||||
ERRORS=0
|
||||
for E in $EXPORTS; do
|
||||
NUM_DUPES=`sort $E | uniq -D | wc -l`
|
||||
if [[ "$NUM_DUPES" != 0 ]]; then
|
||||
echo "There are duplicate symbols in '$E'"
|
||||
ERRORS=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$ERRORS" = 1 ]]; then
|
||||
echo "There are duplicate symbols"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit $ERRORS
|
Loading…
Reference in New Issue