Fix minimal build (make it build with the recent changes) (#26222)
This pull request introduces a minor update to the test infrastructure
and test files, focusing on improving build configuration and test
utility usage.
Build configuration:
* Updated `cmake/onnxruntime_test_pch.cmake` to only enable precompiled
headers for test targets when not performing a minimal build, preventing
unnecessary PCH usage in minimal build scenarios.
Test utility improvements:
* Added an include for `asserts.h` in
`onnxruntime/test/platform/file_io_test.cc`, ensuring test assertions
are available and improving test reliability.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>