@@ -46,7 +46,6 @@ Many of the original project pages are no longer available. Some documentation a
4646Currently the Linux amd64, Windows amd64 and Linux armhf platforms are well-tested.
4747However there are issues with platform qualification for ARM.
4848For Windows i686 and Linux i686 it builds at least.
49- ` run.py ` can be used but you must build a loader first yourself (auto-build doesn't work).
5049
5150## Dependencies
5251- SCons
@@ -129,6 +128,47 @@ Specify the path to the MinGW installation with `mingw_dir=...`. For example:
129128python -m SCons --mode=nacl,opt-windows --no-clang saigo=1 werror=0 mingw_dir=C:\mingw\x86_64-msvcrt-12.2.0 platform=x86-64 sel_ldr irt_core`
130129```
131130
131+ ### ARM testing
132+ There are some special build system features that facilitate testing for the
133+ 32-bit ARM Linux target.
134+
135+ #### Running tests with user-mode QEMU
136+
137+ Some unit tests can run directly on an x86-based host with the help of user-mode QEMU. You
138+ don't need to pass any extra arguments to the build system, just install the necessary
139+ software, which may be named something like "qemu-user". Then issue a normal testing command e.g.
140+ ```
141+ scons --mode=opt-host,nacl saigo=1 platform=arm werror=0 --keep-going small_tests
142+ ```
143+
144+ This is useful but there are many tests that it cannot run, for example because they involve
145+ spawning multiple process. Also it is important to test on a full machine to exercise the
146+ arcane kernel interactions such as ` longjmp ` ing out of a signal handler.
147+
148+ #### Running tests on a different machine than they were built
149+ To test on an emulated or slow ARM machine, you can build the binaries on another system first
150+ and then copy everything to the test machine. You need to copy both the build system files and
151+ the compiled artifacts. Then on the test machine, you only need to install SCons to run tests,
152+ using the ` built_elsewhere=1 ` flag. For example,
153+
154+ ```
155+ # on build machine
156+ scons --mode=opt-linux,nacl saigo=1 platform=arm all_programs -j8
157+ rsync -az --info=progress2 * testuser@testhost:/home/testuser/nacl-test
158+ ```
159+
160+ Then on the test machine,
161+ ```
162+ scons --mode=opt-linux,nacl saigo=1 platform=arm small_tests medium_tests large_tests
163+ ```
164+
165+ ## Using ` run.py `
166+ Once you have built the loader and IRT, you can use ` run.py ` to run an nexe like a normal
167+ program. It specifies relaxed I/O permissions so the nexe can print to stdout, etc.
168+
169+ Note that if you did not build the dependencies, the script will try to build them
170+ with a PNaCl toolchain (not the Saigo that we want) and probably fail.
171+
132172--
133173
134174## Directory structure
0 commit comments