#!/bin/sh
# - test

if [ "$test" = "all" ] || [ "$test" = "thermal" ]; then
	mkdir -p		/tmp/.X11-unix
	chmod 1777		/tmp/.X11-unix
	chown root:root		/tmp/.X11-unix

	# have a delay after start cpu_heat to make sure cpu_heat have been started when cpu is very busy
	[ -e $BENCHMARK_ROOT/pm-qa/thermal/thermal_03.sh ] && sed -i -e '/\$CPU_HEAT_BIN/a sleep 3' $BENCHMARK_ROOT/pm-qa/thermal/thermal_03.sh
	[ -e $BENCHMARK_ROOT/pm-qa/thermal/thermal_06.sh ] && sed -i -e '/\$CPU_HEAT_BIN/a sleep 3' $BENCHMARK_ROOT/pm-qa/thermal/thermal_06.sh

	xinit $LKP_SRC/tests/pm-qa.xinitrc -- $LKP_SRC/tests/piglit.xserverrc
else
	$LKP_SRC/tests/pm-qa.xinitrc
fi
