Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 78103d8

Browse files
committed
[[ Benchmarks ]] Fix bug in 'run <folder>'
The order of processing command options was causing the wrong thing to be done for 'run <file>'. The <folder> was not being passed through to the script file listing function causing it to not actually work as advertised.
1 parent 72a2bca commit 78103d8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

benchmarks/_benchmarkrunner.livecodescript

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ private command doRun pInfo
114114
local tScript, tCommand, tLog
115115
put pInfo["args"][2] into tScript
116116
put pInfo["args"][3] into tCommand
117-
if tScript is empty or there is a folder tScript then
118-
runAllScripts pInfo, tScript
119-
else if tCommand is empty then
117+
if tCommand is not empty then
118+
runSingleCommand pInfo, tScript, tCommand
119+
else if tScript is not empty and there is no folder tScript then
120120
runSingleScript pInfo, tScript
121121
else
122-
runSingleCommand pInfo, tScript, tCommand
122+
runAllScripts pInfo, tScript
123123
end if
124124

125125
put the result into tLog
@@ -191,7 +191,7 @@ end invokeGetLibraryStack
191191
-- directory
192192
private command runAllScripts pInfo, pFolder
193193
local tFile, tLog
194-
repeat for each element tFile in runGetBenchmarkFileNames()
194+
repeat for each element tFile in runGetBenchmarkFileNames(pFolder)
195195
runSingleScript pInfo, tFile
196196
put the result after tLog
197197
end repeat
@@ -263,7 +263,7 @@ private function runGetBenchmarkFileNames pFolder
263263
put empty into tFiles
264264
put 0 into tCount
265265

266-
runGetBenchmarkFileNames_Recursive the defaultfolder & slash & pFolder, empty, tFiles, tCount
266+
runGetBenchmarkFileNames_Recursive the defaultfolder & slash & pFolder, pFolder, tFiles, tCount
267267

268268
return tFiles
269269
end runGetBenchmarkFileNames

0 commit comments

Comments
 (0)