summaryrefslogtreecommitdiffstats
path: root/pts/test-resources/sqlite/install.sh
blob: 4cc12967a754a37c463368cc8a8659b1c19c5e2a (plain)
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
#!/bin/sh

tar -xvf pts-sqlite-tests-1.tar.gz
tar -xvf sqlite-3.6.3.tar.gz

cd sqlite-3.6.3/
./configure
make -j $NUM_CPU_JOBS
cd ..

echo "#!/bin/sh
cat sqlite-2500-insertions.txt | ./sqlite-3.6.3/sqlite3 benchmark.db
cat sqlite-2500-insertions.txt | ./sqlite-3.6.3/sqlite3 benchmark.db
cat sqlite-2500-insertions.txt | ./sqlite-3.6.3/sqlite3 benchmark.db
cat sqlite-2500-insertions.txt | ./sqlite-3.6.3/sqlite3 benchmark.db
cat sqlite-2500-insertions.txt | ./sqlite-3.6.3/sqlite3 benchmark.db" > sqlite-inserts
chmod +x sqlite-inserts

echo "#!/bin/sh
rm -f benchmark.db
./sqlite-3.6.3/sqlite3 benchmark.db  \"CREATE TABLE pts1 ('I' SMALLINT NOT NULL, 'DT' TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, 'F1' VARCHAR(4) NOT NULL, 'F2' VARCHAR(16) NOT NULL);\"
\$TIMER_START
./sqlite-inserts 2>&1
\$TIMER_STOP
rm -f benchmark.db" > sqlite
chmod +x sqlite