]> git.sur5r.net Git - i3/i3.github.io/blobdiff - docs/testsuite.html
update docs for 4.14
[i3/i3.github.io] / docs / testsuite.html
index 2695e29ef5644d5c65ed1e4d33167a8cfef20b99..35631251d65c3a92b012d9227bd312f6fa90106f 100644 (file)
@@ -22,7 +22,7 @@ document.addEventListener("DOMContentLoaded", function(){asciidoc.footnotes(); a
                         <ul id="nav">\r
                                 <li><a style="border-bottom: 2px solid #fff" href="/docs">Docs</a></li>\r
                                 <li><a href="/screenshots">Screens</a></li>\r
-                                <li><a href="https://faq.i3wm.org/">FAQ</a></li>\r
+                                <li><a href="https://www.reddit.com/r/i3wm/">FAQ</a></li>\r
                                 <li><a href="/contact">Contact</a></li>\r
                                 <li><a href="https://github.com/i3/i3/issues">Bugs</a></li>\r
                         </ul>\r
@@ -146,6 +146,8 @@ used to install the testsuite. Many users prefer to use the more modern
 <div class="content">\r
 <pre><tt>$ cd ~/i3/testcases\r
 $ sudo apt-get install cpanminus\r
+$ sudo cpanm .\r
+$ cd ~/i3/AnyEvent-I3\r
 $ sudo cpanm .</tt></pre>\r
 </div></div>\r
 <div class="paragraph"><p>If you don’t want to use cpanminus for some reason, the same works with cpan:</p></div>\r
@@ -153,6 +155,8 @@ $ sudo cpanm .</tt></pre>
 <div class="title">Installing testsuite dependencies using cpan</div>\r
 <div class="content">\r
 <pre><tt>$ cd ~/i3/testcases\r
+$ sudo cpan .\r
+$ cd ~/i3/AnyEvent-I3\r
 $ sudo cpan .</tt></pre>\r
 </div></div>\r
 <div class="paragraph"><p>In case you don’t have root permissions, you can also install into your home\r
@@ -171,12 +175,23 @@ always be found under the symlink <tt>latest/</tt>. Unless told differently, it
 run the tests on a separate X server instance (using Xephyr).</p></div>\r
 <div class="paragraph"><p>Xephyr will open a window where you can inspect the running test. You can run\r
 the tests without an X session with Xvfb, such as with <tt>xvfb-run\r
-./complete-run</tt>. This will also speed up the tests signficantly especially on\r
+./complete-run</tt>. This will also speed up the tests significantly especially on\r
 machines without a powerful video card.</p></div>\r
 <div class="listingblock">\r
-<div class="title">Example invocation of complete-run.pl+</div>\r
+<div class="title">Example invocation of <tt>complete-run.pl</tt></div>\r
 <div class="content">\r
-<pre><tt>$ cd ~/i3/testcases\r
+<pre><tt>$ cd ~/i3\r
+\r
+$ autoreconf -fi\r
+\r
+$ mkdir -p build &amp;&amp; cd build\r
+\r
+$ ../configure\r
+\r
+$ make -j8\r
+# output omitted because it is very long\r
+\r
+$ cd testcases\r
 \r
 $ ./complete-run.pl\r
 # output omitted because it is very long\r
@@ -219,6 +234,42 @@ $ less latest/i3-log-for-04-floating.t</tt></pre>
 </div></div>\r
 <div class="paragraph"><p>This will show the output of Xephyr, which is the X server implementation we\r
 use for testing.</p></div>\r
+<div class="sect4">\r
+<h5 id="_make_command_tt_make_check_tt">make command: <tt>make check</tt></h5>\r
+<div class="paragraph"><p>Make check runs the i3 testsuite.\r
+You can still use ./testcases/complete-run.pl to get the interactive progress output.</p></div>\r
+<div class="listingblock">\r
+<div class="title">Example invocation of <tt>make check</tt></div>\r
+<div class="content">\r
+<pre><tt>$ cd ~/i3\r
+\r
+$ autoreconf -fi\r
+\r
+$ mkdir -p build &amp;&amp; cd build\r
+\r
+$ ../configure\r
+\r
+$ make -j8\r
+# output omitted because it is very long\r
+\r
+$ make check\r
+# output omitted because it is very long\r
+PASS: testcases/complete-run.pl\r
+============================================================================\r
+Testsuite summary for i3 4.13\r
+============================================================================\r
+# TOTAL: 1\r
+# PASS:  1\r
+# SKIP:  0\r
+# XFAIL: 0\r
+# FAIL:  0\r
+# XPASS: 0\r
+# ERROR: 0\r
+============================================================================\r
+\r
+$ less test-suite.log</tt></pre>\r
+</div></div>\r
+</div>\r
 </div>\r
 <div class="sect3">\r
 <h4 id="_coverage_testing">3.2.2. Coverage testing</h4>\r
@@ -252,7 +303,7 @@ current state (layout tree).</p></div>
 testsuite uses X11::XCB, a new (and quite specific to i3 at the moment) Perl\r
 module which uses the XCB protocol description to generate Perl bindings to\r
 X11. They work in a very similar way to libxcb (which i3 uses) and provide\r
-relatively high-level interfaces (objects such as <tt>X11::XCB::Window</tt>) aswell as\r
+relatively high-level interfaces (objects such as <tt>X11::XCB::Window</tt>) as well as\r
 access to the low-level interface, which is very useful when testing a window\r
 manager.</p></div>\r
 </div>\r
@@ -492,7 +543,7 @@ my $right = open_window($x);
 cmd 'focus left';\r
 is($x-&gt;input_focus, $left-&gt;id, 'left window focused');</tt></pre>\r
 </div></div>\r
-<div class="paragraph"><p>However, the test fails. Sometimes. Apparantly, there is a race condition in\r
+<div class="paragraph"><p>However, the test fails. Sometimes. Apparently, there is a race condition in\r
 your test. If you think about it, this is because you are using two different\r
 pieces of software: You tell i3 to update focus, i3 confirms that, and then you\r
 ask X11 to give you the current focus. There is a certain time i3 needs to\r
@@ -665,7 +716,7 @@ activation, we decreased the total amount of time necessary to run all tests
 (72 files at the time of writing) from &gt; 100 seconds to 16 seconds. This makes\r
 it significantly more attractive to run the test suite more often (or at all)\r
 during development.</p></div>\r
-<div class="paragraph"><p>An alternative approach to using socket activation is polling for the existance\r
+<div class="paragraph"><p>An alternative approach to using socket activation is polling for the existence\r
 of the IPC socket and connecting to it. While this might be slightly easier to\r
 implement, it wastes CPU time and is considerably uglier than this solution\r
 :). After all, <tt>lib/SocketActivation.pm</tt> contains only 54 SLOC.</p></div>\r