Add option to disable certain pjsua tests (#2289)
* Add option to disable certain pjsua tests * install sipp for pjsua test CI
This commit is contained in:
parent
072fee1e68
commit
9f208e962c
|
@ -9,6 +9,10 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install dependencies
|
||||
run: sudo apt-get install -y sip-tester
|
||||
- name: config site
|
||||
run: echo "#define PJMEDIA_SRTP_HAS_DTLS 1" > pjlib/include/pj/config_site.h
|
||||
- name: configure
|
||||
run: ./configure
|
||||
- name: make
|
||||
|
|
|
@ -41,3 +41,12 @@ pjsip-apps/src/swig/csharp/pjsua2xamarin/
|
|||
pjsip-apps/src/swig/python/build/
|
||||
pjsip-apps/src/swig/python/pjsua2.py
|
||||
pjsip-apps/src/swig/python/pjsua2_wrap.*
|
||||
|
||||
# unit tests files
|
||||
tests/pjsua/*.pyc
|
||||
tests/pjsua/scripts-*/*.pyc
|
||||
tests/pjsua/*.log
|
||||
tests/pjsua/wavs/tmp*.wav
|
||||
tests/pjsua/tools/cmp_wav
|
||||
tests/pjsua/tools/cmp_wav.dSYM
|
||||
tests/pjsua/logs
|
||||
|
|
5
Makefile
5
Makefile
|
@ -113,9 +113,12 @@ pjmedia-test: pjmedia/bin/pjmedia-test-$(TARGET_NAME)
|
|||
pjsip-test: pjsip/bin/pjsip-test-$(TARGET_NAME)
|
||||
cd pjsip/build && ../bin/pjsip-test-$(TARGET_NAME)
|
||||
|
||||
pjsua-test:
|
||||
pjsua-test: cmp_wav
|
||||
cd tests/pjsua && python runall.py
|
||||
|
||||
cmp_wav:
|
||||
cd tests/pjsua/tools && make
|
||||
|
||||
install:
|
||||
mkdir -p $(DESTDIR)$(libdir)/
|
||||
# cp -af $(APP_LIB_FILES) $(DESTDIR)$(libdir)/
|
||||
|
|
|
@ -78,10 +78,6 @@ for f in os.listdir("scripts-sipp"):
|
|||
if f.endswith(".xml"):
|
||||
tests.append("mod_sipp.py scripts-sipp/" + f)
|
||||
|
||||
# Filter-out excluded tests
|
||||
for pat in excluded_tests:
|
||||
tests = [t for t in tests if t.find(pat)==-1]
|
||||
|
||||
|
||||
resume_script=""
|
||||
shell_cmd=""
|
||||
|
@ -101,6 +97,8 @@ while len(sys.argv):
|
|||
print " --resume,-r RESUME"
|
||||
print " RESUME is string/substring to specify where to resume tests."
|
||||
print " If this argument is omited, tests will start from the beginning."
|
||||
print " --disable,-d TEST_NAME"
|
||||
print " Disable a specific test that contains the specified TEST_NAME."
|
||||
print " --shell,-s SHELL"
|
||||
print " Run the tests with the specified SHELL cmd. This can also be"
|
||||
print " used to run the test with ccdash. Example:"
|
||||
|
@ -142,6 +140,15 @@ while len(sys.argv):
|
|||
sys.argv.pop(0)
|
||||
sys.stderr.write("Error: argument value required")
|
||||
sys.exit(1)
|
||||
elif sys.argv[0] == '-d' or sys.argv[0] == '--disable':
|
||||
if len(sys.argv) > 1:
|
||||
excluded_tests.append(sys.argv[1])
|
||||
sys.argv.pop(0)
|
||||
sys.argv.pop(0)
|
||||
else:
|
||||
sys.argv.pop(0)
|
||||
sys.stderr.write("Error: argument value required")
|
||||
sys.exit(1)
|
||||
else:
|
||||
# should be run.py options
|
||||
break
|
||||
|
@ -165,6 +172,10 @@ try:
|
|||
except:
|
||||
print "Warning: failed in creating directory 'logs'"
|
||||
|
||||
# Filter-out excluded tests
|
||||
for pat in excluded_tests:
|
||||
tests = [t for t in tests if t.find(pat)==-1]
|
||||
|
||||
# Now run the tests
|
||||
total_cnt = len(tests)
|
||||
for t in tests:
|
||||
|
|
Loading…
Reference in New Issue