run-api-tests: dumpAllTests() should not use global variables