xref: /third_party/libinput/test/symbols-leak-test
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/libinput/test/
1a46c0ec8Sopenharmony_ci#!/bin/bash
2a46c0ec8Sopenharmony_ci#
3a46c0ec8Sopenharmony_ci# simple check for exported symbols
4a46c0ec8Sopenharmony_ci#
5a46c0ec8Sopenharmony_ci# Usage: symbols-leak-test /path/to/mapfile /path/to/libinput/src
6a46c0ec8Sopenharmony_ci
7a46c0ec8Sopenharmony_cimapfile="$1"
8a46c0ec8Sopenharmony_cishift
9a46c0ec8Sopenharmony_cisrcdir="$1"
10a46c0ec8Sopenharmony_cishift
11a46c0ec8Sopenharmony_ci
12a46c0ec8Sopenharmony_ciif [[ -z "$mapfile" || -z "$srcdir" ]]; then
13a46c0ec8Sopenharmony_ci	echo "Usage: symbols-leak-test /path/to/mapfile /path/to/libinput/src"
14a46c0ec8Sopenharmony_ci	exit 2
15a46c0ec8Sopenharmony_cifi
16a46c0ec8Sopenharmony_ci
17a46c0ec8Sopenharmony_ciset -e
18a46c0ec8Sopenharmony_cidiff -a -u \
19a46c0ec8Sopenharmony_ci	<(cat "$mapfile" | \
20a46c0ec8Sopenharmony_ci		grep '^\s\+libinput_.*' | \
21a46c0ec8Sopenharmony_ci		sed -e 's/^\s\+\(.*\);/\1/' |  sort) \
22a46c0ec8Sopenharmony_ci	<(cat "$srcdir"/*.c | \
23a46c0ec8Sopenharmony_ci		grep LIBINPUT_EXPORT -A 1 | grep '^libinput_.*' | \
24a46c0ec8Sopenharmony_ci		sed -e 's/(.*//' | sort)
25

Indexes created Thu Nov 07 10:32:03 CST 2024