Commit 8bc4e64e authored by Alessandro Rubini's avatar Alessandro Rubini

tools/build-random: the scripts I used for randconfig

It's not very cleaned-up, but may be useful for other developers.

    * tools/build-random/manybuilds

It builds with randomconfig. It remove ppsi configuration so
the wrpc-sw makefile uses a proper one, even if PPSI_FORCE_CONFIG
is false.

It leave around some files: configs and build logs for warning/error
builds, and only the config for good ones. You'll find them
by "git status".

It also avoids re-building and already known good configuration.

    * tools/build-random/unique-error

This filters error builds to only report one per type.

    * tools/build-random/unique-warning

Same for warning-only failures
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent e2786a8b
#!/bin/bash
mkdir -p ok-configs
declare -A ok
touch ok-configs/empty
for n in ok-configs/*; do
S=$(md5sum $n | awk '{print $1}')
ok[$S]=y
done
rm ok-configs/empty
while true; do
D=$(mktemp build.XXXXXX); rm $D; mkdir $D
make randconfig 2>&1 | grep KCONFIG_SEED | tee /dev/tty > $D/seed
S=$(md5sum .config | awk '{print $1}')
if [ "${ok[$S]}" = y ]; then
echo "duplicate; skipping"
rm -rf $D
continue
fi
cp .config $D/config
make -s clean> $D/clean 2>&1
rm ppsi/.config
make -j8 > $D/build 2>&1
if [ $? -eq 0 ]; then
if grep -q warning: $D/build; then
echo "Warning"
make -s savedefconfig
mv defconfig $D
mv $D warn-$D
else
echo "Ok"
cp $D/config ok-configs/$D
S=$(md5sum ok-configs/$D | awk '{print $1}')
ok[$S]=y
rm -rf $D
fi
else
echo "Failed"
make -s savedefconfig
mv defconfig $D
mv $D ko-$D
echo ko-$D
fi
sleep .5
echo ""
done
#!/bin/bash
declare -A err
HOW="grep -wi error $file"
for n in ko-build*; do
test -d $n || continue
file=$n/build
S=$($HOW | sort | md5sum | awk '{print $1}')
err[$S]=$n
done
for n in ${err[*]}; do
echo "############################ $n"
file=$n/build
$HOW
done
#!/bin/bash
declare -A warn
HOW="grep -wi warning $file"
for n in warn-build*; do
test -d $n || continue
file=$n/build
S=$($HOW | sort | md5sum | awk '{print $1}')
warn[$S]=$n
done
for n in ${warn[*]}; do
echo "############################ $n"
file=$n/build
$HOW
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment