This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
glasnost/make-tests

32 lines
981 B
Bash
Executable File

#! /bin/sh
if [ -d root-tests ]
then
echo "Deleting old test environment..."
rm -rf root-tests
fi
echo "Installing test environment in root-tests/"
rm -rf root-tests && mkdir root-tests 2> /dev/null
rm config && make config config-tests install \
GLASNOST=glasnost-tests PORT=8500 \
PREFIX=`pwd`/root-tests/usr/local \
VARPREFIX=`pwd`/root-tests/var/lib/ \
ETC_DIR=`pwd`/root-tests/etc/glasnost-tests \
LOGPREFIX=`pwd`/root-tests/var/log \
SERVER_USER=`id -u` SERVER_GROUP=`id -u` \
WEB_USER=`id -u` WEB_GROUP=`id -u` &> /dev/null
SERVERS="Dispatcher ArticlesServer AtomsServer AuthenticationServer \
AuthenticationLoginPasswordServer CardsServer DataflowsServer \
GroupsServer PeopleServer VirtualHostsServer"
echo "Starting Glasnost servers..."
for SERVER in $SERVERS
do
root-tests/usr/local/sbin/glasnost-tests-ctl start-one $SERVER
done
(cd tmp-tests && python ./tests.py)
root-tests/usr/local/sbin/glasnost-tests-ctl stop