<div dir="ltr">On 21 May 2013 17:03, Manuel Quiñones <span dir="ltr"><<a href="mailto:manuq@laptop.org" target="_blank">manuq@laptop.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Feel free to move sugar-html-test to sugarlabs user.<br></blockquote><div><br></div><div>Done.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I checked out the karma branch, and got it working doing the change in<br>
karma.conf.js:<br>
<br>
browsers = ['sugar-html-test'];<br>
<br></blockquote><div><br></div><div>I sent a pull request to make this change.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Then I did:<br>
<br>
$run-karma sugar-html-graphics/test/karma.conf.js<br>
<br>
Sugar started, the test activity opened, and after that I saw the<br>
karma output in shell.log<br>
<br>
1369146597.616569 WARNING root: _Account.__set_current_activity_cb<br>
ESC[32mINFO [Chrome 25.0 (Linux)]: ESC[39mConnected on socket id<br>
n0CaTfj6LmRWe4SUfxN-<br>
Chrome 25.0 (Linux): Executed 1 of 2<br>
ESC[1AESC[2KChrome 25.0 (Linux): Executed 2 of 2<br>
ESC[1AESC[2KChrome 25.0 (Linux): Executed 2 of 2ESC[32m SUCCESSESC[39m<br>
(0.517 secs / 0.01 secs)<br>
1369146636.664850 DEBUG root: new zoom level: 2<br>
<br>
Great! I think we could improve that output moving it to a separate<br>
log file, and also setting colors to false in the karma conf file<br>
like:<br></blockquote><div><br></div><div>Yeah, it also sucks for gtk tests. I will send patches for it.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
// enable / disable colors in the output (reporters and logs)<br>
colors = false;<br>
<br>
There are other configurations we could play with:<br>
<br>
// test results reporter to use<br>
// possible values: 'dots', 'progress', 'junit'<br>
reporters = ['progress'];<br>
<br>
// enable / disable watching file and executing tests whenever any file changes<br>
autoWatch = true;<br>
<br>
// Continuous Integration mode<br>
// if true, it capture browsers, run tests and exit<br>
singleRun = false;<br>
<br>
<br>
I think we should leave the current settings because is good to<br>
develop using karma interactively. It watches the js files for<br>
changes and re-runs. They can instead be overriden adding parameters<br>
to the "karma start" command.<br>
<br></blockquote><div><br></div><div>Yes I agree. I will just make buildbot use karma --single-run.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Minor: I got a non miningful message trying to run it without<br>
parameters (bash syntax error):<br>
<br>
[sugar-build sugar-build]$ ./osbuild run-karma<br>
File "/home/manuq/prog/sugar-build/build/commands/run-karma", line 2<br>
SUGAR_RUN_TEST="karma start $@" sugar-runner<br>
^<br>
SyntaxError: invalid syntax<br></blockquote><div><br></div><div>That wrapper was pretty broken :) Pushed a proper one now, it's called just "karma" so it basically works transparently. <br></div></div></div>
</div>