]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - tests/ts/build-sys/config
bc48c509d07995eaaf4903700d54b9deee549461
3 # Copyright (C) 2011 Karel Zak <kzak@redhat.com>
5 TS_TOPDIR
="${0%/*}/../.."
8 # Don't execute this test by default, --force required
11 .
$TS_TOPDIR/functions.sh
14 ts_check_prog
"readelf"
17 config_gen_dir
="$top_srcdir/tools"
18 .
$config_gen_dir/config-gen-functions.sh
20 [ -n "$CFLAGS" ] && export CFLAGS
="$CFLAGS"
22 ts_cd
$top_builddir && make -j clean
&> /dev
/null
24 for conf
in $config_gen_dir/config-gen.d
/*.conf
; do
25 ts_init_subtest $
(basename $conf |
sed 's/\.conf//')
27 opts
=$
(ul_get_configuration
$conf)
32 .
/configure
$opts &> /dev
/null
35 bins
=$
(find .
-type f \
( -perm -u=x
-o -perm -g=x
-o -perm -o=x \
) |
sort)
37 libs
=$
(readelf
--dynamic $b 2> /dev
/null | \
38 awk '/NEEDED/ { print $5 }' | \
39 sed 's:\[::g; s:\..*::g; s:libc::g; s:ld\-.*::g' | \
40 sort -u |
tr '\n' ' ')
42 if [ -n "$libs" ]; then
43 echo "$(basename $b): $libs" >> $TS_OUTPUT
48 echo "$(basename $b): STATIC" >> $TS_OUTPUT
50 *) # ignore scripts, ...etc.
56 # clean the tree, but exclude tests/{diff,output} dirs
58 [ -d tests
/diff ] && mv tests
/diff tests
/diff.save
59 [ -d tests
/output
] && mv tests
/output
tests
/output.save
61 make -j clean
&> /dev
/null
63 [ -d tests
/diff.save
] && mv tests
/diff.save
tests
/diff
64 [ -d tests
/output.save
] && mv tests
/output.save
tests
/output