aboutsummaryrefslogtreecommitdiffstats
path: root/chapter08
diff options
context:
space:
mode:
Diffstat (limited to 'chapter08')
-rw-r--r--chapter08/bash.xml13
1 files changed, 10 insertions, 3 deletions
diff --git a/chapter08/bash.xml b/chapter08/bash.xml
index bb0f2b0fb..5007c2d46 100644
--- a/chapter08/bash.xml
+++ b/chapter08/bash.xml
@@ -73,11 +73,18 @@
<screen><userinput remap="test">chown -Rv tester .</userinput></screen>
- <para>Now, run the tests as the <systemitem
+ <para>The testsuite of the package is designed to be ran as a non-root
+ user, owning the terminal connected to standard input. To satisify the
+ requirement, spawn a new pseudoterminal using
+ <application>Expect</application> and run the tests as the <systemitem
class="username">tester</systemitem> user:</para>
-<screen><userinput remap="test">su tester &lt;&lt; EOF
-PATH=$PATH make tests &lt; $(tty)
+<screen><userinput remap="test">su -s /usr/bin/expect tester &lt;&lt; EOF
+set timeout -1
+spawn make tests
+expect eof
+lassign [wait] _ _ _ value
+exit $value
EOF</userinput></screen>
<para>Install the package:</para>