From 5bb0bcd4ff61da9a750d9febcc7781d4a711f7a1 Mon Sep 17 00:00:00 2001 From: Edouard Tisserant Date: Fri, 12 May 2017 16:29:28 +0200 Subject: [PATCH] Updated docs in tests --- test/mp_sync_test.py | 30 ++++++++++++++++++++++++------ test/multipEp.py | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 6 deletions(-) diff --git a/test/mp_sync_test.py b/test/mp_sync_test.py index 7a57f29..cebf94f 100644 --- a/test/mp_sync_test.py +++ b/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 """ diff --git a/test/multipEp.py b/test/multipEp.py index 10c4775..867a061 100644 --- a/test/multipEp.py +++ b/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