Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tests discoverable at build time #1094

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def test(args: argparse.Namespace, env: dict[str, str]):
"""
Run the tests.
"""
lib_dir = args.build_dir / "test"
lib_dir = args.build_dir
if util.is_windows():
# On Windows, the unit test executable is found inside a directory named after the configuration
# (e.g. Debug, Release, etc.) within the test directory.
Expand All @@ -616,7 +616,7 @@ def test(args: argparse.Namespace, env: dict[str, str]):
lib_dir = args.ort_home / "lib"

ctest_cmd = [str(args.ctest_path), "--build-config", args.config, "--verbose", "--timeout", "10800"]
util.run(ctest_cmd, cwd=str(args.build_dir / "test"))
util.run(ctest_cmd, cwd=str(args.build_dir))

if args.build_csharp:
dotnet = str(_resolve_executable_path("dotnet"))
Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ if (NOT MSVC)
endif()

include(GoogleTest)
gtest_discover_tests(unit_tests)
Loading