summaryrefslogtreecommitdiff
path: root/src/tests/kvm/run-kvm-test.sh
blob: 4213ef9e825d44e1587958d7114a91d6dcfbf666 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

set -e

WRAPPER="$1"
WRAPPER_ARGS="$2"
TEST_RESULT="$3"

export XDG_RUNTIME_DIR="/tmp/sub-runtime-dir-$UID"
export GSETTINGS_SCHEMA_DIR="$PWD/build/data"
export G_SLICE="always-malloc"
export MALLOC_CHECK_="3"
export NO_AT_BRIDGE="1"
export GTK_A11Y="none"
export MALLOC_PERTURB_="123"

mkdir -p -m 700 $XDG_RUNTIME_DIR

glib-compile-schemas $GSETTINGS_SCHEMA_DIR

status=0
"$WRAPPER" $WRAPPER_ARGS "${@:4}" || status=$?

echo $status > $TEST_RESULT