-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·33 lines (26 loc) · 852 Bytes
/
test.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
#!/bin/sh
set -e
pip -qq install pydantic
basedir="$(dirname "$0")"
workdir="$(mktemp -d)"
cleanup() {
echo "Cleaning up ..."
rm -rf "$workdir"
}
trap cleanup EXIT
echo -n "Test 1: single non-greedy model"
python "$basedir/generate.py" Offer > "$workdir/single_non_greedy.py"
python "$workdir/single_non_greedy.py"
echo ": pass"
echo -n "Test 2: multiple non-greedy models"
python "$basedir/generate.py" Product Offer QuantitativeValue > "$workdir/multiple_non_greedy.py"
python "$workdir/multiple_non_greedy.py"
echo ": pass"
echo -n "Test 3: single greedy model"
python "$basedir/generate.py" --greedy --skip-black Offer > "$workdir/single_greedy.py"
python "$workdir/single_greedy.py"
echo ": pass"
echo -n "Test 4: all models"
python "$basedir/generate.py" --skip-black all > "$workdir/all.py"
python "$workdir/all.py"
echo ": pass"