When and how to use build-tests.sh and run-test.sh
There are some instructions that say to use build-tests.sh to test corefx, and some instructions that say to use run-test.sh to test. It sounds like build-tests.sh builds and runs tests, and run-test.sh just runs them. But I'm not sure if that's true. When I run build-tests.sh the script completes successfully. When I run run-test.sh there are some test failures.
I've got a few questions about testing corefx:
- Does run-test.sh just run the tests that build-tests.sh builds?
- If so, why do I see test failures running run-test.sh that didn't see when I ran build-tests.sh?
- How do native vs managed tests fit into the build-tests.sh vs run-test.sh question?
@vellozzi These instructions are VERY out of date -- I would ignore them entirely. Very sorry about that. The first instructions you linked are accurate, and you should be able to follow those.
As for your specific questions:
Does run-test.sh just run the tests that build-tests.sh builds?
run-tests.sh was written at a time when the corefx build was mostly non-functional outside of Windows. Nowadays, the Windows and Unix builds are more-or-less identical, so we don't need special handling to run tests there.
If so, why do I see test failures running run-test.sh that didn't see when I ran build-tests.sh?
It's probably running them in an invalid configuration, or not skipping the right tests, or something like that. Perhaps it is running Windows-specific tests on Linux, for example.
How do native vs managed tests fit into the build-tests.sh vs run-test.sh question?
We don't have any "native tests" in this repository. All of the native code that we build are what we call "native shims", which are only used by the managed code in here. It is all tested transitively through those managed libraries.
Does that help?
Yes. I'll use build-tests.sh exclusively. If you could update docs to help future devs that would be cool.
Thanks.