GNOME Bugzilla – Bug 595987
Add some structure for interactive tests of UI components
Last modified: 2009-10-01 19:26:19 UTC
js/ui/environment.js: Split out initial UI setup (Tweener initialization, Nbtk monkey-patching) into a separate file we can import from tests. tests/: Directory for various types of tests tests/run-test.sh: Shell script that to run tests with an appropriate environment set up. tests/testcommon/: Common modules and data for tests tests/interactive/: Interactive tests tests/interactive/box-layout.js: A sample test of NbtkLayout
Created attachment 143722 [details] [review] Add some structure for interactive tests of UI components
Created attachment 143723 [details] [review] run-test.sh: support running tests under gdb As with the 'gnome-shell' -g/--debug can be passed to run under the debugger.
Created attachment 144313 [details] [review] Add some structure for interactive tests of UI components js/ui/environment.js: Split out initial UI setup (Tweener initialization, ClutterContainer monkey-patching) into a separate file we can import from tests. tests/: Directory for various types of tests tests/run-test.sh: Shell script that to run tests with an appropriate environment set up. tests/testcommon/: Common modules and data for tests tests/interactive/: Interactive tests tests/interactive/box-layout.js: A sample test of StLayout
Created attachment 144314 [details] [review] run-test.sh: support running tests under gdb As with the 'gnome-shell' -g/--debug can be passed to run under the debugger.
Comment on attachment 144313 [details] [review] Add some structure for interactive tests of UI components How are you running the tests? When I try to run "jhbuild run ./run-test.sh interactive/box-layout.js", it can't find St-1.0.typelib, and if I set GI_TYPELIB_PATH by hand, then it can't find the shared library, etc. >+++ b/tests/Makefile.am >+# We substitute in bindir so it works as an autostart >+# file when built in a non-system prefix >+run-test.sh: run-test.sh.in That comment makes no sense here. (It was copied along with the sed command from data/Makefile.am.) >+*.red { >+ background-color: red; >+} I think standard CSS style is to omit the "*" there.
(In reply to comment #5) > (From update of attachment 144313 [details] [review]) > How are you running the tests? When I try to run "jhbuild run ./run-test.sh > interactive/box-layout.js", it can't find St-1.0.typelib, and if I set > GI_TYPELIB_PATH by hand, then it can't find the shared library, etc. Hmm. What version are you testing against? do they work on the tip of the shell-toolkit branch? The command above looks right to me.... I'm usually doing it within 'jhbuild shell' but should be pretty much the same. (And just checked with jhbuild run and it works too.) > >+++ b/tests/Makefile.am > >+# We substitute in bindir so it works as an autostart > >+# file when built in a non-system prefix > >+run-test.sh: run-test.sh.in > > That comment makes no sense here. (It was copied along with the sed command > from data/Makefile.am.) Good catch, fixed in my local tree now. > >+*.red { > >+ background-color: red; > >+} > > I think standard CSS style is to omit the "*" there. It's a workaround for a NbtkStylesheet bug; after the port to StTheme later in the branch, I removed the workaround.
(In reply to comment #6) > (In reply to comment #5) > > (From update of attachment 144313 [details] [review] [details]) > > How are you running the tests? When I try to run "jhbuild run ./run-test.sh > > interactive/box-layout.js", it can't find St-1.0.typelib, and if I set > > GI_TYPELIB_PATH by hand, then it can't find the shared library, etc. > > Hmm. What version are you testing against? do they work on the tip of the > shell-toolkit branch? The command above looks right to me.... I'm usually doing > it within 'jhbuild shell' but should be pretty much the same. (And just checked > with jhbuild run and it works too.) From private conversation this was an unitialized variable crash combined with some confusion about run-test.sh vs. running with jhbuild run when debugging it.
Attachment 144313 [details] pushed as 5549789 - Add some structure for interactive tests of UI components Attachment 144314 [details] pushed as 3c646ec - run-test.sh: support running tests under gdb