Skip to content

Commit

Permalink
Fix some Windows specific test issues, and run most tests on GitHub CI.
Browse files Browse the repository at this point in the history
  - Configure symlinks on Windows which allows tests to discover input files.
    - Fixes tests: `wav_sample_provider_test`, `wav_reader_test`.
    - Improves `encoder_main_lib_test`, but there are other issues here.
  - Update GitHub CI to run Windows most tests, filter out some ones that are buggy on Windows (for now).
  - Part of #6.

PiperOrigin-RevId: 671745927
  • Loading branch information
jwcullen committed Sep 6, 2024
1 parent bda6674 commit 8a9537b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
build --linkopt=-lm
# Runfiles are needed by several tests. Typically these are defaulted on for
# non-Windows platforms.
build --enable_runfiles

# Use the default C++ toolchain to build the tools used during the
# build.
build --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
Expand All @@ -14,3 +18,4 @@ build:macos --cxxopt=-std=c++20
build:macos --cxxopt=-Wno-sign-compare

build:windows --cxxopt=/std:c++20
startup --windows_enable_symlinks
8 changes: 5 additions & 3 deletions .github/actions/iamf-tools-builder/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ runs:
if [[ "${{inputs.platform}}" == "windows" ]]; then
# Windows works best with a very short path as per https://bazel.build/configure/windows#long-path-issues.
echo "startup --output_user_root=C:/" >> .bazelrc
# Disable windows tests until some platform-specific bugs are fixed.
bazelisk build -c opt iamf/...
# Disable some windows tests until some platform-specific bugs are fixed.
TEST_FILTER=*:-FlacEncoder*:*TestVector.ValidateTestSuite*:EncoderMainLibTest.*
else
bazelisk test -c opt iamf/...
TEST_FILTER=*
fi
bazelisk test -c opt iamf/... --test_filter=${TEST_FILTER}

0 comments on commit 8a9537b

Please sign in to comment.