diff options
author | Oliver Tappe | 2007-11-09 16:54:04 +0100 |
---|---|---|
committer | Oliver Tappe | 2007-11-09 16:54:04 +0100 |
commit | bf6beb5f4374938b20af65af76003376d9ea0ffd (patch) | |
tree | 256ba47b2976b0782317112d99fd0ee3c67312ae /config-db/t/run-all-tests.pl | |
parent | * added default debconf database for openslx systems based on (diff) | |
download | core-bf6beb5f4374938b20af65af76003376d9ea0ffd.tar.gz core-bf6beb5f4374938b20af65af76003376d9ea0ffd.tar.xz core-bf6beb5f4374938b20af65af76003376d9ea0ffd.zip |
* started to work on configDB-tests
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1407 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/t/run-all-tests.pl')
-rwxr-xr-x | config-db/t/run-all-tests.pl | 32 |
1 files changed, 32 insertions, 0 deletions
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(); |