blob: 3da4455f5e2e98682852dd6ea56dd8e9c92ceb29 [file] [log] [blame]
Nico Huberc0b52db2022-12-15 12:42:32 +00001#!/bin/sh
2
3cd
4
5[ "${IDENT}" ] || IDENT=$(mktemp -u XXXXXXXX)
6
7CCACHE=.ccache/anita-${IDENT}.img
8
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