diff options
author | Benjamin Berg <benjamin@sipsolutions.net> | 2007-05-21 18:01:49 (GMT) |
---|---|---|
committer | Benjamin Berg <benjamin@sipsolutions.net> | 2007-05-21 18:01:49 (GMT) |
commit | c361b6e1866e54cba68c1aa57790dd957ad45b01 (patch) | |
tree | 402e2ca1951d556fb42c84d935e4492b9a99ad74 /test/exported | |
parent | 9c8f5151f48ecca4c75f2be9f5722f47ec0844a5 (diff) |
Forgot to commit a large part of the testing code.
Diffstat (limited to 'test/exported')
-rwxr-xr-x | test/exported | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/exported b/test/exported new file mode 100755 index 0000000..324f18f --- /dev/null +++ b/test/exported @@ -0,0 +1,25 @@ +#! /bin/sh + +ALLOWED_SYMBOLS="\(g_module_check_init\|theme_create_rc_style\|theme_exit\|theme_init\)" + +# exit with status 77 if nm does not exist +which nm >/dev/null || exit 77 + +ENGINE="`basename $0 | cut -d '_' -f 2`" +ENGINE_FILE="engines/lib$ENGINE.so" + +nm -gD --defined-only $ENGINE_FILE | cut -d ' ' -f 2,3 | cut -d ' ' -f 2 | grep -v '^_' | grep -v "$ALLOWED_SYMBOLS" >symbols/$ENGINE + +if [ -s symbols/$ENGINE ]; then + exit 1; +else + if [ -f symbols/$ENGINE ]; then + # No point in keeping an empty file around + rm symbols/$ENGINE + else + # Something wen't wrong, there is no file?!? + # This should never happen ... + exit 1 + fi +fi + |