summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-07-19 18:17:59 +0200
committerHaru <haru@dotalux.com>2016-08-19 21:32:19 +0200
commitdc2130b51371cc022d1feea66cb185082e8462b9 (patch)
tree34014256ec06cb9fd661c4ce3792673c2a7058d8
parent654bfa03503da8c5ec86fa0b67baab0e534232a3 (diff)
downloadhercules-dc2130b51371cc022d1feea66cb185082e8462b9.tar.gz
hercules-dc2130b51371cc022d1feea66cb185082e8462b9.tar.bz2
hercules-dc2130b51371cc022d1feea66cb185082e8462b9.tar.xz
hercules-dc2130b51371cc022d1feea66cb185082e8462b9.zip
Updated Travis script to work with the new configuration files
Signed-off-by: Haru <haru@dotalux.com>
-rwxr-xr-xtravis.sh68
1 files changed, 41 insertions, 27 deletions
diff --git a/travis.sh b/travis.sh
index 269395312..10d263e49 100755
--- a/travis.sh
+++ b/travis.sh
@@ -99,35 +99,49 @@ case "$MODE" in
make plugin.script_mapquit -j3 || aborterror "Build failed."
;;
test)
- cat >> conf/import/login_conf.txt << EOF
-ipban.sql.db_username: $DBUSER
-ipban.sql.db_password: $DBPASS
-ipban.sql.db_database: $DBNAME
-account.sql.db_username: $DBUSER
-account.sql.db_password: $DBPASS
-account.sql.db_database: $DBNAME
-account.sql.db_hostname: localhost
+ cat > conf/travis_sql_connection.conf << EOF
+sql_connection: {
+ //default_codepage: ""
+ //case_sensitive: false
+ db_hostname: "localhost"
+ db_username: "$DBUSER"
+ db_password: "$DBPASS"
+ db_database: "$DBNAME"
+ //codepage:""
+}
+EOF
+ [ $? -eq 0 ] || aborterror "Unable to write database configuration, aborting tests."
+ cat > conf/import/login-server.conf << EOF
+login_configuration: {
+ account: {
+ @include "conf/travis_sql_connection.conf"
+ ipban: {
+ @include "conf/travis_sql_connection.conf"
+ }
+ }
+}
+EOF
+ [ $? -eq 0 ] || aborterror "Unable to override login-server configuration, aborting tests."
+ cat > conf/import/char-server.conf << EOF
+char_configuration: {
+ @include "conf/travis_sql_connection.conf"
+}
+EOF
+ [ $? -eq 0 ] || aborterror "Unable to override char-server configuration, aborting tests."
+ cat > conf/import/map-server.conf << EOF
+map_configuration: {
+ @include "conf/travis_sql_connection.conf"
+}
EOF
- [ $? -eq 0 ] || aborterror "Unable to import configuration, aborting tests."
- cat >> conf/import/inter_conf.txt << EOF
-sql.db_username: $DBUSER
-sql.db_password: $DBPASS
-sql.db_database: $DBNAME
-sql.db_hostname: localhost
-char_server_id: $DBUSER
-char_server_pw: $DBPASS
-char_server_db: $DBNAME
-char_server_ip: localhost
-map_server_id: $DBUSER
-map_server_pw: $DBPASS
-map_server_db: $DBNAME
-map_server_ip: localhost
-log_db_id: $DBUSER
-log_db_pw: $DBPASS
-log_db_db: $DBNAME
-log_db_ip: localhost
+ [ $? -eq 0 ] || aborterror "Unable to override map-server configuration, aborting tests."
+ cat > conf/import/inter-server.conf << EOF
+inter_configuration: {
+ log: {
+ @include "conf/travis_sql_connection.conf"
+ }
+}
EOF
- [ $? -eq 0 ] || aborterror "Unable to import configuration, aborting tests."
+ [ $? -eq 0 ] || aborterror "Unable to override inter-server configuration, aborting tests."
ARGS="--load-script npc/dev/test.txt "
ARGS="--load-plugin script_mapquit $ARGS --load-script npc/dev/ci_test.txt"
PLUGINS="--load-plugin HPMHooking --load-plugin sample"