From bf6beb5f4374938b20af65af76003376d9ea0ffd Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Fri, 9 Nov 2007 15:54:04 +0000 Subject: * started to work on configDB-tests git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1407 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/t/run-all-tests.pl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 config-db/t/run-all-tests.pl (limited to 'config-db/t/run-all-tests.pl') diff --git a/config-db/t/run-all-tests.pl b/config-db/t/run-all-tests.pl new file mode 100755 index 00000000..6cebdac1 --- /dev/null +++ b/config-db/t/run-all-tests.pl @@ -0,0 +1,32 @@ +#!/usr/bin/perl + +use warnings; +use strict; + +use Test::Harness; + +# add the development paths to perl's search path for modules: +use FindBin; +use lib "$FindBin::RealBin/../"; +use lib "$FindBin::RealBin/../../lib"; + +use OpenSLX::Basics; + +use OpenSLX::MetaDB::SQLite; + +# make sure a specific test-db will be used +$cmdlineConfig{'private-path'} = $ENV{SLX_PRIVATE_PATH} = '/tmp/slx-db-test'; +$cmdlineConfig{'db-name'} = $ENV{SLX_DB_NAME} = 'slx-test'; +$cmdlineConfig{'db-type'} = $ENV{SLX_DB_TYPE} = 'SQLite'; + +openslxInit(); + +# remove the test-db if it already exists +my $metaDB = OpenSLX::MetaDB::SQLite->new(); +if ($metaDB->databaseExists()) { + print "removing leftovers of slx-test-db\n"; + $metaDB->dropDatabase(); +} +runtests(glob("*.t")); + +$metaDB->dropDatabase(); -- cgit v1.2.3-55-g7522