blob: c40429718edf5e359f41081e8b5db9cb92e01032 [file] [log] [blame]
Nico Huberc0b52db2022-12-15 12:42:32 +00001#!/bin/sh
2
3cd
4
5[ "${IDENT}" ] || IDENT=$(mktemp -u XXXXXXXX)
6
Nico Huberfb433ba2023-03-04 19:09:47 +00007CCACHE=/ccache/${IDENT}.img
Nico Huberc0b52db2022-12-15 12:42:32 +00008
9[ -f ${CCACHE} ] || zcat cache.img.gz >${CCACHE}
10
Nico Huberea88f212022-12-11 17:19:36 +000011AV_ARGS="${ANITA_VMM_ARGS} -drive file=${CCACHE},index=1,media=disk,format=raw"
Nico Huber48b1fde2022-12-11 17:15:27 +000012
Nico Huberc0b52db2022-12-15 12:42:32 +000013if [ $# -eq 0 ]; then
Nico Huber48b1fde2022-12-11 17:15:27 +000014 exec anita --vmm-args "${AV_ARGS}" --memory-size=${MEM_SIZE} \
Nico Huberc0b52db2022-12-15 12:42:32 +000015 interact ${INST_IMG}
16else
Nico Huber48b1fde2022-12-11 17:15:27 +000017 exec anita --vmm-args "${AV_ARGS}" --memory-size=${MEM_SIZE} \
Nico Huberc0b52db2022-12-15 12:42:32 +000018 --persist --run ". ./init && manitest \"$*\"" \
19 boot ${INST_IMG}
20fi