[Sugar-devel] Getting karma to work with sugar-activity-html
Daniel Narvaez
dwnarvaez at gmail.com
Tue May 21 16:03:05 EDT 2013
On 21 May 2013 17:03, Manuel Quiñones <manuq at laptop.org> wrote:
> Feel free to move sugar-html-test to sugarlabs user.
>
Done.
> I checked out the karma branch, and got it working doing the change in
> karma.conf.js:
>
> browsers = ['sugar-html-test'];
>
>
I sent a pull request to make this change.
> Then I did:
>
> $run-karma sugar-html-graphics/test/karma.conf.js
>
> Sugar started, the test activity opened, and after that I saw the
> karma output in shell.log
>
> 1369146597.616569 WARNING root: _Account.__set_current_activity_cb
> ESC[32mINFO [Chrome 25.0 (Linux)]: ESC[39mConnected on socket id
> n0CaTfj6LmRWe4SUfxN-
> Chrome 25.0 (Linux): Executed 1 of 2
> ESC[1AESC[2KChrome 25.0 (Linux): Executed 2 of 2
> ESC[1AESC[2KChrome 25.0 (Linux): Executed 2 of 2ESC[32m SUCCESSESC[39m
> (0.517 secs / 0.01 secs)
> 1369146636.664850 DEBUG root: new zoom level: 2
>
> Great! I think we could improve that output moving it to a separate
> log file, and also setting colors to false in the karma conf file
> like:
>
Yeah, it also sucks for gtk tests. I will send patches for it.
> // enable / disable colors in the output (reporters and logs)
> colors = false;
>
> There are other configurations we could play with:
>
> // test results reporter to use
> // possible values: 'dots', 'progress', 'junit'
> reporters = ['progress'];
>
> // enable / disable watching file and executing tests whenever any file
> changes
> autoWatch = true;
>
> // Continuous Integration mode
> // if true, it capture browsers, run tests and exit
> singleRun = false;
>
>
> I think we should leave the current settings because is good to
> develop using karma interactively. It watches the js files for
> changes and re-runs. They can instead be overriden adding parameters
> to the "karma start" command.
>
>
Yes I agree. I will just make buildbot use karma --single-run.
> Minor: I got a non miningful message trying to run it without
> parameters (bash syntax error):
>
> [sugar-build sugar-build]$ ./osbuild run-karma
> File "/home/manuq/prog/sugar-build/build/commands/run-karma", line 2
> SUGAR_RUN_TEST="karma start $@" sugar-runner
> ^
> SyntaxError: invalid syntax
>
That wrapper was pretty broken :) Pushed a proper one now, it's called just
"karma" so it basically works transparently.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130521/1079d762/attachment.html>
More information about the Sugar-devel
mailing list