@@ -8,6 +8,7 @@ set -eo pipefail
8
8
PYPI_VENDOR_DIR=" $( pwd) /tests/pypi/"
9
9
export PYPI_VENDOR_DIR
10
10
export PYTHONIOENCODING=" utf-8"
11
+ export LANG=C.UTF-8
11
12
12
13
prefix () {
13
14
sed " s/^/ $1 : /"
@@ -17,62 +18,37 @@ if [[ ! -z "$TEST_SUITE" ]]; then
17
18
echo " Using TEST_SUITE=$TEST_SUITE "
18
19
fi
19
20
20
- # If running in CI environment…
21
- if [[ ! -z " $CI " ]]; then
22
- echo " Running in a CI environment…"
23
-
24
- # Use tap output for tests.
25
- TAP_OUTPUT=" 1"
26
- export TAP_OUTPUT
27
-
28
- echo " Installing Pipenv…"
29
-
30
- # pip uninstall -y pipenv
31
- export PATH=" ~/.local/bin:$PATH "
32
- pip install --user -e " $( pwd) " --upgrade
33
- pipenv install --deploy --dev
21
+ export PATH=" ~/.local/bin:$PATH "
22
+ echo " Installing Pipenv…"
23
+ pip install --user -e " $( pwd) " --upgrade
24
+ pipenv install --deploy --dev
34
25
35
26
# Otherwise, we're on a development machine.
36
- else
37
- # First, try MacOS…
38
- if [[ $( python -c " import sys; print(sys.platform)" ) == " darwin" ]]; then
39
-
40
- echo " Clearing Caches…"
41
- rm -fr ~ /Library/Caches/pip
42
- rm -fr ~ /Library/Caches/pipenv
43
-
44
- # Otherwise, assume Linux…
45
- else
46
- echo " Clearing Caches…"
47
- rm -fr ~ /.cache/pip
48
- rm -fr ~ /.cache/pipenv
49
- fi
27
+ # First, try MacOS…
28
+ if [[ $( python -c " import sys; print(sys.platform)" ) == " darwin" ]]; then
50
29
51
- # If the lockfile hasn't changed, skip installs.
52
-
53
- echo " Installing Pipenv…"
54
- pip install -e " $( pwd) " --upgrade-strategy=only-if-needed
55
-
56
- echo " Installing dependencies…"
57
- PIPENV_PYTHON=2.7 pipenv run pip install -e . --upgrade
58
- PIPENV_PYTHON=3.6 pipenv run pip install -e . --upgrade
59
- PIPENV_PYTHON=2.7 pipenv install --dev
60
- PIPENV_PYTHON=3.6 pipenv install --dev
61
-
62
- fi
63
-
64
- # Use tap output if in a CI environment, otherwise just run the tests.
65
- if [[ " $TAP_OUTPUT " ]]; then
66
- echo " $ pipenv run time python -m pytest -v -n auto -m \" $TEST_SUITE \" --tap-stream tests/ | tee report-$PYTHON .tap"
67
- pipenv run time python -m pytest -v -n auto -m " $TEST_SUITE " --tap-stream tests/ | tee report.tap
30
+ echo " Clearing Caches…"
31
+ rm -fr ~ /Library/Caches/pip
32
+ rm -fr ~ /Library/Caches/pipenv
68
33
34
+ # Otherwise, assume Linux…
69
35
else
70
- echo " $ pipenv run time pytest -v -n auto tests -m \" $TEST_SUITE \" "
71
- # PIPENV_PYTHON=2.7 pipenv run time pytest -v -n auto tests -m "$TEST_SUITE" | prefix 2.7 &
72
- # PIPENV_PYTHON=3.6 pipenv run time pytest -v -n auto tests -m "$TEST_SUITE" | prefix 3.6
73
- # Better to run them sequentially.
74
- PIPENV_PYTHON=2.7 pipenv run time pytest -v -n auto tests -m " $TEST_SUITE "
75
- PIPENV_PYTHON=3.6 pipenv run time pytest -v -n auto tests -m " $TEST_SUITE "
76
- # Cleanup junk.
77
- rm -fr .venv
36
+ echo " Clearing Caches…"
37
+ rm -fr ~ /.cache/pip
38
+ rm -fr ~ /.cache/pipenv
78
39
fi
40
+
41
+ echo " Installing dependencies…"
42
+ PIPENV_PYTHON=2.7 pipenv run pip install -e . --upgrade
43
+ PIPENV_PYTHON=3.6 pipenv run pip install -e . --upgrade
44
+ PIPENV_PYTHON=2.7 pipenv install --dev
45
+ PIPENV_PYTHON=3.6 pipenv install --dev
46
+
47
+ echo " $ pipenv run time pytest -v -n auto tests -m \" $TEST_SUITE \" "
48
+ # PIPENV_PYTHON=2.7 pipenv run time pytest -v -n auto tests -m "$TEST_SUITE" | prefix 2.7 &
49
+ # PIPENV_PYTHON=3.6 pipenv run time pytest -v -n auto tests -m "$TEST_SUITE" | prefix 3.6
50
+ # Better to run them sequentially.
51
+ PIPENV_PYTHON=2.7 pipenv run time pytest -v -n auto tests -m " $TEST_SUITE "
52
+ PIPENV_PYTHON=3.6 pipenv run time pytest -v -n auto tests -m " $TEST_SUITE "
53
+ # Cleanup junk.
54
+ rm -fr .venv
0 commit comments