# Pastebin sbkkCll2 #!/bin/bash CLEAN=1 O=`mktemp -d -p /build/trini` LLVMO=`mktemp -d -p /build/trini` BRANCH=no-test-branch-set UPSTREAM=master while test $# -ne 0; do if [ "$1" == "--no-clean" ]; then CLEAN=0 shift 1 elif [ "$1" == "--branch" ]; then BRANCH=$2 shift 2 elif [ "$1" == "--upstream" ]; then UPSTREAM=$2 shift 2 else L=$1 shift 1 fi done mkdir -p `dirname $L` # Cleanup when done. trap "{ [ $CLEAN -eq 1 ] && rm -rf ${O} ${LLVMO}; }" EXIT # Find the version of LLVM we have to test with LLVMV=`grep -m 1 clang- .gitlab-ci.yml | cut -d - -f 3` LLVMV=${LLVMV//\"/} (echo Starting LLVM-${LLVMV} test make O=${LLVMO} HOSTCC=clang-${LLVMV} CC=clang-${LLVMV} -j$(nproc) -s sandbox_config all echo Done with LLVM-${LLVMV} test) 2>&1 | tee $L # Check merges /home/trini/bin/check-merge-sobs.sh ${BRANCH} | tee -a $L # Get maintainers/etc info #./tools/buildman/buildman -R 2>&1 | tee -a $L # Run checkpatch.pl ./scripts/checkpatch.pl --max-line-length=160 -q --git origin/${UPSTREAM}.. | tee -a $L mkdir -p ${O} ARGS="-BvelPEWM --reproducible-builds --step 0" ARGS="$ARGS -b ${BRANCH}" # If we aren't cleaning we want some outputs to compare [ $CLEAN -eq 0 ] && ARGS="$ARGS -k" if [ -f tools/buildman/requirements.txt ]; then if [ ! -d /tmp/venv ]; then virtualenv -p /usr/bin/python3 /tmp/venv . /tmp/venv/bin/activate pip install --quiet -r tools/buildman/requirements.txt else . /tmp/venv/bin/activate fi fi ./tools/buildman/buildman -o ${O} --dry-run $ARGS >> $L ./tools/buildman/buildman -o ${O} --force-build $ARGS -CE ./tools/buildman/buildman -o ${O} $ARGS -Ssd >> $L