From 7f9faedd51ead89227b4a92789b9728666c9b507 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Thu, 5 Aug 2010 07:24:40 +0000 Subject: Misc (re #1068): added pjsua win32 executable name list in python test driver (to look up default pjsua executable). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3248 74dad513-b988-da41-8d7b-12977e46ad98 --- tests/pjsua/run.py | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'tests/pjsua/run.py') diff --git a/tests/pjsua/run.py b/tests/pjsua/run.py index a73e9068..19b56376 100644 --- a/tests/pjsua/run.py +++ b/tests/pjsua/run.py @@ -60,24 +60,29 @@ inc.ARGS = args # Get the pjsua executable name if G_EXE == "": if sys.platform.find("win32")!=-1: - e = "../../pjsip-apps/bin/pjsua_vc6d.exe" - if os.access(e, os.F_OK): - st1 = os.stat(e) - else: - st1 = None - if st1 != None: - G_EXE = e - e = "../../pjsip-apps/bin/pjsua_vc6.exe" - if os.access(e, os.F_OK): - st2 = os.stat(e) - else: - st2 = None - if st2 != None and (st1==None or st2.st_mtime > st1.st_mtime): - G_EXE = e - st1 = st2 + EXE_DIR = "../../pjsip-apps/bin/" + EXECUTABLES = [ "pjsua_vc6d.exe", + "pjsua_vc6.exe", + "pjsua-i386-Win32-vc8-Debug.exe", + "pjsua-i386-Win32-vc8-Debug-Dynamic.exe", + "pjsua-i386-Win32-vc8-Debug-Static.exe", + "pjsua-i386-Win32-vc8-Release.exe", + "pjsua-i386-Win32-vc8-Release-Dynamic.exe", + "pjsua-i386-Win32-vc8-Release-Static.exe" + ] + e_ts = 0 + for e in EXECUTABLES: + e = EXE_DIR + e + if os.access(e, os.F_OK): + st = os.stat(e) + if e_ts==0 or e_ts