Removed line numbers from the SQL scripts output.
[gnucomo.git] / test / t0002a.sh
1 #!/bin/sh
2
3 #
4 #  Create an object 'kithira.andromeda.nl' in the database and
5 #  parse a piece of a syslog file.
6 #  This tests normal operation in which gcm_input reads a syslog file
7 #  directly.
8
9 LD_LIBRARY_PATH=/usr/local/pqxx/lib
10 export LD_LIBRARY_PATH
11
12 cd ..
13
14 if psql gnucomo_test -q <src/database/create.sql >/dev/null
15 then
16    psql gnucomo_test -q -c "insert into object (objectname) values ('kithira.andromeda.nl')"
17    psql gnucomo_test -c "select * from object"
18    src/gcm_input/gcm_input -c gnucomo_test -h kithira.andromeda.nl -d 'sep 5 2002 20:30:45' <test/messages
19    psql gnucomo_test -c "select * from log"
20    psql gnucomo_test -f src/database/destroy.sql -q
21    exit $result
22 else
23    echo Can not create test database
24    exit 1
25 fi