mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-22 18:01:49 +00:00
ci: fix merge veristat cache generation
Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
This commit is contained in:
parent
d7cc4f30f0
commit
40bb003555
5
.github/workflows/merge.yml
vendored
5
.github/workflows/merge.yml
vendored
@ -66,7 +66,7 @@ jobs:
|
||||
### END DEPENDENCIES ###
|
||||
|
||||
# The actual build:
|
||||
- run: meson setup build -Dkernel=$(pwd)/linux -Dkernel_headers=./linux/usr/include
|
||||
- run: meson setup build -Dkernel=$(pwd)/linux -Dkernel_headers=./linux/usr/include -Dveristat_diff_dir=~/veristat
|
||||
- run: meson compile -C build --jobs=1
|
||||
|
||||
# Print CPU model before running the tests (this can be useful for
|
||||
@ -83,8 +83,7 @@ jobs:
|
||||
- run: meson compile -C build veristat_diff
|
||||
|
||||
# update veristat cache dirs
|
||||
- run: rm -rf ~/veristat/*.csv || echo 'nothing to clean'
|
||||
- run: cp *.csv ~/veristat/
|
||||
- run: cd ~/veristat && for file in *_new.csv; do mv "$file" "${file%_new.csv}.csv"; done
|
||||
|
||||
- name: Save veristat cache
|
||||
id: cache-veristat-save
|
||||
|
@ -21,13 +21,15 @@ if [ -n "${SCHED}" ]; then
|
||||
echo "Running veristat on ${BPF_PATH}"
|
||||
if [ -n "${KERNEL}" ]; then
|
||||
timeout --preserve-status ${GUEST_TIMEOUT} \
|
||||
vng --force-9p -v --user root -r ${KERNEL} -- \
|
||||
veristat ${BPF_PATH} -o csv > "${SCHED}.csv"
|
||||
vng --force-9p -v --rwdir "${DIFF_DIR}" --user root -r ${KERNEL} -- \
|
||||
veristat ${BPF_PATH} -o csv > "${DIFF_DIR}/${SCHED}_new.csv" \
|
||||
|| echo "failed to verify ${SCHED}: ${BPF_PATH}"
|
||||
if [ -n "${DIFF_DIR}" ]; then
|
||||
timeout --preserve-status ${GUEST_TIMEOUT} \
|
||||
vng --force-9p -v --user root -r ${KERNEL} -- \
|
||||
veristat -C "${SCHED}.csv" "${DIFF_DIR}/${SCHED}.csv" \
|
||||
-e file,prog,verdict,insns
|
||||
vng --force-9p -v --rwdir "${DIFF_DIR}" --user root -r ${KERNEL} -- \
|
||||
veristat -C "${DIFF_DIR}/${SCHED}_new.csv" "${DIFF_DIR}/${SCHED}.csv" \
|
||||
-e file,prog,verdict,insns \
|
||||
|| echo "failed to compare ${SCHED}: ${BPF_PATH}"
|
||||
fi
|
||||
exit $?
|
||||
else
|
||||
@ -45,13 +47,15 @@ for BPF_PATH in $(find ${BUILD_DIR} -type f -name bpf.bpf.o); do
|
||||
SCHED=$(echo "${BPF_PATH}" | sed 's/.*\/rust\///g' | sed 's/\/.*//g')
|
||||
if [ -n "${KERNEL}" ]; then
|
||||
timeout --preserve-status ${GUEST_TIMEOUT} \
|
||||
vng --force-9p -v --user root -r ${KERNEL} -- \
|
||||
veristat ${BPF_PATH} -o csv > "${SCHED}.csv"
|
||||
vng --force-9p -v --rwdir "${DIFF_DIR}" --user root -r ${KERNEL} -- \
|
||||
veristat ${BPF_PATH} -o csv > "${DIFF_DIR}/${SCHED}_new.csv" \
|
||||
|| echo "failed to verify ${SCHED}: ${BPF_PATH}"
|
||||
if [ -n "${DIFF_DIR}" ]; then
|
||||
timeout --preserve-status ${GUEST_TIMEOUT} \
|
||||
vng --force-9p -v --user root -r ${KERNEL} -- \
|
||||
veristat -C "${SCHED}.csv" "${DIFF_DIR}/${SCHED}.csv" \
|
||||
-e file,prog,verdict,insns
|
||||
vng --force-9p -v --rwdir "${DIFF_DIR}" --user root -r ${KERNEL} -- \
|
||||
veristat -C "${SCHED}_new.csv" "${DIFF_DIR}/${SCHED}.csv" \
|
||||
-e file,prog,verdict,insns \
|
||||
|| echo "failed to compare ${SCHED}: ${BPF_PATH}"
|
||||
fi
|
||||
else
|
||||
echo "saving veristat diff for ${SCHED}.csv"
|
||||
|
Loading…
Reference in New Issue
Block a user