-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathconsolidate_integration.sh
executable file
·79 lines (60 loc) · 2.48 KB
/
consolidate_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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
# Integration testing for the consolidate.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 consolidate...
python consolidate.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/consolidate/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/consolidate/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/consolidate/ipg120327.two/${table}.csv /tmp/integration/ipg120327.two/${table}.csv
done
for table in invpat
do
sqlite3 -csv invpat.sqlite3 "select * from ${table}" > /tmp/integration/ipg120327.two/${table}.csv
diff test/integration/consolidate/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 consolidate...
python consolidate.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/consolidate/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/consolidate/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/consolidate/ipg120327.18/${table}.csv /tmp/integration/ipg120327.18/${table}.csv
done
for table in invpat
do
sqlite3 -csv invpat.sqlite3 "select * from ${table}" > /tmp/integration/ipg120327.18/${table}.csv
diff test/integration/consolidate/ipg120327.18/${table}.csv /tmp/integration/ipg120327.18/${table}.csv
done