aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-07-18 15:58:52 +0100
committerRon Yorston <rmy@pobox.com>2017-07-18 15:58:52 +0100
commitb680f05ad449505e3d914bebd4c8d83bf768c094 (patch)
treec08ded13d430b0e7e0104f2eb594fad190ce98a3 /scripts
parent258200ff81d5a9da54dab35acf36213eff1e399b (diff)
parent513a2457b65894b10b9fd6aa8753fca59eced08c (diff)
downloadbusybox-w32-b680f05ad449505e3d914bebd4c8d83bf768c094.tar.gz
busybox-w32-b680f05ad449505e3d914bebd4c8d83bf768c094.tar.bz2
busybox-w32-b680f05ad449505e3d914bebd4c8d83bf768c094.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/randomtest6
-rwxr-xr-xscripts/randomtest.loop26
-rwxr-xr-xscripts/trylink18
3 files changed, 44 insertions, 6 deletions
diff --git a/scripts/randomtest b/scripts/randomtest
index 287f1c771..1809838a4 100755
--- a/scripts/randomtest
+++ b/scripts/randomtest
@@ -82,6 +82,9 @@ if test x"$LIBC" = x"uclibc"; then
82 | grep -v CONFIG_BLKDISCARD \ 82 | grep -v CONFIG_BLKDISCARD \
83 | grep -v CONFIG_NSENTER \ 83 | grep -v CONFIG_NSENTER \
84 | grep -v CONFIG_UNSHARE \ 84 | grep -v CONFIG_UNSHARE \
85 | grep -v CONFIG_FALLOCATE \
86 | grep -v CONFIG_UDHCPC6 \
87 | grep -v CONFIG_ASH_INTERNAL_GLOB \
85 >.config.new 88 >.config.new
86 mv .config.new .config 89 mv .config.new .config
87 echo 'CONFIG_STATIC=y' >>.config 90 echo 'CONFIG_STATIC=y' >>.config
@@ -96,6 +99,9 @@ if test x"$LIBC" = x"uclibc"; then
96 echo '# CONFIG_BLKDISCARD is not set' >>.config 99 echo '# CONFIG_BLKDISCARD is not set' >>.config
97 echo '# CONFIG_NSENTER is not set' >>.config 100 echo '# CONFIG_NSENTER is not set' >>.config
98 echo '# CONFIG_UNSHARE is not set' >>.config 101 echo '# CONFIG_UNSHARE is not set' >>.config
102 echo '# CONFIG_FALLOCATE is not set' >>.config
103 echo '# CONFIG_UDHCPC6 is not set' >>.config
104 echo 'CONFIG_ASH_INTERNAL_GLOB=y' >>.config
99fi 105fi
100 106
101# If STATIC, remove some things. 107# If STATIC, remove some things.
diff --git a/scripts/randomtest.loop b/scripts/randomtest.loop
index 710f5fd05..4d14b652f 100755
--- a/scripts/randomtest.loop
+++ b/scripts/randomtest.loop
@@ -1,7 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2 2
3run_testsuite=false
3run_testsuite=true 4run_testsuite=true
4 5
6run_single_test=false
7run_single_test=true
8
5test -d "$1" || { echo "'$1' is not a directory"; exit 1; } 9test -d "$1" || { echo "'$1' is not a directory"; exit 1; }
6test -x "$1/scripts/randomtest" || { echo "No scripts/randomtest in '$1'"; exit 1; } 10test -x "$1/scripts/randomtest" || { echo "No scripts/randomtest in '$1'"; exit 1; }
7 11
@@ -40,6 +44,28 @@ while sleep 1; do
40 fi 44 fi
41 tail -n10 -- "$dir/testsuite/runtest.log" 45 tail -n10 -- "$dir/testsuite/runtest.log"
42 fi 46 fi
47 if $run_single_test; then
48 (
49 cd -- "$dir" || exit 1
50 echo "Running make_single_applets.sh in $dir..."
51
52 if grep -q '# CONFIG_FEATURE_TFTP_GET is not set' .config \
53 && grep -q '# CONFIG_FEATURE_TFTP_PUT is not set' .config \
54 ; then
55 # If both off, tftp[d] is ifdefed out and test fails.
56 # Enable one:
57 sed 's/# CONFIG_FEATURE_TFTP_GET is not set/CONFIG_FEATURE_TFTP_GET=y/' -i .config
58 fi
59
60 ./make_single_applets.sh
61 )
62 if test $? != 0; then
63 echo "Failed make_single_applets.sh in $dir"
64 exit 1 # you may comment this out...
65 let fail++
66 continue
67 fi
68 fi
43 rm -rf -- "$dir" 69 rm -rf -- "$dir"
44 let cnt++ 70 let cnt++
45done 71done
diff --git a/scripts/trylink b/scripts/trylink
index 9f288c141..ba2d265bc 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -91,7 +91,9 @@ fi
91 91
92START_GROUP="-Wl,--start-group" 92START_GROUP="-Wl,--start-group"
93END_GROUP="-Wl,--end-group" 93END_GROUP="-Wl,--end-group"
94INFO_OPTS="-Wl,--warn-common -Wl,-Map,$EXE.map -Wl,--verbose" 94INFO_OPTS() {
95 echo "-Wl,--warn-common -Wl,-Map,$EXE.map -Wl,--verbose"
96}
95 97
96# gold may not support --sort-common (yet) 98# gold may not support --sort-common (yet)
97SORT_COMMON="-Wl,--sort-common" 99SORT_COMMON="-Wl,--sort-common"
@@ -194,7 +196,7 @@ if ! test -f busybox_ldscript; then
194 $GC_SECTIONS \ 196 $GC_SECTIONS \
195 $START_GROUP $O_FILES $A_FILES $END_GROUP \ 197 $START_GROUP $O_FILES $A_FILES $END_GROUP \
196 $l_list \ 198 $l_list \
197 $INFO_OPTS \ 199 `INFO_OPTS` \
198 || { 200 || {
199 cat $EXE.out 201 cat $EXE.out
200 exit 1 202 exit 1
@@ -225,7 +227,7 @@ else
225 -Wl,-T,busybox_ldscript \ 227 -Wl,-T,busybox_ldscript \
226 $START_GROUP $O_FILES $A_FILES $END_GROUP \ 228 $START_GROUP $O_FILES $A_FILES $END_GROUP \
227 $l_list \ 229 $l_list \
228 $INFO_OPTS \ 230 `INFO_OPTS` \
229 || { 231 || {
230 cat $EXE.out 232 cat $EXE.out
231 exit 1 233 exit 1
@@ -244,10 +246,14 @@ if test "$CONFIG_BUILD_LIBBUSYBOX" = y; then
244 } 246 }
245 ln -s "libbusybox.so.$BB_VER" "$sharedlib_dir"/libbusybox.so 2>/dev/null 247 ln -s "libbusybox.so.$BB_VER" "$sharedlib_dir"/libbusybox.so 2>/dev/null
246 248
249 # Yes, "ld -shared -static" is a thing. It's a shared library which is itself static.
250 LBB_STATIC=""
251 test "$CONFIG_FEATURE_LIBBUSYBOX_STATIC" = y && LBB_STATIC="-Wl,-static"
252
247 EXE="$sharedlib_dir/libbusybox.so.${BB_VER}_unstripped" 253 EXE="$sharedlib_dir/libbusybox.so.${BB_VER}_unstripped"
248 try $CC $CFLAGS $LDFLAGS \ 254 try $CC $CFLAGS $LDFLAGS \
249 -o $EXE \ 255 -o $EXE \
250 -shared -fPIC \ 256 -shared -fPIC $LBB_STATIC \
251 -Wl,--enable-new-dtags \ 257 -Wl,--enable-new-dtags \
252 -Wl,-z,combreloc \ 258 -Wl,-z,combreloc \
253 -Wl,-soname="libbusybox.so.$BB_VER" \ 259 -Wl,-soname="libbusybox.so.$BB_VER" \
@@ -256,7 +262,7 @@ if test "$CONFIG_BUILD_LIBBUSYBOX" = y; then
256 $SORT_SECTION \ 262 $SORT_SECTION \
257 $START_GROUP $A_FILES $END_GROUP \ 263 $START_GROUP $A_FILES $END_GROUP \
258 $l_list \ 264 $l_list \
259 $INFO_OPTS \ 265 `INFO_OPTS` \
260 || { 266 || {
261 echo "Linking $EXE failed" 267 echo "Linking $EXE failed"
262 cat $EXE.out 268 cat $EXE.out
@@ -277,7 +283,7 @@ if test "$CONFIG_FEATURE_SHARED_BUSYBOX" = y; then
277 $START_GROUP $O_FILES $END_GROUP \ 283 $START_GROUP $O_FILES $END_GROUP \
278 -L"$sharedlib_dir" -lbusybox \ 284 -L"$sharedlib_dir" -lbusybox \
279 $l_list \ 285 $l_list \
280 $INFO_OPTS \ 286 `INFO_OPTS` \
281 || { 287 || {
282 echo "Linking $EXE failed" 288 echo "Linking $EXE failed"
283 cat $EXE.out 289 cat $EXE.out