Browse Source

Updated docs in tests

PYADPT-55
Edouard Tisserant 8 years ago
parent
commit
5bb0bcd4ff
  1. 30
      test/mp_sync_test.py
  2. 33
      test/multipEp.py

30
test/mp_sync_test.py

@ -1,15 +1,33 @@
"""
tests for keysync scenario
= Tests for keysync =
See multipEp.py for command line switches.
* Example to launch with latest built pEp Python Adapter (no install):
* Launch it with latest built pEp Python Adapter (no install):
PYTHONPATH=`pwd`/build/lib.macosx-10.12-x86_64-3.4 \
python3.4 test/mp_sync_test.py
* With shared libs search path different for GroupA1 :
DYLD_LIBRARY_PATH=$HOME/lib_gpg \
* Example to debug at a particular step in "group_of_3_members"
python3.4 test/mp_sync_test.py only_group_of_3_members debug_GroupA3_3
* Example test with both GPG and NetPGP :
In that example only GroupA1 is using NetPGP, others use GPG
- In pEpEngine :
hg clean --all
make install DEBUG=YES OPENPGP=GPG PREFIX=$HOME/pep_gpg
hg clean --all
make install DEBUG=YES OPENPGP=NETPGP PREFIX=$HOME/pep_netpgp
- In pEpPythonAdapter :
DYLD_LIBRARY_PATH=$HOME/pep_gpg/lib \
PYTHONPATH=`pwd`/build/lib.macosx-10.12-x86_64-3.4 \
python3.4 test/mp_sync_test.py \
libs_GroupA1=$HOME/lib_netpgp
python3.4 test/mp_sync_test.py libs_GroupA1=$HOME/pep_netpgp/lib
"""

33
test/multipEp.py

@ -1,3 +1,36 @@
"""
multipEp.py : multiple process python testing framework for pEp
= Command line switches =
wait_for_debug
Block and ask if debugger should be attached each time an instance
is started
debug_${instance_name}
Launch lldb in another terminal, and attach it to given intsance
immediately after instance startup.
debug_${instance_name}_${execution_number}
Launch lldb in another terminal, and attach it to given intsance
when instance is at some particular step in the test.
${execution_number} is found by reading test output.
only_${test_scenario_name}
Execute only given test scenario. Scenario with different name
are skipped.
libs_${instance_name}=/path/to/libs
Set LD_LIBRARY_PATH to given path before launching instance,
meant to allow selection of per-instance pEpEngines flavors
wait_for_cleanup
Block at the end of each test scenario, before deleting temporary
directory. It is meant to be able to examine keyring and DBs after
test finished or crashed.
"""
import os
import sys
import multiprocessing

Loading…
Cancel
Save