Closed SnorlaxAssist closed 7 months ago
I've been busy moving so I didn't have time to take a look at any pull requests. I'm not completely sure how github actions or lune works but we should prefer writing the test suite in C++ to properly take advantage of the compiler and vm. I don't think lune allows for us to setup vectorCtor
and other requirements that future tests will require. In 1-2 weeks I'll probably be available to take a look at this.
I agree, that actually would be more accurate. Lune is rust based, a runtime similar to nodejs(but somewhat smaller).
Edit 1: I only used a switched to lune because I saw you were using regular lua
test case, thus the new test system is in luau
.
Edit 2: I would assume C++ test case would be based on luau
's own main test
I checked vectorCtor
in luau source, I'm not sure what use it has for FIU, since FIU is always interpreted. The only use I seen for vectorCtor
is for Luau's CodeGen, for standard interpreted compile, it is converted into GETIMPORT.
CodeGen: Such that vectorCtor = "vector"
& vectorLib = "vector"
would use Vector based CPU Instructions.
VM: Such that vectorCtor = "new"
& vectorLib = "Vector3"
would be GETIMPORT [Vector3.new]
in bytecode.
Ref:
I checked
vectorCtor
in luau source, I'm not sure what use it has for FIU, since FIU is always interpreted. The only use I seen forvectorCtor
is for Luau's CodeGen, for standard interpreted compile, it is converted into GETIMPORT.
Thankfully the actual interpreter Fiu has never needs to interact with vectorCtor
however our deserializer needs to accept vectorCtor
if we want to accept vector constants. Which goes back to also why having a C++ test suite would make life easier since we can both compile tests with our own ctor and also run the test with it.
Wouldn't that be the constant vector, it should be a simple thing to add, Luau to my knowledge has a most of 4 axis vector, x, y, z, w, I have made those changes in my local Fiu version that has those Vector support.
Edit: You are right though, we would need a vectorCtor
test so that we can generate Vector constants in the Fiu deserializer process.
Edit2: I could make an issue request on lune
to add vectorCtor
and vectorLib
support in Luau Compile options.
Wouldn't that be the constant vector, it should be a simple thing to add, Luau to my knowledge has a most of 4 axis vector, x, y, z, w, I have made those changes in my local Fiu version that has those Vector support.
While we could substitute a table for it we're assuming Fiu is not always running on Roblox intentionally, which is why we need to accept vectorCtor
ourselves to deserialize.
I could make an issue request on lune to add vectorCtor and vectorLib support in Luau Compile options.
I'd rather be able to directly adjust settings through C++ rather than having to rely on a Luau runner, we can more reliably plug our tests in that way.
Understandable, I do like the idea of custom runtime provider for these tests.
New Test Suite Workflow migrated from lune runtime with luau test runner to custom test runner written in C++.
A compiled executable that runs test cases for Fiu
with arguments for adjustment and advanced testing.
-t
run specific test case only, usage: -t Conformance/Instructions/Logic
.-tf
run specific test cases from a folder, not recursive, usage: -tf Conformance/Instructions
.-log
enable PRINT/WARN/ALL to let test cases output in io, usage: -log ALL
.-O
change optimization level for compile options, usage: -O1
, ranges from 0-2
.-D
change debug level for compile options, usage: -D1
, ranges from 0-2
.-C
change coverage level for compile options, usage: -C1
, ranges from 0-2
.-vectorCtor
sets vector constructs for compile options, usage -vectorCtor new
.-vectorLib
sets vector lib for compile options, usage -vectorLib Vector
.-vectorType
sets the vector type for compile options, usage -vectorType vector
.Test all cases with all default options.
fiu-tests
with arguments
fiu-tests -t Conformance/Instructions/Logic -log ALL -O2 -D1 -vectorLib Vector3 -vectorCtor new
build serializer tests
fiu-tests mdt -bSrc Conformance/Instructions -bOut Conformance/Deserializer/Instructions -O2 -D2
luau
/fiu
runtime error.getfenv
.FIU_DEBUGGING
is false
.
New update to Test Suite Workflow https://github.com/rce-incorporated/Fiu/pull/13#issuecomment-1998754274
OLD
A new test suite that uses GitHub actions to run test files while also comparing current tests.
A GitHub Action test job: https://github.com/SnorlaxAssist/Fiu/actions/runs/7984464250/job/21801314981
TestRunner.luaThis has built in features such as static configuration in
Config.lua
, script has arguments for micro testing.debug=[0-3]
Display in context for debugging, such as display debug logs forFiu
,Luau
or both.debuglevel=[1-4]
Display what level of debug to show in test runs, such as display logs forPRINT
,WARN
, both, or w/live io stream.test=[relativeName]
What test to focus on for micro testing. An example of running aConformance/tables
test withdebuglevel 3
anddebug 3
using lune:Full Test
Design
Made to easily test pull requests and commits to view passing/failing builds with a readable test log.
Failing Cases
Currently there is quite of lot of failing cases, and majority of them being an issue with Fiu directly or indirectly(global), on local testing issues not caught before is more visible now.