mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-05-20 18:18:23 +02:00
The run_test shell function was running pkg-config with arguments stored in an environment variable. This has problems when trying to pass shell special characters with the proper escaping. Instead, pass the arguments to the test where they can maintain correct formatting through use of the special variable "$@".
25 lines
928 B
Bash
Executable file
25 lines
928 B
Bash
Executable file
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
. ${srcdir}/common
|
|
|
|
# expect cflags from requires-test and public-dep
|
|
RESULT="-I/requires-test/include -I/private-dep/include -I/public-dep/include"
|
|
run_test --cflags requires-test
|
|
|
|
# still expect those cflags for static linking case
|
|
RESULT="-I/requires-test/include -I/private-dep/include -I/public-dep/include"
|
|
run_test --static --cflags requires-test
|
|
|
|
# expect libs for just requires-test and public-dep
|
|
if [ "$list_indirect_deps" = "yes" ]; then
|
|
RESULT="-L/requires-test/lib -L/private-dep/lib -L/public-dep/lib -lrequires-test -lprivate-dep -lpublic-dep"
|
|
else
|
|
RESULT="-L/requires-test/lib -L/public-dep/lib -lrequires-test -lpublic-dep"
|
|
fi
|
|
run_test --libs requires-test
|
|
|
|
# expect libs for requires-test, public-dep and private-dep in static case
|
|
RESULT="-L/requires-test/lib -L/private-dep/lib -L/public-dep/lib -lrequires-test -lprivate-dep -lpublic-dep"
|
|
run_test --static --libs requires-test
|