#!/bin/bash
set -xueo pipefail
export LANG=C LC_ALL=C

USR_PATH=/usr
VAR_PATH=/var

set_up() {
  ./autogen.sh
  ./configure --prefix=$USR_PATH --localstatedir=$VAR_PATH --enable-zookeeper --disable-corosync --enable-unittest
  make
  sudo make install
}

exec_functional() {
  sudo ./tests/functional/check -g
}

tear_down() {
  make clean
}

#main
set_up
exec_functional
tear_down
