| | 1 | [[PageOutline]] |
| | 2 | |
| | 3 | = Using a chroot as working environment = |
| | 4 | |
| | 5 | Although WebKit working environment and building system is quite self contained, some people like still to work in a `chroot` so they can move the complete environment from a computer to another or from a distribution to a different one without major problems and keeping their own production environment clean and totally independent from WebKit development. |
| | 6 | |
| | 7 | Working in a `chroot`, however, brings some drawbacks. Here you can find some tips, common problems and solutions. |
| | 8 | |
| | 9 | == Running tests into the chroot == |
| | 10 | |
| | 11 | WebKitGtkLayoutTests explains how to run WebKit tests. |
| | 12 | |
| | 13 | === Running python based test with multiprocess support === |
| | 14 | |
| | 15 | I'm running my development environment in a schroot with Ubuntu in an |
| | 16 | Ubuntu host. |
| | 17 | |
| | 18 | It hapenned to me the following error when trying to run the tests |
| | 19 | |
| | 20 | {{{ |
| | 21 | $ ./Tools/Scripts/run-webkit-tests --gtk --debug |
| | 22 | Using port 'gtk' |
| | 23 | Test configuration: <, x86, debug> |
| | 24 | Placing test results in /opt/webkit/WebKit.git/WebKitBuild/Debug/layout-test-results |
| | 25 | Baseline search path: gtk -> generic |
| | 26 | Using Debug build |
| | 27 | Pixel tests disabled |
| | 28 | Regular timeout: 12000, slow test timeout: 60000 |
| | 29 | Command line: /opt/webkit/WebKit.git/WebKitBuild/Debug/Programs/DumpRenderTree - |
| | 30 | |
| | 31 | Found 31495 tests; running 28693, skipping 2802. |
| | 32 | Running 4 DumpRenderTrees in parallel over 727 shards (1 locked). |
| | 33 | |
| | 34 | Releasing server lock ... |
| | 35 | OSError raised: [Errno 38] Function not implemented |
| | 36 | File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 110, in run |
| | 37 | unexpected_result_count = manager.run(args) |
| | 38 | File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 411, in run |
| | 39 | self._run_tests(self._test_names, result_summary, int(self._options.child_processes)) |
| | 40 | File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 464, in _run_tests |
| | 41 | return self._runner.run_tests(test_inputs, self._expectations, result_summary, num_workers, needs_http, needs_websockets, self._retrying) |
| | 42 | File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py", line 141, in run_tests |
| | 43 | with message_pool.get(self, self._worker_factory, num_workers, self._port.worker_startup_delay_secs(), self._port.host) as pool: |
| | 44 | File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/common/message_pool.py", line 61, in get |
| | 45 | return _MessagePool(caller, worker_factory, num_workers, worker_startup_delay_secs, host) |
| | 46 | File "/opt/webkit/WebKit.git/Tools/Scripts/webkitpy/common/message_pool.py", line 79, in __init__ |
| | 47 | self._messages_to_worker = multiprocessing.Queue() |
| | 48 | File "/usr/lib/python2.7/multiprocessing/__init__.py", line 218, in Queue |
| | 49 | return Queue(maxsize) |
| | 50 | File "/usr/lib/python2.7/multiprocessing/queues.py", line 63, in __init__ |
| | 51 | self._rlock = Lock() |
| | 52 | File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 147, in __init__ |
| | 53 | SemLock.__init__(self, SEMAPHORE, 1, 1) |
| | 54 | File "/usr/lib/python2.7/multiprocessing/synchronize.py", line 75, in __init__ |
| | 55 | sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue) |
| | 56 | Failed to execute Tools/Scripts/new-run-webkit-tests at ./Tools/Scripts/run-webkit-tests line 126. |
| | 57 | }}} |
| | 58 | |
| | 59 | The reason is explained in this post |
| | 60 | http://www.boris.co/2012/02/server-ubuntu-11.html |
| | 61 | |
| | 62 | Python's multithreading requires /dev/shm to work. In Ubuntu /dev/shm |
| | 63 | points to /run/shm by default. Rename (or delete, I doubt it is |
| | 64 | necessary anymore) existing /dev/shm. |
| | 65 | |
| | 66 | Create /dev/shm directory |
| | 67 | |
| | 68 | {{{ |
| | 69 | $ sudo -i (become root) |
| | 70 | $ mkdir /dev/shm |
| | 71 | }}} |
| | 72 | |
| | 73 | Add to /etc/fstab mounting of /dev/shm command |
| | 74 | |
| | 75 | {{{ |
| | 76 | tmpfs /dev/shm tmpfs defaults,noexec,nosuid 0 0 |
| | 77 | }}} |
| | 78 | |
| | 79 | Mount all unmounted filesystems from /etc/fstab. |
| | 80 | |
| | 81 | {{{ |
| | 82 | $ mount -a |
| | 83 | }}} |
| | 84 | |
| | 85 | You may need to do this into your schroot too. |
| | 86 | |
| | 87 | |
| | 88 | == Pulse Audio == |
| | 89 | |