File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -427,6 +427,14 @@ jobs:
427427 TEST_RUNTIME : ${{ matrix.runtime }}
428428 run : |
429429 BDIR="$(mktemp -d -p $PWD)"
430+
431+ function cleanup() {
432+ sudo pkill containerd || true
433+ cat ${BDIR}/containerd-cri.log
434+ sudo -E rm -rf ${BDIR}
435+ }
436+ trap cleanup EXIT
437+
430438 mkdir -p ${BDIR}/{root,state}
431439 cat > ${BDIR}/config.toml <<EOF
432440 version = 2
@@ -437,11 +445,6 @@ jobs:
437445 sudo -E PATH=$PATH /usr/local/bin/containerd -a ${BDIR}/c.sock --config ${BDIR}/config.toml --root ${BDIR}/root --state ${BDIR}/state --log-level debug &> ${BDIR}/containerd-cri.log &
438446 sudo -E PATH=$PATH /usr/local/bin/ctr -a ${BDIR}/c.sock version
439447 sudo -E PATH=$PATH critest --report-dir "${{github.workspace}}/critestreport" --runtime-endpoint=unix:///${BDIR}/c.sock --parallel=8
440- TEST_RC=$?
441- test $TEST_RC -ne 0 && cat ${BDIR}/containerd-cri.log
442- sudo pkill containerd
443- sudo -E rm -rf ${BDIR}
444- test $TEST_RC -eq 0 || /bin/false
445448
446449 # Log the status of this VM to investigate issues like
447450 # https://github.com/containerd/containerd/issues/4969
You can’t perform that action at this time.
0 commit comments