summaryrefslogtreecommitdiffstats
path: root/test/script/test_tty_output.sh
blob: 70d7b07ecedaaf36fffccafbbbac8041fd6ee4f6 (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
25
26
27
28
29
30
31
#!/bin/sh

. $PWD/test/script/functions.sh

function tto_init
{
	cat > /tmp/tto_latrace.conf <<EOF
OPTIONS {
        OUTPUT_TTY = "/tmp/tto_latrace.output"
}
EOF
}

function tto_cleanup
{
	rm -f /tmp/tto_latrace.conf
	rm -f /tmp/tto_latrace.output
}

function test_tty_output
{
	tto_init

	LD_LIBRARY_PATH=$PWD ./latrace -N /tmp/tto_latrace.conf -q /bin/cat \
		$PWD/test/script/test_tty_output.sh > /dev/null

	diff /tmp/tto_latrace.output $PWD/test/script/test_tty_output.sh
	CHECK_RET

	tto_cleanup
}