You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.5 KiB
46 lines
1.5 KiB
7 years ago
|
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
|
||
|
|