-
Notifications
You must be signed in to change notification settings - Fork 0
/
bug-repro
executable file
·40 lines (30 loc) · 1.16 KB
/
bug-repro
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
38
39
40
#!/bin/bash
set -eu
function do_lint {
pylint --recursive=y --disable=W,C0114,C0115,C0116,R0903 -s=n .
}
function error {
echo "ERROR:" "$*"
exit 1
}
echo
echo "========================================================================="
echo ">>> Running 'pylint' in a local folder"
echo " pylint is expected to fail..."
cd /code || exit 1
do_lint && error "ERROR: Expected to fail" || echo "PYLINT FAILED"
echo
echo "========================================================================="
echo ">>> Running 'pylint' in a mounted folder"
echo " for some reason, pylint succeeds when mounting a folder from MacOS host"
cd /mounted_code || error "Folder not mounted! use './run'"
do_lint && echo "PYLINT SUCCEEDED" \
|| error "ERROR: expected pylint to succeed on the mounted folder (on MacOS host)"
echo
echo "========================================================================="
echo ">>> RUNNING DIFF between folders"
diff -r /code /mounted_code && echo "Folders are identical" \
|| error "ERROR: folders are supposed to be identical"
echo
echo "========================================================================="
echo "BUG REPRODUCED SUCCESSFULLY!"