Symbol tests for macos + whitelist imports/exports
All checks were successful
Tests / Clang total: 1096, passed: 1096
Clang |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / SIMD fallback total: 1096, passed: 1096
Tests / Release [gcc] total: 1096, passed: 1096
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 824, passed: 824
Tests / Coverage total: 823, passed: 823
weaselab/conflict-set/pipeline/head This commit looks good
All checks were successful
Tests / Clang total: 1096, passed: 1096
Clang |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / SIMD fallback total: 1096, passed: 1096
Tests / Release [gcc] total: 1096, passed: 1096
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 824, passed: 824
Tests / Coverage total: 823, passed: 823
weaselab/conflict-set/pipeline/head This commit looks good
commit1ad8276100
Author: Andrew Noyes <andrew@weaselab.dev> Date: Wed Apr 3 12:44:35 2024 -0700 Add symbols for arm build commit058e4d5302
Author: Andrew Noyes <andrew@weaselab.dev> Date: Wed Apr 3 12:42:48 2024 -0700 Add _GLOBAL_OFFSET_TABLE_ commita201f3ada8
Author: Andrew Noyes <andrew@weaselab.dev> Date: Wed Apr 3 12:34:05 2024 -0700 Add memset to symbol imports commitc1129ed0e2
Author: Andrew Noyes <andrew@weaselab.dev> Date: Wed Apr 3 12:32:28 2024 -0700 Add symbol imports file commit618766ce2e
Author: Andrew Noyes <andrew@weaselab.dev> Date: Wed Apr 3 12:27:07 2024 -0700 Fix objcopy filepath commite774a90007
Author: Andrew Noyes <andrew@weaselab.dev> Date: Wed Apr 3 12:24:44 2024 -0700 Use shellcheck precommit without docker commitbaddea7f57
Author: Andrew Noyes <andrew@weaselab.dev> Date: Wed Apr 3 12:20:26 2024 -0700 Update and freeze pre-commit hooks commit2d3e7b9004
Author: Andrew Noyes <andrew@weaselab.dev> Date: Wed Apr 3 12:19:55 2024 -0700 Add shellcheck to pre-commit Closes #22 commitc4862fee9b
Author: Andrew Noyes <andrew@weaselab.dev> Date: Wed Apr 3 12:15:08 2024 -0700 Add symbol tests for apple closes #21
This commit is contained in:
@@ -2,5 +2,15 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# ./test_symbols.sh <library> <expected exported symbols file> <allowed imported symbols file>
|
||||
|
||||
diff -u <(sort < "$2") <(nm "$1" | grep " T " | cut -f3 -d " " | sort)
|
||||
nm "$1" | grep " U " | (! grep -Pv 'abort|free|malloc|mem[a-z]*|__ashlti3|__stack_chk_[a-z]*|__tls_get_addr|_GLOBAL_OFFSET_TABLE_')
|
||||
ec=0
|
||||
for symbol in $(nm "$1" | grep " U " | sed 's/ U //') ; do
|
||||
if ! grep --fixed-strings "$symbol" "$3" > /dev/null ; then
|
||||
echo "Imported symbol $symbol not present in $3"
|
||||
ec=1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $ec
|
Reference in New Issue
Block a user