summaryrefslogtreecommitdiff
blob: 36698651c7d138496eaa7eda471352e4faf78f2a (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
From d689a1473977b0aa368590ba1f913521e4f466c7 Mon Sep 17 00:00:00 2001
From: Kent Fredric <kentfredric@gmail.com>
Date: Tue, 18 Jul 2017 16:02:26 +1200
Subject: [PATCH] Allow custom host/port configurations

---
 Build.PL           | 4 ++--
 t/DBTestHarness.pm | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Build.PL b/Build.PL
index ecc402e..a61190f 100755
--- a/Build.PL
+++ b/Build.PL
@@ -97,9 +97,9 @@ sub biosql_conf {
         or die "Error: could not write to config file '$config_file'\n";
     
     my %config = (driver     => $drivers[0],
-                  host       => '127.0.0.1',
+                  host       => $ENV{GENTOO_DB_HOSTNAME} || '127.0.0.1',
                   user       => 'root',
-                  port       => 3306,
+                  port       => $ENV{GENTOO_DB_PORT} || undef,
                   password   => '',
                   dbname     => 'bioseqdb',
                   database   => 'biosql',
diff --git a/t/DBTestHarness.pm b/t/DBTestHarness.pm
index b660429..91e0c54 100755
--- a/t/DBTestHarness.pm
+++ b/t/DBTestHarness.pm
@@ -47,9 +47,9 @@ my $counter=0;
 # Default settings as a hash
 my $dflt = {
     'driver'        => 'mysql',
-    'host'          => 'localhost',
+    'host'          => $ENV{GENTOO_DB_HOST} || 'localhost',
     'user'          => 'root',
-    'port'          => undef,
+    'port'          => $ENV{GENTOO_DB_PORT} || undef,
     'password'      => '',
     'schema_sql'    => ['../biosql-schema/sql/biosqldb-mysql.sql'],
     'database'      => 'biosql',
-- 
2.13.1