From eb605c245907f8bb3102ce28db11eaacaa98869b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Dahlgren?= Date: Mon, 10 May 2021 18:47:41 +0200 Subject: [PATCH] Use spawn for all unit tests --- addons/arrays/test.sqf | 5 ++--- addons/common/test.sqf | 5 ++--- addons/diagnostic/test.sqf | 5 ++--- addons/events/test.sqf | 5 ++--- addons/hashes/test.sqf | 5 ++--- addons/jr/test.sqf | 5 ++--- addons/main/test.sqf | 5 ++--- addons/network/test.sqf | 5 ++--- addons/strings/test.sqf | 5 ++--- addons/vectors/test.sqf | 5 ++--- 10 files changed, 20 insertions(+), 30 deletions(-) diff --git a/addons/arrays/test.sqf b/addons/arrays/test.sqf index 8c27ad384c..34031e4c1a 100644 --- a/addons/arrays/test.sqf +++ b/addons/arrays/test.sqf @@ -13,7 +13,6 @@ SCRIPT(test-arrays); LOG("=== Testing Arrays ==="); { - call compile preprocessFileLineNumbers format ["\x\cba\addons\arrays\test_%1.sqf", _x]; + private _test = 0 spawn compile preprocessFileLineNumbers format ["\x\cba\addons\arrays\test_%1.sqf", _x]; + waitUntil { scriptDone _test }; } forEach TESTS; - -nil; diff --git a/addons/common/test.sqf b/addons/common/test.sqf index cb2e6f88c7..1c32d185f5 100644 --- a/addons/common/test.sqf +++ b/addons/common/test.sqf @@ -14,7 +14,6 @@ SCRIPT(test-common); LOG("=== Testing Common ==="); { - call compile preprocessFileLineNumbers format ["\x\cba\addons\common\test_%1.sqf", _x]; + private _test = 0 spawn compile preprocessFileLineNumbers format ["\x\cba\addons\common\test_%1.sqf", _x]; + waitUntil { scriptDone _test }; } forEach TESTS; - -nil; diff --git a/addons/diagnostic/test.sqf b/addons/diagnostic/test.sqf index 6234af86de..ed7bd62d38 100644 --- a/addons/diagnostic/test.sqf +++ b/addons/diagnostic/test.sqf @@ -14,7 +14,6 @@ SCRIPT(test-diagnostic); LOG("=== Testing Diagnostic ==="); { - call compile preprocessFileLineNumbers format ["\x\cba\addons\diagnostic\test_%1.sqf", _x]; + private _test = 0 spawn compile preprocessFileLineNumbers format ["\x\cba\addons\diagnostic\test_%1.sqf", _x]; + waitUntil { scriptDone _test }; } forEach TESTS; - -nil; diff --git a/addons/events/test.sqf b/addons/events/test.sqf index 69826b8e18..e418085d6b 100644 --- a/addons/events/test.sqf +++ b/addons/events/test.sqf @@ -14,7 +14,6 @@ SCRIPT(test-events); LOG("=== Testing Events ==="); { - 0 spawn compile preprocessFileLineNumbers format ["\x\cba\addons\events\test_%1.sqf", _x]; + private _test = 0 spawn compile preprocessFileLineNumbers format ["\x\cba\addons\events\test_%1.sqf", _x]; + waitUntil { scriptDone _test }; } forEach TESTS; - -nil diff --git a/addons/hashes/test.sqf b/addons/hashes/test.sqf index 45db263d52..70d45c1314 100644 --- a/addons/hashes/test.sqf +++ b/addons/hashes/test.sqf @@ -14,7 +14,6 @@ SCRIPT(test-hashes); LOG("=== Testing Hashes ==="); { - 0 spawn compile preprocessFileLineNumbers format ["\x\cba\addons\hashes\test_%1.sqf", _x]; + private _test = 0 spawn compile preprocessFileLineNumbers format ["\x\cba\addons\hashes\test_%1.sqf", _x]; + waitUntil { scriptDone _test }; } forEach TESTS; - -nil diff --git a/addons/jr/test.sqf b/addons/jr/test.sqf index c05e27c197..82322747ab 100644 --- a/addons/jr/test.sqf +++ b/addons/jr/test.sqf @@ -14,7 +14,6 @@ SCRIPT(test-jr); LOG("=== Testing JR ==="); { - call compile preprocessFileLineNumbers format ["\x\cba\addons\jr\test_%1.sqf", _x]; + private _test = 0 spawn compile preprocessFileLineNumbers format ["\x\cba\addons\jr\test_%1.sqf", _x]; + waitUntil { scriptDone _test }; } forEach TESTS; - -nil; diff --git a/addons/main/test.sqf b/addons/main/test.sqf index 24fd28bbe6..f81d5d6a18 100644 --- a/addons/main/test.sqf +++ b/addons/main/test.sqf @@ -14,7 +14,6 @@ SCRIPT(test); LOG("===--- Testing ---==="); { - call compile preprocessFileLineNumbers format ["\x\cba\addons\%1\test.sqf", _x]; + private _test = 0 spawn compile preprocessFileLineNumbers format ["\x\cba\addons\%1\test.sqf", _x]; + waitUntil { scriptDone _test }; } forEach CATEGORIES; - -nil; diff --git a/addons/network/test.sqf b/addons/network/test.sqf index bb8a451680..44eae3c859 100644 --- a/addons/network/test.sqf +++ b/addons/network/test.sqf @@ -14,7 +14,6 @@ SCRIPT(test-network); LOG("=== Testing Network ==="); { - call compile preprocessFileLineNumbers format ["\x\cba\addons\network\test_%1.sqf", _x]; + private _test = 0 spawn compile preprocessFileLineNumbers format ["\x\cba\addons\network\test_%1.sqf", _x]; + waitUntil { scriptDone _test }; } forEach TESTS; - -nil; diff --git a/addons/strings/test.sqf b/addons/strings/test.sqf index 815dd9cc5a..017eca7ffb 100644 --- a/addons/strings/test.sqf +++ b/addons/strings/test.sqf @@ -14,7 +14,6 @@ SCRIPT(test-strings); LOG("=== Testing Strings ==="); { - call compile preprocessFileLineNumbers format ["\x\cba\addons\strings\test_%1.sqf", _x]; + private _test = 0 spawn compile preprocessFileLineNumbers format ["\x\cba\addons\strings\test_%1.sqf", _x]; + waitUntil { scriptDone _test }; } forEach TESTS; - -nil diff --git a/addons/vectors/test.sqf b/addons/vectors/test.sqf index 9fada91e35..7679be28ad 100644 --- a/addons/vectors/test.sqf +++ b/addons/vectors/test.sqf @@ -14,7 +14,6 @@ SCRIPT(test-vectors); LOG("=== Testing Vectors ==="); { - call compile preprocessFileLineNumbers format ["\x\cba\addons\vectors\test_%1.sqf", _x]; + private _test = 0 spawn compile preprocessFileLineNumbers format ["\x\cba\addons\vectors\test_%1.sqf", _x]; + waitUntil { scriptDone _test }; } forEach TESTS; - -nil;