mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-26 03:20:24 +00:00
120211d731
split build and test jobs to reduce ci turnaround time and make it clear what is failing when something fails. also add virtiofsd to deps to make test compilation faster (most test time is compliation) and remove all force 9ps.
42 lines
941 B
Bash
Executable File
42 lines
941 B
Bash
Executable File
#!/usr/bin/env bash
|
|
GUEST_TIMEOUT=25
|
|
BUILD_DIR=$1
|
|
SCHED=$2
|
|
KERNEL=$3
|
|
|
|
if [ "${KERNEL}" == "vmlinuz" ]; then
|
|
unset KERNEL
|
|
fi
|
|
|
|
cd $build_dir
|
|
|
|
if [ -n "${KERNEL}" ] && [ ! -x `which vng` ]; then
|
|
echo "vng not found, please install virtme-ng to enable testing"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -n "${SCHED}" ]; then
|
|
BPF_PATH=$(find ${BUILD_DIR} -type f -name bpf.bpf.o | grep ${SCHED})
|
|
echo "Running veristat on ${BPF_PATH}"
|
|
if [ -n "${KERNEL}" ]; then
|
|
timeout --preserve-status ${GUEST_TIMEOUT} \
|
|
vng -m 2G -v --user root -r ${KERNEL} -- \
|
|
sudo veristat ${BPF_PATH}
|
|
exit $?
|
|
else
|
|
sudo veristat ${BPF_PATH}
|
|
exit $?
|
|
fi
|
|
fi
|
|
|
|
for BPF_PATH in $(find ${BUILD_DIR} -type f -name bpf.bpf.o); do
|
|
if [ -n "${KERNEL}" ]; then
|
|
timeout --preserve-status ${GUEST_TIMEOUT} \
|
|
vng -m 2G -v --user root -r ${KERNEL} -- \
|
|
sudo veristat ${BPF_PATH}
|
|
else
|
|
echo "$BPF_PATH"
|
|
sudo veristat ${BPF_PATH}
|
|
fi
|
|
done
|