#!/bin/sh
set -e

mkdir build
cd build
cmake -Wno-dev ..
for i in \
    test_chatid test_toxid test_toxstring test_fileprogress test_textformatter \
    test_chatlinestorage test_paths test_dbschema test_dbTo11 \
    test_offlinemsgengine test_smileypack test_friendlistmanager \
    test_friendmessagedispatcher test_conferencemessagedispatcher \
    test_messageprocessor test_sessionchatlog test_exiftransform \
    test_notificationgenerator test_filesform test_generalform \
    test_posixsignalnotifier test_stacktrace; do
  make $i
done
make test
cd ..
rm -rf build
