Skip to content

Commit

Permalink
Merge pull request #6 from Muriel-Salvan/dont_rerun_tests
Browse files Browse the repository at this point in the history
Don't run tests already having a status, and mark tests started
  • Loading branch information
Muriel-Salvan authored Jan 11, 2021
2 parents 42a0f7b + d50fe4c commit 7a66819
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Data/Source/Scripts/AutoTest_Suite.psc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ function BeforeTestsRun()
; To be overriden
endFunction

; Run a given registered test
; Run a given registered test.
; Set the status in this method.
; [API] This function is mandatory
;
; Parameters::
Expand Down
3 changes: 2 additions & 1 deletion Data/Source/Scripts/AutoTest_Suite_Locations.psc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ function BeforeTestsRun()
ConsoleUtil.ExecuteCommand("setini \"bForceAutoVanityMode:Camera\" 1")
endFunction

; Run a given registered test
; Run a given registered test.
; Set the status in this method.
; [API] This function is mandatory
;
; Parameters::
Expand Down
3 changes: 2 additions & 1 deletion Data/Source/Scripts/AutoTest_Suite_NPCs.psc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ function BeforeTestsRun()
ConsoleUtil.ExecuteCommand("tai")
endFunction

; Run a given registered test
; Run a given registered test.
; Set the status in this method.
; [API] This function is mandatory
;
; Parameters::
Expand Down
3 changes: 2 additions & 1 deletion Data/Source/Scripts/AutoTest_TestsRunner.psc
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ function RunTests(Quest questScript) global
while idxTest < nbrTests && InTestsSession()
string testName = scriptTest.GetTestName(idxTest)
string testStatus = scriptTest.GetTestStatus(testName)
if testStatus != "ok"
if testStatus == "" || testStatus == "started"
AutoTest_Log.Log("[ " + testType + " / " + testName + " (" + testStatus + ") ] - Start test")
scriptTest.SetTestStatus(testName, "started")
scriptTest.RunTest(testName)
AutoTest_Log.Log("[ " + testType + " / " + testName + " (" + scriptTest.GetTestStatus(testName) + ") ] - Test end")
endIf
Expand Down

0 comments on commit 7a66819

Please sign in to comment.