diff options
author | Ron Yorston <rmy@pobox.com> | 2012-04-23 10:57:02 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2012-04-23 10:57:02 +0100 |
commit | 2903c15333636ae51db14cab009533bac68c8a30 (patch) | |
tree | 11a49598f98c505c021202564348c5639e2fb0b1 /scripts | |
parent | 5fc2c035953f71992197f6025918a8fe79ade1d3 (diff) | |
parent | f5234398ef3010b68468cafe3e2ea89b2bb08a17 (diff) | |
download | busybox-w32-2903c15333636ae51db14cab009533bac68c8a30.tar.gz busybox-w32-2903c15333636ae51db14cab009533bac68c8a30.tar.bz2 busybox-w32-2903c15333636ae51db14cab009533bac68c8a30.zip |
Merge commit '1_20_0' into merge
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/bloat-o-meter | 23 | ||||
-rwxr-xr-x | scripts/randomtest.loop | 12 |
2 files changed, 16 insertions, 19 deletions
diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter index 0d3ff7f5e..6db2a5e58 100755 --- a/scripts/bloat-o-meter +++ b/scripts/bloat-o-meter | |||
@@ -39,25 +39,16 @@ if f1 is None or f2 is None: | |||
39 | sym_args = " ".join(sys.argv[3 + flag_timing + dashes:]) | 39 | sym_args = " ".join(sys.argv[3 + flag_timing + dashes:]) |
40 | def getsizes(file): | 40 | def getsizes(file): |
41 | sym, alias, lut = {}, {}, {} | 41 | sym, alias, lut = {}, {}, {} |
42 | #dynsym_filter = re.compile("^\d+:\s+[\dA-Fa-f]+\s+\d+\s+\w+\s+\w+\s+\w+\s+\w+\s+\w+$") | ||
43 | for l in os.popen("readelf -W -s %s %s" % (sym_args, file)).readlines(): | 42 | for l in os.popen("readelf -W -s %s %s" % (sym_args, file)).readlines(): |
44 | if True: | 43 | l = l.strip() |
45 | l = l.strip() | 44 | if not (len(l) and l[0].isdigit() and len(l.split()) == 8): |
46 | if not (len(l) and l[0].isdigit() and len(l.split()) == 8): | 45 | continue |
47 | continue | 46 | num, value, size, typ, bind, vis, ndx, name = l.split() |
48 | num, value, size, typ, bind, vis, ndx, name = l.split() | 47 | if ndx == "UND": continue # skip undefined |
49 | if ndx == "UND": continue # skip undefined | 48 | if typ in ["SECTION", "FILES"]: continue # skip sections and files |
50 | if typ in ["SECTION", "FILES"]: continue # skip sections and files | ||
51 | #else: | ||
52 | # l = l.strip() | ||
53 | # match = dynsym_filter.match(l) | ||
54 | # if not match: continue | ||
55 | # x, value, size, typ, bind, x, ndx, name = l.split() | ||
56 | # if ndx == "UND": continue # skip undefined | ||
57 | # if typ in ["SECTION", "FILES"]: continue # skip sections and files | ||
58 | if "." in name: name = "static." + name.split(".")[0] | 49 | if "." in name: name = "static." + name.split(".")[0] |
59 | value = int(value, 16) | 50 | value = int(value, 16) |
60 | size = int(size) | 51 | size = int(size, 16) if size.startswith('0x') else int(size) |
61 | if vis != "DEFAULT" and bind != "GLOBAL": # see if it is an alias | 52 | if vis != "DEFAULT" and bind != "GLOBAL": # see if it is an alias |
62 | alias[(value, size)] = {"name" : name} | 53 | alias[(value, size)] = {"name" : name} |
63 | else: | 54 | else: |
diff --git a/scripts/randomtest.loop b/scripts/randomtest.loop index 2c8a9bd35..758a8e862 100755 --- a/scripts/randomtest.loop +++ b/scripts/randomtest.loop | |||
@@ -1,5 +1,7 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | run_testsuite=true | ||
4 | |||
3 | test -d "$1" || { echo "'$1' is not a directory"; exit 1; } | 5 | test -d "$1" || { echo "'$1' is not a directory"; exit 1; } |
4 | test -x "$1/scripts/randomtest" || { echo "No scripts/randomtest in '$1'"; exit 1; } | 6 | test -x "$1/scripts/randomtest" || { echo "No scripts/randomtest in '$1'"; exit 1; } |
5 | 7 | ||
@@ -21,7 +23,9 @@ while sleep 1; do | |||
21 | echo "Failed build in: failed.$dir" | 23 | echo "Failed build in: failed.$dir" |
22 | exit 1 # you may comment this out... | 24 | exit 1 # you may comment this out... |
23 | let fail++ | 25 | let fail++ |
24 | else | 26 | continue |
27 | fi | ||
28 | if $run_testsuite; then | ||
25 | ( | 29 | ( |
26 | cd -- "$dir/testsuite" || exit 1 | 30 | cd -- "$dir/testsuite" || exit 1 |
27 | echo "Running testsuite in $dir..." | 31 | echo "Running testsuite in $dir..." |
@@ -29,10 +33,12 @@ while sleep 1; do | |||
29 | ) | 33 | ) |
30 | if test $? != 0; then | 34 | if test $? != 0; then |
31 | echo "Failed runtest in $dir" | 35 | echo "Failed runtest in $dir" |
32 | exit 1 | 36 | exit 1 # you may comment this out... |
37 | let fail++ | ||
38 | continue | ||
33 | fi | 39 | fi |
34 | tail -n10 -- "$dir/testsuite/runtest.log" | 40 | tail -n10 -- "$dir/testsuite/runtest.log" |
35 | rm -rf -- "$dir" | ||
36 | fi | 41 | fi |
42 | rm -rf -- "$dir" | ||
37 | let cnt++ | 43 | let cnt++ |
38 | done | 44 | done |