update ci to exit at the end instead of partway through | fix flattened toolchain repos

This commit is contained in:
abejgonzalez
2019-10-14 13:27:58 -07:00
parent 84611fed8a
commit 7e908b4964

View File

@@ -21,29 +21,66 @@ git config submodule.vlsi/hammer-synopsys-plugins.update none
git submodule update --init
status=$(git submodule status)
all_names=()
search () {
for submodule in "${submodules[@]}"
do
echo "Running check on submodule $submodule in $dir"
hash=$(echo "$status" | grep $submodule | awk '{print$1}' | grep -o "[[:alnum:]]*")
echo "Searching for $hash in origin/master of $submodule"
git -C $dir/$submodule branch -r --contains "$hash" | grep "origin/master" # needs init'ed submodules
hash=$(echo "$status" | grep "$dir.*$submodule " | awk '{print$1}' | grep -o "[[:alnum:]]*")
echo "Searching for $hash in origin/$branch of $submodule"
(git -C $dir/$submodule branch -r --contains "$hash" | grep "origin/$branch") && true # needs init'ed submodules
all_names+=("$dir/$submodule $hash $?")
done
}
submodules=("boom" "hwacha" "icenet" "rocket-chip" "sifive-blocks" "sifive-cache" "testchipip")
dir="generators"
branch="master"
search
submodules=("esp-tools" "riscv-tools")
dir="toolchains"
submodules=("riscv-gnu-toolchain" "riscv-isa-sim" "riscv-pk" "riscv-tests")
dir="toolchains/esp-tools"
branch="master"
search
submodules=("riscv-gnu-toolchain" "riscv-isa-sim" "riscv-pk" "riscv-tests" "riscv-gnu-toolchain-prebuilt")
dir="toolchains/riscv-tools"
branch="master"
search
# riscv-openocd doesn't use its master branch
submodules=("riscv-openocd")
dir="toolchains/riscv-tools"
branch="riscv"
search
submodules=("barstools" "chisel3" "firrtl" "torture")
dir="tools"
branch="master"
search
# turn off verbose printing to make this easier to read
set +x
# print all result strings
for str in "${all_names[@]}";
do
echo "$str"
done
# check if there was a non-zero return code
for str in "${all_names[@]}";
do
if [ ! 0 = $(echo "$str" | awk '{print$3}') ]; then
exit 1
fi
done
echo "Done checking all submodules"