Allow aml_tester to continue after an interpreter panic#277
Allow aml_tester to continue after an interpreter panic#277martin-hughes wants to merge 6 commits intorust-osdev:mainfrom
aml_tester to continue after an interpreter panic#277Conversation
This makes it easier for any user to see if a test has failed. Which may be useful for example in CI environments.
`resolve_and_compile` relies on the current `iasl` way of naming its output, there's no need to duplicate that in `create_script_file`
|
The exit code change already showing its value by breaking the checks it seems! Not sure why yet, I'll fix and update the PR - it works for me on my machine 👀 |
|
Well I can see WSL Ubuntu I'm not sure where to go from there really. |
This was masking some bugs in `ToHexString` and `ToInteger` because those calls were being folded out by the iasl optimizer.
|
Alright, I've figured out the problem. So I've added the This requires a minor fix to |
The motivation here is to allow testing of large numbers of AML files - before this PR, a panic (probably from the Interpreter) would stop testing of all remaining files as
aml_testerwould exit.It has evolved into a slightly larger PR than that, with a grab-bag of other minor updates listed below.
The main bit of this PR all flows from changes to
run_test:catch_unwind.run_testsneeds to take ownership of the interpreter so it can enforce this ruleThis leads to a variety of parameter and return type changes throughout. (And explains why there's a bunch of new
enums in the code)Then I made a few other changes to improve consistency:
resolve_and_compiledoesn't returnio::Resultany more - that level of detail isn't needed by the callerFinally, because they were looking a bit messy:
%FN%interpolation - actuallyresolve_and_compilealready relied on theiaslfile-naming behaviour, so the only valid thing that could go in%FN%was whatresolve_and_compilewould already need. So it added no real value.aml_tester::mainnow returns an exit code, so that if there are any test failures the user can see it reflected there. This might be useful for CI pipelines etc and reflects other testing tools (e.g.cargo test)