forked from joshmarshall/jsonrpclib
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathrun_tests.sh
executable file
·37 lines (31 loc) · 913 Bytes
/
run_tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#
# Script to execute tests in Docker
#
echo "Installing dependencies..."
pip install pytest coverage || exit 1
export COVERAGE_PROCESS_START=".coveragerc"
echo "Initial tests..."
export JSONRPCLIB_TEST_EXPECTED_LIB=json
coverage run -m pytest || exit 1
echo "uJson tests..."
pip install ujson && (
export JSONRPCLIB_TEST_EXPECTED_LIB=ujson
coverage run -m pytest tests/test_jsonlib.py || exit 1
pip uninstall -y ujson
)
echo "cJson tests..."
pip install python-cjson && (
export JSONRPCLIB_TEST_EXPECTED_LIB=cjson
coverage run -m pytest tests/test_jsonlib.py || exit 1
pip uninstall -y python-cjson
)
echo "simplejson tests..."
pip install simplejson && (
export JSONRPCLIB_TEST_EXPECTED_LIB=simplejson
coverage run -m pytest tests/test_jsonlib.py || exit 1
pip uninstall -y simplejson
)
echo "Combine results..."
coverage combine || exit $?
coverage report