mirror of
https://github.com/dynup/kpatch
synced 2024-12-18 11:24:33 +00:00
4c1184dcf7
I placed the library in the top-level test directory, as the same assertions could also be used by the integration tests once we rework them a bit. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
13 lines
221 B
Bash
13 lines
221 B
Bash
FILE=$1
|
|
|
|
assert_num_funcs() {
|
|
local num_funcs=$(nm $FILE | grep -i " t " | wc -l)
|
|
|
|
if [[ $num_funcs != $1 ]]; then
|
|
echo "$FILE: assertion failed: file has $num_funcs funcs, expected $1" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
return 0
|
|
}
|