mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
8374be46d2
Cogl unit tests are just functions inside normal code files that needs to be dload'ed by the test binary. So in case unit-tests are enabled, we need to export those symbols. Since map file can't be overridden, use a configure_file to generate the map file when tests are enabled, in order to export the needed symbols. Then goes through the source files to look unit tests checking for their macro definition and load them with the runner script. https://gitlab.gnome.org/GNOME/mutter/merge_requests/442
10 lines
195 B
Bash
Executable File
10 lines
195 B
Bash
Executable File
#!/bin/sh
|
|
|
|
inputdir="$1"
|
|
outputfile="$2"
|
|
|
|
echo > "$outputfile"
|
|
|
|
grep -h -r --include \*.c UNIT_TEST "$inputdir" | \
|
|
sed -n -e 's/^UNIT_TEST *( *\([a-zA-Z0-9_]\{1,\}\).*/\1/p' > "$outputfile"
|