blob: 6cebdac158483d51d7181061ddd6e0eebb8498b1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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();
|