NSS:Android: Difference between revisions

2,101 bytes added ,  12 July 2012
Line 112: Line 112:


=== Controlling the tests you run ===
=== Controlling the tests you run ===
You can control the NSS tests ran with the stand variables used by all.sh on the make command line (NSS_CYCLES, NSS_TESTS, NSS_SSL_TESTS, NSS_SSL_RUN). For example to just run the blapi TESTS:
  make android_run_tests NSS_CYCLES=standard NSS_TESTS=cipher
=== Manual operations ===
You can run various tests and programs manually on your android. First you log in using SSH:
ssh -p 2222 $ANDROID_ADDR
This will give you a busybox shell. I found the android system shell to be better, so you can type 'exit' to drop into the real shell.
==== Manually running the tests ====
To run the tests manually, you need to add the following to your environment:
  export OBJDIR=Android_arm_DBG.OBJ
or if you built with BUILD_OPT=1
  export OBJDIR=Android_arm_OPT.OBJ
There is no make on android, so it can't use the make system to find the value of OBJDIR. The make targets described above has access to these variables, and automatically sets them when they build android. Other variables which the build system gets from make are found in $HOME/nsstest/dist/$OBJDIR/platform.cfg.
You can now cd into nsstest, where you'll find a dist tree, and a security tree, which looks just like the /mozilla directory in a normal NSS build system. You and run any of the tests just like you would on the host system by changing to the appropriate directory and running the test shell script. It's best to use the system shell (/system/bin/sh) to start these shell scripts, for example:
  cd system/nss/tests/ciphers
  /system/bin/sh ./ciphers.sh
Will run the blapi tests.
==== Manually running NSS commands ====
To run NSS commands you would need to adjust the following environment variables:
1. Add $HOME/nsstest/dist/$OBJDIR/bin to your path (NOTE this assumes you have set OBJDIR already as described in "Manually running the tests" above). For example:
  export PATH=$PATH:$HOME/nsstest/dist/$OBJDIR/bin
2. Add $HOME/nsstest/dist/$OBJDIR/lib to your LD_LIBRARY_PATH. For example:
  export LD_LIBRARY_PATH=$HOME/nsstest/dist/$OBJDIR/lib
You can now execute any nss commands in your android shell.
439

edits