The standard collection types live in stdlib/public/core; the test infrastructure is implemented in modules under stdlib/private -- the StdlibCollectionUnittest folder is of particular interest there.
The standard library's tests are split between test/stdlib and validation-test/stdlib. The latter folder contains some important collection tests.
build-script -Rt runs all tests in test/, including compiler, stdlib and SDK overlay tests, amongst others. build-script -RT runs all of the tests, including tests in validation-test.
These build commands enable runtime assertions in the stdlib, so they aren't appropriate for benchmarking, and don't run tests that require an optimized stdlib. To run those, you'll need to create an optimized build using build-script -RT --no-swift-stdlib-assertions.
The Testing.md document you linked below describes how to run only the stdlib tests. This is a useful time-saving measure if you're only working on the stdlib, but there is no requirement to use it.
To understand how testing works, and to add new tests, you'll need to learn a bit about LLVM's flexible testing tools lit and FileCheck that drive Swift's testing. Every test file under test/ and validation-test/ is a standalone lit script that describes how to run the test.
// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test
// CHECK: Hello
print("Hello")
Lit looks at these meta-level comments embedded in the test files themselves to figure out what to do, literate-programming style. In this case, FileCheck is used to perform the actual tests based on what the program prints on its output.
LLVM's docs will tell you what RUN, REQUIRES, CHECK mean. Lit is configured by lit.cfg files in the test directories; these are Python scripts that define Swift-specific details like when the executable_test requirement is fulfilled, and how %target-run-simple-swift expands to an actual command. I think it's best to learn it by example -- look at the existing tests, and figure out how they work.
I don't believe so! With Xcode 10.2, build-script -RT should work just fine.
The "futimens" error in CMakeError.log is part of CMake's configuration process; it does not indicate an actual problem. (I can't tell you what went wrong without the relevant parts of the actual build output.) To try resolve it, I'd start by running util/update-checkout to make sure my repositories are up to date, then I'd remove the whole build folder, and I'd try running util/build-script -rT.
If I were you, I would not use --Xcode; it's not what we use to build the project, and it may or may not actually work.