diff options
author | Simo Sorce <idra@samba.org> | 2009-10-14 10:20:28 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2009-10-14 11:05:51 -0400 |
commit | 2d6d6bcb5de87ce0dbce13ff6bc775b953438b75 (patch) | |
tree | 83efa7e5d70e13b98dd0a917eb79888171ce4936 /lib/talloc/script/abi_checks.sh | |
parent | 075303560f545e59128a1bb16d6128a165830288 (diff) | |
download | samba-2d6d6bcb5de87ce0dbce13ff6bc775b953438b75.tar.gz samba-2d6d6bcb5de87ce0dbce13ff6bc775b953438b75.tar.bz2 samba-2d6d6bcb5de87ce0dbce13ff6bc775b953438b75.zip |
talloc: Change the way mksysms work
Make sure we always have a sorted (per file) export file.
This way we can directly compare the real export and the check file w/o having
to further sort things.
Also return error code from abi_checks.sh if warnings were reported
Diffstat (limited to 'lib/talloc/script/abi_checks.sh')
-rwxr-xr-x | lib/talloc/script/abi_checks.sh | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/lib/talloc/script/abi_checks.sh b/lib/talloc/script/abi_checks.sh index ba60ed003a..66c4e60e45 100755 --- a/lib/talloc/script/abi_checks.sh +++ b/lib/talloc/script/abi_checks.sh @@ -33,6 +33,7 @@ LANG=C; export LANG LC_ALL=C; export LC_ALL LC_COLLATE=C; export LC_COLLATE +exit_status=0 script=$0 dir_name=$(dirname ${script}) @@ -58,34 +59,22 @@ signatures_file_check=${signatures_file}.check ${dir_name}/mksyms.sh awk ${exports_file_check} ${headers} 2>&1 > /dev/null +cat ${headers} | ${dir_name}/mksigs.pl | sort| uniq > ${signatures_file_check} 2> /dev/null -cat ${headers} | ${dir_name}/mksigs.pl > ${signatures_file_check} 2> /dev/null - -normalize_exports_file() { - filename=$1 - cat ${filename} \ - | sed -e 's/^[ \t]*//g' \ - | sed -e 's/^$//g' \ - | sed -e 's/^#.*$//g' \ - | sort | uniq > ${filename}.sort -} - -normalize_exports_file ${exports_file} -normalize_exports_file ${exports_file_check} - -normalize_exports_file ${signatures_file} -normalize_exports_file ${signatures_file_check} - -diff -u ${exports_file}.sort ${exports_file_check}.sort +diff -u ${exports_file} ${exports_file_check} if test "x$?" != "x0" ; then echo "WARNING: possible ABI change detected in exports!" + let exit_status++ else echo "exports check: OK" fi -diff -u ${signatures_file}.sort ${signatures_file_check}.sort +diff -u ${signatures_file} ${signatures_file_check} if test "x$?" != "x0" ; then echo "WARNING: possible ABI change detected in signatures!" + let exit_status++ else echo "signatures check: OK" fi + +exit $exit_status |