-
Notifications
You must be signed in to change notification settings - Fork 46
/
clean_integration.sh
executable file
·63 lines (46 loc) · 1.88 KB
/
clean_integration.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# Integration testing for the clean.py script
##### Two rows
make spotless > /dev/null
./parse.py -d test/fixtures/xml/ -p. -x ipg120327.two.xml
mkdir -p /tmp/integration/ipg120327.two
echo Starting clean...
python clean.py
echo Starting diffs...
for table in inventor inventor_1
do
sqlite3 -csv inventor.sqlite3 "select * from ${table}" > /tmp/integration/ipg120327.two/${table}.csv
diff test/integration/clean/ipg120327.two/${table}.csv /tmp/integration/ipg120327.two/${table}.csv
done
for table in assignee assignee_1 grp wrd
do
sqlite3 -csv assignee.sqlite3 "select * from ${table}" > /tmp/integration/ipg120327.two/${table}.csv
diff test/integration/clean/ipg120327.two/${table}.csv /tmp/integration/ipg120327.two/${table}.csv
done
for table in patent
do
sqlite3 -csv patent.sqlite3 "select * from ${table}" > /tmp/integration/ipg120327.two/${table}.csv
diff test/integration/clean/ipg120327.two/${table}.csv /tmp/integration/ipg120327.two/${table}.csv
done
#### 18 rows
make spotless > /dev/null
./parse.py -d test/fixtures/xml/ -p. -x ipg120327.18.xml
mkdir -p /tmp/integration/ipg120327.18
echo Starting clean...
python clean.py
echo Starting diffs...
for table in inventor inventor_1
do
sqlite3 -csv inventor.sqlite3 "select * from ${table}" > /tmp/integration/ipg120327.18/${table}.csv
diff test/integration/clean/ipg120327.18/${table}.csv /tmp/integration/ipg120327.18/${table}.csv
done
for table in assignee assignee_1 grp wrd
do
sqlite3 -csv assignee.sqlite3 "select * from ${table}" > /tmp/integration/ipg120327.18/${table}.csv
diff test/integration/clean/ipg120327.18/${table}.csv /tmp/integration/ipg120327.18/${table}.csv
done
for table in patent
do
sqlite3 -csv patent.sqlite3 "select * from ${table}" > /tmp/integration/ipg120327.18/${table}.csv
diff test/integration/clean/ipg120327.18/${table}.csv /tmp/integration/ipg120327.18/${table}.csv
done