summaryrefslogtreecommitdiffstats
path: root/test/script/test_tty_output.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/script/test_tty_output.sh')
-rw-r--r--test/script/test_tty_output.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/script/test_tty_output.sh b/test/script/test_tty_output.sh
new file mode 100644
index 0000000..d1014d6
--- /dev/null
+++ b/test/script/test_tty_output.sh
@@ -0,0 +1,34 @@
+#!/bin/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
+ if [ $? -ne 0 ]; then
+ echo "FAILED test_tty_output"
+ exit
+ fi
+
+ tto_cleanup
+
+ echo .
+}