script make-test pour faire les tests;

This commit is contained in:
fpeters 2003-08-31 14:46:20 +00:00
parent 71bd9b0e77
commit af200a3f87
2 changed files with 23 additions and 10 deletions

View File

@ -153,16 +153,16 @@ config-system:
for F in `$(FIND) tmp-system -name "*.py"`; \
do \
cp $$F /tmp/glasnost-source; \
cat /tmp/glasnost-source | sed -e "s/^glasnostPythonDir = .*/glasnostPythonDir = '$(LIBS_DIR_QUOTED)'/g" > tmp-system/`basename $$F`; \
cat /tmp/glasnost-source | sed -e "s/^glasnostPythonDir = .*/glasnostPythonDir = '$(LIBS_DIR_QUOTED)'/g" > $$F; \
rm /tmp/glasnost-source; \
done
config-tests:
rm -rf tmp-tests && mkdir -f tmp-tests
rm -rf tmp-tests && cp -R tests tmp-tests
for F in `$(FIND) tmp-tests -name "*.py"`; \
do \
cp $$F /tmp/glasnost-source; \
cat /tmp/glasnost-source | sed -e "s/^glasnostPythonDir = .*/glasnostPythonDir = '$(LIBS_DIR_QUOTED)'/g" > `basename $$F`; \
cat /tmp/glasnost-source | sed -e "s/^glasnostPythonDir = .*/glasnostPythonDir = '$(LIBS_DIR_QUOTED)'/g" > $$F; \
rm /tmp/glasnost-source; \
done
@ -340,9 +340,9 @@ install-templates:
install-tests:
@echo "Cleaning..."
@$(MAKE) GLASNOST=glasnost-tests PORT=8500 dist-clean
@echo "Installing/Updating /etc/hosts entries"
@grep /etc/hosts -e "127.0.0.1 glasnost-test" -q && cat /etc/hosts | sed -e "s/^127.0.0.1 glasnost-test.*/127.0.0.1 glasnost-test1 glasnost-test2 glasnost-test3/g" > /tmp/hosts-tmp || echo "127.0.0.1 glasnost-test1 glasnost-test2 glasnost-test3" >> /etc/hosts
@test -e /tmp/hosts-tmp && mv /tmp/hosts-tmp /etc/hosts
#@echo "Installing/Updating /etc/hosts entries"
#@grep /etc/hosts -e "127.0.0.1 glasnost-test" -q && cat /etc/hosts | sed -e "s/^127.0.0.1 glasnost-test.*/127.0.0.1 glasnost-test1 glasnost-test2 glasnost-test3/g" > /tmp/hosts-tmp || echo "127.0.0.1 glasnost-test1 glasnost-test2 glasnost-test3" >> /etc/hosts
#@test -e /tmp/hosts-tmp && mv /tmp/hosts-tmp /etc/hosts
# @echo "Installing/Updating config Dispacher URLs entries"
# @cat config | sed -e "s/^DispatcherURLs.*/DispatcherURLs = glasnost:\/\/glasnost-test1, glasnost:\/\/glasnost-test2, glasnost:\/\/glasnost-test3/g" > config.tmp
# @mv config.tmp config
@ -438,12 +438,12 @@ rpm-depend:
run-tests:
@echo "Launching tests..."
@tests/tests-start $(TESTS_SUITE)
cd tmp-tests && ./launch.py $(TESTS_SUITE)
setup-tests:
@echo "Launching Glasnost Test environment..."
@glasnost-tests stop
@glasnost-tests start
$(SBIN_DIR)/glasnost-tests stop
$(SBIN_DIR)/glasnost-tests start
system:
@echo "Stopping server for system generation..."
@ -475,6 +475,7 @@ system:
tests: uninstall-tests \
install-tests \
setup-tests \
run-tests
uninstall:
@ -496,4 +497,5 @@ uninstall:
uninstall-tests:
@glasnost-tests stop || exit 0
@$(MAKE) GLASNOST=glasnost-tests PORT=8500 uninstall
rm -rf /var/lib/glasnost-tests
rm -rf $(VARDIR)/glasnost-tests

11
make-tests Executable file
View File

@ -0,0 +1,11 @@
#! /bin/sh
mkdir root-tests
make tests 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`
rm -rf root-tests