mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-23 04:57:17 +01:00
Working on integration tests
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#define TGS_EXTERNAL_CONFIGURATION
|
||||
#define TGS_DEFINE_AND_SET_GLOBAL(Name, Value) var/##Name = ##Value
|
||||
#define TGS_READ_GLOBAL(Name) global.##Name
|
||||
#define TGS_WRITE_GLOBAL(Name, Value) global.##Name = ##Value
|
||||
#define TGS_PROTECT_DATUM(Path)
|
||||
#define TGS_WORLD_ANNOUNCE(message) world << ##message
|
||||
#define TGS_INFO_LOG(message) world.log << "Info: [##message]"
|
||||
#define TGS_WARNING_LOG(message) world.log << "Warn: [##message]"
|
||||
#define TGS_ERROR_LOG(message) world.log << "Err: [##message]"
|
||||
#define TGS_NOTIFY_ADMINS(event)
|
||||
#define TGS_CLIENT_COUNT 0
|
||||
@@ -0,0 +1,36 @@
|
||||
/world/New()
|
||||
TgsNew()
|
||||
StartAsync()
|
||||
|
||||
/proc/StartAsync()
|
||||
set waitfor = FALSE
|
||||
sleep(100)
|
||||
TgsInitializationComplete()
|
||||
|
||||
/world/Topic(T, Addr, Master, Keys)
|
||||
TGS_TOPIC
|
||||
|
||||
/world/Reboot(reason)
|
||||
TgsReboot()
|
||||
|
||||
/proc/message_admins(event)
|
||||
event = "Admins: [event]"
|
||||
world << event
|
||||
world.log << event
|
||||
|
||||
var/list/clients = list()
|
||||
|
||||
/client/New()
|
||||
clients += src
|
||||
return ..()
|
||||
|
||||
/client/Del()
|
||||
clients -= src
|
||||
return ..()
|
||||
|
||||
/datum/tgs_chat_command/echo
|
||||
name = "echo"
|
||||
help_text = "echos input parameters"
|
||||
|
||||
/datum/tgs_chat_command/echo/Run(datum/tgs_chat_user/sender, params)
|
||||
return "[sender.channel.connection_name]|[sender.channel.friendly_name]|[sender.friendly_name]: [params]"
|
||||
@@ -0,0 +1,17 @@
|
||||
// Hand crafted DME, will not work if saved with DreamMaker
|
||||
|
||||
// BEGIN_INTERNALS
|
||||
// END_INTERNALS
|
||||
|
||||
// BEGIN_FILE_DIR
|
||||
#define FILE_DIR .
|
||||
// END_FILE_DIR
|
||||
|
||||
// BEGIN_PREFERENCES
|
||||
// END_PREFERENCES
|
||||
|
||||
// BEGIN_INCLUDE
|
||||
#include "Config.dm"
|
||||
#include "..\tgs_include.dm"
|
||||
#include "Test.dm"
|
||||
// END_INCLUDE
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
retval=1
|
||||
source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup
|
||||
|
||||
if hash DreamMaker 2>/dev/null
|
||||
then
|
||||
DreamMaker $DMEName 2>&1 | tee result.log
|
||||
retval=$?
|
||||
if ! grep '\- 0 errors, 0 warnings' result.log
|
||||
then
|
||||
retval=1 #hard fail, due to warnings or errors
|
||||
fi
|
||||
else
|
||||
echo "Couldn't find the DreamMaker executable, aborting."
|
||||
retval=2
|
||||
fi
|
||||
exit $retval
|
||||
Reference in New Issue
Block a user