OLD | NEW |
1 Hacking on Sky | 1 Hacking on Sky |
2 ============== | 2 ============== |
3 | 3 |
4 Building | 4 Building |
5 -------- | 5 -------- |
6 | 6 |
7 * Follow the setup & build instructions for [Mojo](https://github.com/domokit/mo
jo) | 7 * Follow the setup & build instructions for [Mojo](https://github.com/domokit/mo
jo) |
8 | 8 |
9 Running applications | 9 Running applications |
10 -------------------- | 10 -------------------- |
(...skipping 12 matching lines...) Expand all Loading... |
23 `skydb start` reads gn args from the passed build directory to | 23 `skydb start` reads gn args from the passed build directory to |
24 determine whether its using android, for example. | 24 determine whether its using android, for example. |
25 | 25 |
26 * ``./sky/tools/test_sky --debug`` | 26 * ``./sky/tools/test_sky --debug`` |
27 * This runs the tests against ``//out/Debug``. If you want to run against | 27 * This runs the tests against ``//out/Debug``. If you want to run against |
28 ``//out/Release``, omit the ``--debug`` flag. | 28 ``//out/Release``, omit the ``--debug`` flag. |
29 | 29 |
30 Running tests manually | 30 Running tests manually |
31 ---------------------- | 31 ---------------------- |
32 | 32 |
33 * ``out/downloads/sky_server -t Debug . 8000`` (If you don't have ``sky_server``
yet, run ``sky/tools/download_sky_server``.) | 33 * ``sky/tools/skygo/linux64/sky_server -t Debug . 8000`` |
34 * ``out/Debug/mojo_shell --args-for="mojo:native_viewport_service --use-headless
-config --use-osmesa" --args-for"=mojo:sky_viewer --testing" --content-handlers=
text/sky,mojo:sky_viewer --url-mappings=mojo:window_manager=mojo:sky_tester,mojo
:surfaces_service=mojo:fake_surfaces_service mojo:window_manager`` | 34 * ``out/Debug/mojo_shell --args-for="mojo:native_viewport_service --use-headless
-config --use-osmesa" --args-for"=mojo:sky_viewer --testing" --content-handlers=
text/sky,mojo:sky_viewer --url-mappings=mojo:window_manager=mojo:sky_tester,mojo
:surfaces_service=mojo:fake_surfaces_service mojo:window_manager`` |
35 * The ``sky_tester`` should print ``#READY`` when ready | 35 * The ``sky_tester`` should print ``#READY`` when ready |
36 * Type the URL you wish to run, for example ``http://127.0.0.1:8000/sky/tests/lo
wlevel/text.html``, and press the enter key | 36 * Type the URL you wish to run, for example ``http://127.0.0.1:8000/sky/tests/lo
wlevel/text.html``, and press the enter key |
37 * The harness should print the results of the test. You can then type another U
RL. | 37 * The harness should print the results of the test. You can then type another U
RL. |
38 | 38 |
39 Writing tests | 39 Writing tests |
40 ------------- | 40 ------------- |
41 | 41 |
42 * We recommend using the ``unittest.dart`` testing framework. | 42 * We recommend using the ``unittest.dart`` testing framework. |
43 * See ``sky/tests/lowlevel/attribute-collection.sky`` for an example. | 43 * See ``sky/tests/lowlevel/attribute-collection.sky`` for an example. |
(...skipping 17 matching lines...) Expand all Loading... |
61 ```bash | 61 ```bash |
62 $ sha1sum ../out/Debug/layout-test-results/framework/flights-app-pixels-actual.p
ng | 62 $ sha1sum ../out/Debug/layout-test-results/framework/flights-app-pixels-actual.p
ng |
63 db0508cdfe69e996a93464050dc383f6480f1283 ../out/Debug/layout-test-results/frame
work/flights-app-pixels-actual.png | 63 db0508cdfe69e996a93464050dc383f6480f1283 ../out/Debug/layout-test-results/frame
work/flights-app-pixels-actual.png |
64 $ gsutil.py cp ../out/Debug/layout-test-results/framework/flights-app-pixels-act
ual.png gs://mojo/sky-pngs/db0508cdfe69e996a93464050dc383f6480f1283 | 64 $ gsutil.py cp ../out/Debug/layout-test-results/framework/flights-app-pixels-act
ual.png gs://mojo/sky-pngs/db0508cdfe69e996a93464050dc383f6480f1283 |
65 ``` | 65 ``` |
66 | 66 |
67 Long-term, we should not have these tests at all and should just | 67 Long-term, we should not have these tests at all and should just |
68 dump paint commands. In the short-term, if we find we're doing this | 68 dump paint commands. In the short-term, if we find we're doing this |
69 a lot we should obviously automate this process, e.g. test_sky could | 69 a lot we should obviously automate this process, e.g. test_sky could |
70 do all of this work, including spitting out the correct reference file. | 70 do all of this work, including spitting out the correct reference file. |
OLD | NEW |