diff options
author | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2011-05-05 08:54:40 +0200 |
---|---|---|
committer | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2011-05-05 08:54:40 +0200 |
commit | 29420f774dc55c794cebefe24aadc90280601b79 (patch) | |
tree | b2f371bebd836a564de30c5fbec7a659c90515ad /test/script/test_tty_output.sh | |
parent | c9d0018b9e527168292f8d40273a9e97223c0bc8 (diff) | |
download | latrace-29420f774dc55c794cebefe24aadc90280601b79.tar.gz latrace-29420f774dc55c794cebefe24aadc90280601b79.tar.xz latrace-29420f774dc55c794cebefe24aadc90280601b79.zip |
adding OUTPUT_TTY config file option
- added OUTPUT_TTY config file option
it is possible to catch traced program tty output and
storing it to the configured file (0/1/2 descriptors
are monitored)
- added automated test for the option
- refactoring process method a bit
- disabling connection between -R and -q options
Diffstat (limited to 'test/script/test_tty_output.sh')
-rw-r--r-- | test/script/test_tty_output.sh | 34 |
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 . +} |