WASM Regression tests (file locations)

I have some experiments with regards to regression tests for WASM. I do the following

  1. Use ExternalData_add_test and add_test
  2. 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
  3. The output are written to WASM file system
  4. 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.

I figure out that you have made test using preload of data in the browser. That is a different approach. Any change that we will get this to work also from Node? Would be nice with a simple example, then developers can follow and help on getting WASM tests to work