diff --git a/lua/wire/zvm/tests/benchmark_page_bios.lua b/lua/wire/zvm/tests/benchmarks/benchmark_page_bios.lua similarity index 100% rename from lua/wire/zvm/tests/benchmark_page_bios.lua rename to lua/wire/zvm/tests/benchmarks/benchmark_page_bios.lua diff --git a/lua/wire/zvm/tests/benchmark_zasm_assembler.lua b/lua/wire/zvm/tests/benchmarks/benchmark_zasm_assembler.lua similarity index 100% rename from lua/wire/zvm/tests/benchmark_zasm_assembler.lua rename to lua/wire/zvm/tests/benchmarks/benchmark_zasm_assembler.lua diff --git a/lua/wire/zvm/zvm_tests.lua b/lua/wire/zvm/zvm_tests.lua index a038bbd..aeb5fc3 100644 --- a/lua/wire/zvm/zvm_tests.lua +++ b/lua/wire/zvm/zvm_tests.lua @@ -23,14 +23,20 @@ ZVMTestSuite = { } local testDirectory = "wire/zvm/tests" +local benchmarkDirectory = testDirectory.."/benchmarks" function ZVMTestSuite.CMDRun(_, _, _, names) ZVMTestSuite.Warnings = 0 ZVMTestSuite.TestFiles = {} + local subdirectory = "" for filename in string.gmatch(names, "[^,]+") do - local files = file.Find("lua/" .. testDirectory .. "/" .. filename .. ".lua", "GAME") + local files = file.Find("lua/" .. testDirectory .. "/" .. filename .. ".lua", "GAME") + if #files == 0 then + files = file.Find("lua/" .. benchmarkDirectory .. "/" .. filename .. ".lua", "GAME") + subdirectory = "/benchmarks/" + end for _, i in ipairs(files) do - ZVMTestSuite.TestFiles[#ZVMTestSuite.TestFiles+1] = i + ZVMTestSuite.TestFiles[#ZVMTestSuite.TestFiles+1] = subdirectory..i end end if #ZVMTestSuite.TestFiles == 0 and names ~= nil then