From 426aeee0760e7ad57acf99f9c8f5ba6e9ef217e0 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 16 Feb 2015 16:59:07 +0100 Subject: [PATCH] Make tests return the number of errors as exit code. --- scripts/run-tests-e3.lua | 3 ++- scripts/run-tests.lua | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/run-tests-e3.lua b/scripts/run-tests-e3.lua index 3e5ecdcb2..c201d8750 100644 --- a/scripts/run-tests-e3.lua +++ b/scripts/run-tests-e3.lua @@ -16,4 +16,5 @@ require 'lunit' eressea.settings.set("rules.alliances", "0") rules = require('eressea.' .. config.rules) -lunit.main() +result = lunit.main() +return result.errors diff --git a/scripts/run-tests.lua b/scripts/run-tests.lua index a230f8e97..5583ef673 100644 --- a/scripts/run-tests.lua +++ b/scripts/run-tests.lua @@ -10,4 +10,5 @@ require 'eressea' require 'eressea.path' require 'tests' require 'lunit' -lunit.main() +result = lunit.main() +return result.errors