donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

test.sh (873B)


      1 #!/bin/bash
      2 set -evu
      3 
      4 apt-get update
      5 apt-get upgrade -yqq
      6 
      7 ./bootstrap
      8 ./configure CFLAGS="-ggdb -O0" \
      9       --prefix=/usr/local \
     10       --libdir=lib \
     11 	    --enable-logging=verbose \
     12 	    --disable-doc
     13 make
     14 make install
     15 
     16 PG_BIN="$(pg_config --bindir)"
     17 PG_ETC="$(pg_config --sharedir | sed 's|/usr/share/postgresql|/etc/postgresql|')"
     18 sudo -u postgres "${PG_BIN}/postgres" -D ${PG_ETC}/main -h localhost -p 5432 &
     19 
     20 sleep 10
     21 sudo -u postgres createuser -p 5432 root
     22 sudo -u postgres createdb -p 5432 -O root donaucheck
     23 sudo -u postgres createdb -p 5432 -O root talercheck
     24 
     25 check_command()
     26 {
     27 	# Set LD_LIBRARY_PATH so tests can find the installed libs
     28 	LD_LIBRARY_PATH=/usr/local/lib PGPORT=5432 make allcheck
     29 }
     30 
     31 print_logs()
     32 {
     33     set +e
     34 	log=build/meson-logs/testlog-all.txt
     35 		echo "Printing ${log}"
     36         cat "$log"
     37 }
     38 
     39 
     40 if ! check_command ; then
     41 	print_logs
     42 	exit 1
     43 fi