forked from RustPython/RustPython
-
Notifications
You must be signed in to change notification settings - Fork 0
/
whats_left.sh
executable file
·43 lines (35 loc) · 880 Bytes
/
whats_left.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
38
39
40
41
42
43
#!/bin/bash
set -e
ALL_SECTIONS=(methods modules)
GREEN='[32m'
BOLD='[1m'
NC='(B[m'
h() {
# uppercase input
header_name=$(echo "$@" | tr "[:lower:]" "[:upper:]")
echo "$GREEN$BOLD===== $header_name =====$NC"
}
cd "$(dirname "$0")"
(
cd tests
# -I means isolate from environment; we don't want any pip packages to be listed
python3 -I not_impl_gen.py
)
# show the building first, so people aren't confused why it's taking so long to
# run whats_left_to_implement
cargo build --release
if [ $# -eq 0 ]; then
sections=(${ALL_SECTIONS[@]})
else
sections=($@)
fi
for section in "${sections[@]}"; do
section=$(echo "$section" | tr "[:upper:]" "[:lower:]")
snippet=tests/snippets/whats_left_$section.py
if ! [[ -f $snippet ]]; then
echo "Invalid section $section" >&2
continue
fi
h "$section" >&2
cargo run --release -q -- "$snippet"
done