Contents of /trunk/mkinitrd-magellan/busybox/scripts/randomtest
Parent Directory | Revision Log
Revision 984 -
(show annotations)
(download)
Sun May 30 11:32:42 2010 UTC (14 years, 4 months ago) by niro
File size: 1982 byte(s)
Sun May 30 11:32:42 2010 UTC (14 years, 4 months ago) by niro
File size: 1982 byte(s)
-updated to busybox-1.16.1 and enabled blkid/uuid support in default config
1 | #!/bin/sh |
2 | |
3 | # Select which libc to build against |
4 | libc="glibc" # assumed native |
5 | # static, cross-compilation |
6 | libc="uclibc" |
7 | # x86 32-bit: |
8 | uclibc_cross="i486-linux-uclibc-" |
9 | # My system has strange prefix for x86 64-bit uclibc: |
10 | #uclibc_cross="x86_64-pc-linux-gnu-" |
11 | |
12 | test -d tree || exit 1 |
13 | |
14 | dir=test.$$ |
15 | while test -e "$dir" -o -e failed."$dir"; do |
16 | dir=test."$RANDOM" |
17 | done |
18 | |
19 | cp -dpr tree "$dir" || exit 1 |
20 | cd "$dir" || exit 1 |
21 | |
22 | echo "Running randconfig test in $dir..." >&2 |
23 | |
24 | make randconfig >/dev/null || exit 1 |
25 | |
26 | cat .config \ |
27 | | grep -v ^CONFIG_DEBUG_PESSIMIZE= \ |
28 | | grep -v CONFIG_WERROR \ |
29 | | cat >.config.new |
30 | mv .config.new .config |
31 | #echo CONFIG_WERROR=y >>.config |
32 | echo '# CONFIG_WERROR is not set' >>.config |
33 | |
34 | test "$libc" = glibc && { |
35 | cat .config \ |
36 | | grep -v CONFIG_STATIC \ |
37 | | grep -v CONFIG_SELINUX \ |
38 | | grep -v CONFIG_EFENCE \ |
39 | | grep -v CONFIG_DMALLOC \ |
40 | | cat >.config.new |
41 | mv .config.new .config |
42 | echo '# CONFIG_STATIC is not set' >>.config |
43 | } |
44 | |
45 | test "$libc" = uclibc && { |
46 | cat .config \ |
47 | | grep -v ^CONFIG_SELINUX= \ |
48 | | grep -v ^CONFIG_EFENCE= \ |
49 | | grep -v ^CONFIG_DMALLOC= \ |
50 | | grep -v ^CONFIG_BUILD_LIBBUSYBOX= \ |
51 | | grep -v ^CONFIG_PAM= \ |
52 | | grep -v ^CONFIG_TASKSET= \ |
53 | | grep -v ^CONFIG_FEATURE_ASSUME_UNICODE= \ |
54 | | grep -v ^CONFIG_PIE= \ |
55 | | grep -v CONFIG_STATIC \ |
56 | | grep -v CONFIG_CROSS_COMPILER_PREFIX \ |
57 | | cat >.config.new |
58 | mv .config.new .config |
59 | echo 'CONFIG_CROSS_COMPILER_PREFIX="'"$uclibc_cross"'"' >>.config |
60 | echo 'CONFIG_STATIC=y' >>.config |
61 | } |
62 | |
63 | # If STATIC, remove some things |
64 | # PAM with static linking is probably pointless |
65 | # (but I need to try - now I don't have libpam.a on my system, only libpam.so) |
66 | grep -q ^CONFIG_STATIC= .config && { |
67 | cat .config \ |
68 | | grep -v ^CONFIG_PAM= \ |
69 | | cat >.config.new |
70 | mv .config.new .config |
71 | } |
72 | |
73 | # Regenerate .config with default answers for yanked-off options |
74 | { yes "" | make oldconfig >/dev/null; } || exit 1 |
75 | |
76 | nice -n 10 make $MAKEOPTS 2>&1 | tee -a make.log |
77 | |
78 | test -x busybox && { |
79 | cd .. |
80 | rm -rf "$dir" |
81 | exit 0 |
82 | } |
83 | |
84 | cd .. |
85 | mv "$dir" "failed.$dir" |
86 | exit 1 |