I have some experiments with regards to regression tests for WASM. I do the following
- Use ExternalData_add_test and add_test
- Autogenerate a node.js script, which can copy data into WASM filesystem and call a function
TestXXX(int argc, char* argv)
, where I files can be placed in the file system - The output are written to WASM file system
- The node.js script can copy them to output
One issue. Many of our tests, just take a folder and the filename is written inside the .cxx
file.
First, I will get it up and running for a test, where the input file and output files are specified in the CMake system. Do we have such a test? If yes, can you provide a good example?
Would it be an idea to always keep input and baseline in the CMake system and not written in .cxx
?
I realized there is a bug in Emscripten about reading from stdio using a stream. It is though easy to accept a fixed string and execute tests like, node vtkCommonCoreCxxTests TestSomething
.