Skip to content

starboard: Create starboard_unittest and fold in a few test targets - #4831

Merged
yell0wd0g merged 14 commits into
youtube:mainfrom
yell0wd0g:b_384819454__create_starboard_unittest
Mar 6, 2025
Merged

yell0wd0g merged 14 commits into
youtube:mainfrom
yell0wd0g:b_384819454__create_starboard_unittest

Conversation

@yell0wd0g

@yell0wd0g yell0wd0g commented Feb 4, 2025 •

Copy link
Copy Markdown
Contributor

This CL creates a starboard_unittests and folds in a few ...test
targets that are currently built separately (and likely not run
very often). The original target(gtest_target_type, "bla") are
refactored into source_set("bla").

After this CL starboard_unittests runs 99 test cases, of which
only EzTimeTExplodeTest.PositivePacific fails (left DISABLED)
with a TODO.

Bug: b/384819454

Comment thread starboard/BUILD.gn Resolved
@yell0wd0g
yell0wd0g force-pushed the b_384819454__create_starboard_unittest branch from 1b4d8d6 to d629491 Compare February 19, 2025 03:09
@yell0wd0g

Copy link
Copy Markdown
Contributor Author

PTAL again.

Comment thread starboard/BUILD.gn Resolved
Comment thread starboard/common/BUILD.gn Resolved
Comment thread starboard/BUILD.gn Resolved
Comment thread starboard/BUILD.gn Resolved
Comment thread starboard/extension/BUILD.gn Resolved
Comment thread starboard/nplb/BUILD.gn Resolved

@yell0wd0g yell0wd0g left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewsavage1 PTAL

@hlwarriner PTAL at the question left by Andrew re crashpad_config_test.cc.`

Comment thread starboard/BUILD.gn Resolved
@yell0wd0g
yell0wd0g force-pushed the b_384819454__create_starboard_unittest branch from 0bec6e1 to 734edb1 Compare February 21, 2025 05:22
@yell0wd0g
yell0wd0g marked this pull request as ready for review February 21, 2025 05:41
@yell0wd0g
yell0wd0g force-pushed the b_384819454__create_starboard_unittest branch from 6fe028c to 3ea3e71 Compare March 3, 2025 18:37
@yell0wd0g

Copy link
Copy Markdown
Contributor Author

@andrewsavage1 PTAL (had to add two include paths in the last commit (3ea3e71); also not all starboard_unittests apply to ATv, so I GN-removed them.

@andrewsavage1 andrewsavage1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as long as it works!

@yell0wd0g
yell0wd0g enabled auto-merge (squash) March 3, 2025 18:58
yell0wd0g added a commit that referenced this pull request Mar 3, 2025
)

This is a follow-up to #4831, rolling `nplb_evergreen_compat_tests` into
`nplb` proper.

Run via `./out/linux-x64x11_devel/nplb
--gtest_filter=*CrashpadConfigTest*:*SabiTest*:*ExecutableMemoryTest*:*MaxFileNameTest*:*StorageTest*:*LoaderAppMetricsTest:*FontsTest*`
--

Two sets of test failed on my Linux and needed attention:

- `CrashpadConfigTest.VerifyUploadCert` was IIUC broken due to an 
extra `...app/cobalt/content...` path manually added to the cert 
location. Looking at the GN `ssl:copy_ssl_certificates` target, it 
seems to agree with `GetCACertificatesPath()` in that the extra path 
is not needed. Discussing this with @y4vor, we decided to add a new
helper target `copy_ssl_certificates_evergreen` to put the certs
in the right spot.
- `FontsTest.*` needed `deps` on `fonts:copy_font_data` GN targets
(both `data_deps` and `deps`). This worked, but I had to comment
out the `install_content = true` statements in that BUILD.gn (it's
unclear whether this would break other things).  Said GN target 
uses `exec_script` and needs an exception in //.gn, this CL adds
that too.

Asides from it, some unnecessary test classes are removed, and some
preprocessor logic simplified.

Bug: b/384819454
@yell0wd0g
yell0wd0g force-pushed the b_384819454__create_starboard_unittest branch 3 times, most recently from b25d30f to d529dc6 Compare March 5, 2025 05:46
sideb0ard pushed a commit to sideb0ard/cobalt that referenced this pull request Jul 25, 2025
Original Message:
starboard: Create starboard_unittest and fold in a few test targets (youtube#4831)

This CL creates a starboard_unittests and folds in a few ...test
targets that are currently built separately (and likely not run
very often). The original `target(gtest_target_type, "bla")` are
refactored into `source_set("bla")`.

After this CL starboard_unittests runs 124 test cases, of which
only `EzTimeTExplodeTest.PositivePacific` fails (left DISABLED)
with a TODO.

Bug: b/384819454
original-hexsha: 455a1ec


Files with conflicts:
- starboard/client_porting/eztime/BUILD.gn
- starboard/client_porting/eztime/eztime_test.cc
- starboard/elf_loader/elf_header_test.cc
- starboard/elf_loader/program_table_test.cc
- starboard/loader_app/app_key_files_test.cc
- starboard/shared/ffmpeg/ffmpeg_demuxer_test.cc
- third_party/tflite_support/src/tensorflow_lite_support/scann_ondevice/cc/python/index_builder.pyi
sideb0ard pushed a commit to sideb0ard/cobalt that referenced this pull request Jul 25, 2025
Original Message:
starboard: Create starboard_unittest_wrapper (youtube#5031)

This is a follow up to youtube#4831 which landed with a TODO to move the newly
introduced `starboard_unittests` into a `if (current_toolchain ==
starboard_toolchain)` block, and let external users depend on a
`starboard_unittests_wrapper` instead.

youtube#4831 landed unintendedly, so this CL follows up quickly; CI is likely
to fail while youtube#4464 is being worked on.

Bug: b/384819454
original-hexsha: bdaba2e


Files with conflicts:
- starboard/elf_loader/lz4_file_impl_test.cc
sideb0ard pushed a commit to sideb0ard/cobalt that referenced this pull request Jul 25, 2025
Original Message:
starboard: roll up the remaining unittest targets (youtube#5127)

This PR continues the work of youtube#4831 and rolls up all other targets I
could find that looked like unit tests into `starboard_unittests`.

With this I see
```
[==========] 1454 tests from 55 test suites ran. (8612 ms total)
[  PASSED  ] 989 tests.
[  SKIPPED ] 465 tests, listed below:
...
  YOU HAVE 1 DISABLED TEST
```

(the disabled test was from before, the skipped ones are new, see
further below).

Media-related topics:

- A number of tetst (e.g. `AudioDecoderTest` and others) needed a number
of system libraries to support codecs like AAC, AC3 etc but those are
part of non-free Debian repos, so couldn't install those in Docker. This
CL adds a new method `IsProprietaryAudioCodec()` to be used to SKIP test
cases related to those codecs, when the build flag
`SKIP_PROPRIETARY_CODEC_TESTS` is present.
- `VideoDecoderTests` and `PlayerComponentsTest` failed flakily due to
X11 use not being torn down correctly; they need `xvfb-run`. This makes
me think those are not pure unit-tests but integration tests like
`nplb`. For the time being they are commented out with a TODO.
- `media_util_test.cc` needed `operator==` on `SbMediaColorMetadata`s,
so I added it as extern.
- `FileCacheReader` needs to find the media files under the output
folder's `content/` directory. Files are under the output folder's
`starboard/content`, because of the starboard toolchain. This CL leaves
a quick hack and a TODO() to find a proper solution.

Finally:
- `//starboard/raspi/shared/:starboard_platform_tests` target was empty,
this CL removes it.

Bug: b/384819454
original-hexsha: 82430e3


Files with conflicts:
- starboard/contrib/cast/cast_starboard_api/samples/BUILD.gn
- starboard/linux/shared/player_components_factory.cc
- starboard/loader_app/installation_manager_test.cc
- starboard/loader_app/pending_restart_test.cc
- starboard/shared/starboard/media/media_util_test.cc
- starboard/shared/starboard/player/file_cache_reader.cc
- starboard/shared/starboard/player/filter/testing/adaptive_audio_decoder_test.cc
- starboard/shared/starboard/player/filter/testing/audio_decoder_test.cc
- starboard/shared/starboard/player/filter/testing/player_components_test.cc
sideb0ard pushed a commit to sideb0ard/cobalt that referenced this pull request Jul 26, 2025
…utube#4946)

This is a follow-up to youtube#4831, rolling `nplb_evergreen_compat_tests` into
`nplb` proper.

Run via `./out/linux-x64x11_devel/nplb
--gtest_filter=*CrashpadConfigTest*:*SabiTest*:*ExecutableMemoryTest*:*MaxFileNameTest*:*StorageTest*:*LoaderAppMetricsTest:*FontsTest*`
--

Two sets of test failed on my Linux and needed attention:

- `CrashpadConfigTest.VerifyUploadCert` was IIUC broken due to an
extra `...app/cobalt/content...` path manually added to the cert
location. Looking at the GN `ssl:copy_ssl_certificates` target, it
seems to agree with `GetCACertificatesPath()` in that the extra path
is not needed. Discussing this with @y4vor, we decided to add a new
helper target `copy_ssl_certificates_evergreen` to put the certs
in the right spot.
- `FontsTest.*` needed `deps` on `fonts:copy_font_data` GN targets
(both `data_deps` and `deps`). This worked, but I had to comment
out the `install_content = true` statements in that BUILD.gn (it's
unclear whether this would break other things).  Said GN target
uses `exec_script` and needs an exception in //.gn, this CL adds
that too.

Asides from it, some unnecessary test classes are removed, and some
preprocessor logic simplified.

Bug: b/384819454
original-hexsha: 6e8f112
sideb0ard pushed a commit to sideb0ard/cobalt that referenced this pull request Jul 26, 2025
…outube#4831)

This CL creates a starboard_unittests and folds in a few ...test
targets that are currently built separately (and likely not run
very often). The original `target(gtest_target_type, "bla")` are
refactored into `source_set("bla")`.

After this CL starboard_unittests runs 124 test cases, of which
only `EzTimeTExplodeTest.PositivePacific` fails (left DISABLED)
with a TODO.

Bug: b/384819454
original-hexsha: 455a1ec
sideb0ard pushed a commit to sideb0ard/cobalt that referenced this pull request Jul 26, 2025
This is a follow up to youtube#4831 which landed with a TODO to move the newly
introduced `starboard_unittests` into a `if (current_toolchain ==
starboard_toolchain)` block, and let external users depend on a
`starboard_unittests_wrapper` instead.

youtube#4831 landed unintendedly, so this CL follows up quickly; CI is likely
to fail while youtube#4464 is being worked on.

Bug: b/384819454
original-hexsha: bdaba2e
sideb0ard pushed a commit to sideb0ard/cobalt that referenced this pull request Jul 26, 2025
This PR continues the work of youtube#4831 and rolls up all other targets I
could find that looked like unit tests into `starboard_unittests`.

With this I see
```
[==========] 1454 tests from 55 test suites ran. (8612 ms total)
[  PASSED  ] 989 tests.
[  SKIPPED ] 465 tests, listed below:
...
  YOU HAVE 1 DISABLED TEST
```

(the disabled test was from before, the skipped ones are new, see
further below).

Media-related topics:

- A number of tetst (e.g. `AudioDecoderTest` and others) needed a number
of system libraries to support codecs like AAC, AC3 etc but those are
part of non-free Debian repos, so couldn't install those in Docker. This
CL adds a new method `IsProprietaryAudioCodec()` to be used to SKIP test
cases related to those codecs, when the build flag
`SKIP_PROPRIETARY_CODEC_TESTS` is present.
- `VideoDecoderTests` and `PlayerComponentsTest` failed flakily due to
X11 use not being torn down correctly; they need `xvfb-run`. This makes
me think those are not pure unit-tests but integration tests like
`nplb`. For the time being they are commented out with a TODO.
- `media_util_test.cc` needed `operator==` on `SbMediaColorMetadata`s,
so I added it as extern.
- `FileCacheReader` needs to find the media files under the output
folder's `content/` directory. Files are under the output folder's
`starboard/content`, because of the starboard toolchain. This CL leaves
a quick hack and a TODO() to find a proper solution.

Finally:
- `//starboard/raspi/shared/:starboard_platform_tests` target was empty,
this CL removes it.

Bug: b/384819454
original-hexsha: 82430e3
sideb0ard pushed a commit to sideb0ard/cobalt that referenced this pull request Jul 30, 2025
…utube#4946)

This is a follow-up to youtube#4831, rolling `nplb_evergreen_compat_tests` into
`nplb` proper.

Run via `./out/linux-x64x11_devel/nplb
--gtest_filter=*CrashpadConfigTest*:*SabiTest*:*ExecutableMemoryTest*:*MaxFileNameTest*:*StorageTest*:*LoaderAppMetricsTest:*FontsTest*`
--

Two sets of test failed on my Linux and needed attention:

- `CrashpadConfigTest.VerifyUploadCert` was IIUC broken due to an
extra `...app/cobalt/content...` path manually added to the cert
location. Looking at the GN `ssl:copy_ssl_certificates` target, it
seems to agree with `GetCACertificatesPath()` in that the extra path
is not needed. Discussing this with @y4vor, we decided to add a new
helper target `copy_ssl_certificates_evergreen` to put the certs
in the right spot.
- `FontsTest.*` needed `deps` on `fonts:copy_font_data` GN targets
(both `data_deps` and `deps`). This worked, but I had to comment
out the `install_content = true` statements in that BUILD.gn (it's
unclear whether this would break other things).  Said GN target
uses `exec_script` and needs an exception in //.gn, this CL adds
that too.

Asides from it, some unnecessary test classes are removed, and some
preprocessor logic simplified.

Bug: b/384819454
original-hexsha: 6e8f112
sideb0ard pushed a commit to sideb0ard/cobalt that referenced this pull request Jul 30, 2025
…outube#4831)

This CL creates a starboard_unittests and folds in a few ...test
targets that are currently built separately (and likely not run
very often). The original `target(gtest_target_type, "bla")` are
refactored into `source_set("bla")`.

After this CL starboard_unittests runs 124 test cases, of which
only `EzTimeTExplodeTest.PositivePacific` fails (left DISABLED)
with a TODO.

Bug: b/384819454
original-hexsha: 455a1ec
sideb0ard pushed a commit to sideb0ard/cobalt that referenced this pull request Jul 30, 2025
This is a follow up to youtube#4831 which landed with a TODO to move the newly
introduced `starboard_unittests` into a `if (current_toolchain ==
starboard_toolchain)` block, and let external users depend on a
`starboard_unittests_wrapper` instead.

youtube#4831 landed unintendedly, so this CL follows up quickly; CI is likely
to fail while youtube#4464 is being worked on.

Bug: b/384819454
original-hexsha: bdaba2e
sideb0ard pushed a commit to sideb0ard/cobalt that referenced this pull request Jul 30, 2025
This PR continues the work of youtube#4831 and rolls up all other targets I
could find that looked like unit tests into `starboard_unittests`.

With this I see
```
[==========] 1454 tests from 55 test suites ran. (8612 ms total)
[  PASSED  ] 989 tests.
[  SKIPPED ] 465 tests, listed below:
...
  YOU HAVE 1 DISABLED TEST
```

(the disabled test was from before, the skipped ones are new, see
further below).

Media-related topics:

- A number of tetst (e.g. `AudioDecoderTest` and others) needed a number
of system libraries to support codecs like AAC, AC3 etc but those are
part of non-free Debian repos, so couldn't install those in Docker. This
CL adds a new method `IsProprietaryAudioCodec()` to be used to SKIP test
cases related to those codecs, when the build flag
`SKIP_PROPRIETARY_CODEC_TESTS` is present.
- `VideoDecoderTests` and `PlayerComponentsTest` failed flakily due to
X11 use not being torn down correctly; they need `xvfb-run`. This makes
me think those are not pure unit-tests but integration tests like
`nplb`. For the time being they are commented out with a TODO.
- `media_util_test.cc` needed `operator==` on `SbMediaColorMetadata`s,
so I added it as extern.
- `FileCacheReader` needs to find the media files under the output
folder's `content/` directory. Files are under the output folder's
`starboard/content`, because of the starboard toolchain. This CL leaves
a quick hack and a TODO() to find a proper solution.

Finally:
- `//starboard/raspi/shared/:starboard_platform_tests` target was empty,
this CL removes it.

Bug: b/384819454
original-hexsha: 82430e3
sideb0ard pushed a commit to sideb0ard/cobalt that referenced this pull request Aug 12, 2025
…utube#4946)

This is a follow-up to youtube#4831, rolling `nplb_evergreen_compat_tests` into
`nplb` proper.

Run via `./out/linux-x64x11_devel/nplb
--gtest_filter=*CrashpadConfigTest*:*SabiTest*:*ExecutableMemoryTest*:*MaxFileNameTest*:*StorageTest*:*LoaderAppMetricsTest:*FontsTest*`
--

Two sets of test failed on my Linux and needed attention:

- `CrashpadConfigTest.VerifyUploadCert` was IIUC broken due to an
extra `...app/cobalt/content...` path manually added to the cert
location. Looking at the GN `ssl:copy_ssl_certificates` target, it
seems to agree with `GetCACertificatesPath()` in that the extra path
is not needed. Discussing this with @y4vor, we decided to add a new
helper target `copy_ssl_certificates_evergreen` to put the certs
in the right spot.
- `FontsTest.*` needed `deps` on `fonts:copy_font_data` GN targets
(both `data_deps` and `deps`). This worked, but I had to comment
out the `install_content = true` statements in that BUILD.gn (it's
unclear whether this would break other things).  Said GN target
uses `exec_script` and needs an exception in //.gn, this CL adds
that too.

Asides from it, some unnecessary test classes are removed, and some
preprocessor logic simplified.

Bug: b/384819454
original-hexsha: 6e8f112
sideb0ard pushed a commit to sideb0ard/cobalt that referenced this pull request Aug 12, 2025
…outube#4831)

This CL creates a starboard_unittests and folds in a few ...test
targets that are currently built separately (and likely not run
very often). The original `target(gtest_target_type, "bla")` are
refactored into `source_set("bla")`.

After this CL starboard_unittests runs 124 test cases, of which
only `EzTimeTExplodeTest.PositivePacific` fails (left DISABLED)
with a TODO.

Bug: b/384819454
original-hexsha: 455a1ec
sideb0ard pushed a commit that referenced this pull request Aug 15, 2025
This is a follow up to #4831 which landed with a TODO to move the newly
introduced `starboard_unittests` into a `if (current_toolchain ==
starboard_toolchain)` block, and let external users depend on a
`starboard_unittests_wrapper` instead.

#4831 landed unintendedly, so this CL follows up quickly; CI is likely
to fail while #4464 is being worked on.

Bug: b/384819454
original-hexsha: bdaba2e
sideb0ard pushed a commit that referenced this pull request Aug 15, 2025
This PR continues the work of #4831 and rolls up all other targets I
could find that looked like unit tests into `starboard_unittests`.

With this I see
```
[==========] 1454 tests from 55 test suites ran. (8612 ms total)
[  PASSED  ] 989 tests.
[  SKIPPED ] 465 tests, listed below:
...
  YOU HAVE 1 DISABLED TEST
```

(the disabled test was from before, the skipped ones are new, see
further below).

Media-related topics:

- A number of tetst (e.g. `AudioDecoderTest` and others) needed a number
of system libraries to support codecs like AAC, AC3 etc but those are
part of non-free Debian repos, so couldn't install those in Docker. This
CL adds a new method `IsProprietaryAudioCodec()` to be used to SKIP test
cases related to those codecs, when the build flag
`SKIP_PROPRIETARY_CODEC_TESTS` is present.
- `VideoDecoderTests` and `PlayerComponentsTest` failed flakily due to
X11 use not being torn down correctly; they need `xvfb-run`. This makes
me think those are not pure unit-tests but integration tests like
`nplb`. For the time being they are commented out with a TODO.
- `media_util_test.cc` needed `operator==` on `SbMediaColorMetadata`s,
so I added it as extern.
- `FileCacheReader` needs to find the media files under the output
folder's `content/` directory. Files are under the output folder's
`starboard/content`, because of the starboard toolchain. This CL leaves
a quick hack and a TODO() to find a proper solution.

Finally:
- `//starboard/raspi/shared/:starboard_platform_tests` target was empty,
this CL removes it.

Bug: b/384819454
original-hexsha: 82430e3
briantting pushed a commit that referenced this pull request Aug 15, 2025
)

This is a follow-up to #4831, rolling `nplb_evergreen_compat_tests` into
`nplb` proper.

Run via `./out/linux-x64x11_devel/nplb
--gtest_filter=*CrashpadConfigTest*:*SabiTest*:*ExecutableMemoryTest*:*MaxFileNameTest*:*StorageTest*:*LoaderAppMetricsTest:*FontsTest*`
--

Two sets of test failed on my Linux and needed attention:

- `CrashpadConfigTest.VerifyUploadCert` was IIUC broken due to an
extra `...app/cobalt/content...` path manually added to the cert
location. Looking at the GN `ssl:copy_ssl_certificates` target, it
seems to agree with `GetCACertificatesPath()` in that the extra path
is not needed. Discussing this with @y4vor, we decided to add a new
helper target `copy_ssl_certificates_evergreen` to put the certs
in the right spot.
- `FontsTest.*` needed `deps` on `fonts:copy_font_data` GN targets
(both `data_deps` and `deps`). This worked, but I had to comment
out the `install_content = true` statements in that BUILD.gn (it's
unclear whether this would break other things).  Said GN target
uses `exec_script` and needs an exception in //.gn, this CL adds
that too.

Asides from it, some unnecessary test classes are removed, and some
preprocessor logic simplified.

Bug: b/384819454

original-hexsha: 6e8f112
briantting pushed a commit that referenced this pull request Aug 15, 2025
…4831)

This CL creates a starboard_unittests and folds in a few ...test
targets that are currently built separately (and likely not run
very often). The original `target(gtest_target_type, "bla")` are
refactored into `source_set("bla")`.

After this CL starboard_unittests runs 124 test cases, of which
only `EzTimeTExplodeTest.PositivePacific` fails (left DISABLED)
with a TODO.

Bug: b/384819454

original-hexsha: 455a1ec
briantting pushed a commit that referenced this pull request Aug 15, 2025
This is a follow up to #4831 which landed with a TODO to move the newly
introduced `starboard_unittests` into a `if (current_toolchain ==
starboard_toolchain)` block, and let external users depend on a
`starboard_unittests_wrapper` instead.

#4831 landed unintendedly, so this CL follows up quickly; CI is likely
to fail while #4464 is being worked on.

Bug: b/384819454

original-hexsha: bdaba2e
briantting pushed a commit that referenced this pull request Aug 15, 2025
This PR continues the work of #4831 and rolls up all other targets I
could find that looked like unit tests into `starboard_unittests`.

With this I see
```
[==========] 1454 tests from 55 test suites ran. (8612 ms total)
[  PASSED  ] 989 tests.
[  SKIPPED ] 465 tests, listed below:
...
  YOU HAVE 1 DISABLED TEST
```

(the disabled test was from before, the skipped ones are new, see
further below).

Media-related topics:

- A number of tetst (e.g. `AudioDecoderTest` and others) needed a number
of system libraries to support codecs like AAC, AC3 etc but those are
part of non-free Debian repos, so couldn't install those in Docker. This
CL adds a new method `IsProprietaryAudioCodec()` to be used to SKIP test
cases related to those codecs, when the build flag
`SKIP_PROPRIETARY_CODEC_TESTS` is present.
- `VideoDecoderTests` and `PlayerComponentsTest` failed flakily due to
X11 use not being torn down correctly; they need `xvfb-run`. This makes
me think those are not pure unit-tests but integration tests like
`nplb`. For the time being they are commented out with a TODO.
- `media_util_test.cc` needed `operator==` on `SbMediaColorMetadata`s,
so I added it as extern.
- `FileCacheReader` needs to find the media files under the output
folder's `content/` directory. Files are under the output folder's
`starboard/content`, because of the starboard toolchain. This CL leaves
a quick hack and a TODO() to find a proper solution.

Finally:
- `//starboard/raspi/shared/:starboard_platform_tests` target was empty,
this CL removes it.

Bug: b/384819454

original-hexsha: 82430e3
sideb0ard pushed a commit that referenced this pull request Aug 19, 2025
)

This is a follow-up to #4831, rolling `nplb_evergreen_compat_tests` into
`nplb` proper.

Run via `./out/linux-x64x11_devel/nplb
--gtest_filter=*CrashpadConfigTest*:*SabiTest*:*ExecutableMemoryTest*:*MaxFileNameTest*:*StorageTest*:*LoaderAppMetricsTest:*FontsTest*`
--

Two sets of test failed on my Linux and needed attention:

- `CrashpadConfigTest.VerifyUploadCert` was IIUC broken due to an
extra `...app/cobalt/content...` path manually added to the cert
location. Looking at the GN `ssl:copy_ssl_certificates` target, it
seems to agree with `GetCACertificatesPath()` in that the extra path
is not needed. Discussing this with @y4vor, we decided to add a new
helper target `copy_ssl_certificates_evergreen` to put the certs
in the right spot.
- `FontsTest.*` needed `deps` on `fonts:copy_font_data` GN targets
(both `data_deps` and `deps`). This worked, but I had to comment
out the `install_content = true` statements in that BUILD.gn (it's
unclear whether this would break other things).  Said GN target
uses `exec_script` and needs an exception in //.gn, this CL adds
that too.

Asides from it, some unnecessary test classes are removed, and some
preprocessor logic simplified.

Bug: b/384819454

original-hexsha: 6e8f112
sideb0ard pushed a commit that referenced this pull request Aug 19, 2025
…4831)

This CL creates a starboard_unittests and folds in a few ...test
targets that are currently built separately (and likely not run
very often). The original `target(gtest_target_type, "bla")` are
refactored into `source_set("bla")`.

After this CL starboard_unittests runs 124 test cases, of which
only `EzTimeTExplodeTest.PositivePacific` fails (left DISABLED)
with a TODO.

Bug: b/384819454

original-hexsha: 455a1ec
sideb0ard pushed a commit that referenced this pull request Aug 20, 2025
This is a follow up to #4831 which landed with a TODO to move the newly
introduced `starboard_unittests` into a `if (current_toolchain ==
starboard_toolchain)` block, and let external users depend on a
`starboard_unittests_wrapper` instead.

#4831 landed unintendedly, so this CL follows up quickly; CI is likely
to fail while #4464 is being worked on.

Bug: b/384819454

original-hexsha: bdaba2e
sideb0ard pushed a commit that referenced this pull request Aug 20, 2025
This PR continues the work of #4831 and rolls up all other targets I
could find that looked like unit tests into `starboard_unittests`.

With this I see
```
[==========] 1454 tests from 55 test suites ran. (8612 ms total)
[  PASSED  ] 989 tests.
[  SKIPPED ] 465 tests, listed below:
...
  YOU HAVE 1 DISABLED TEST
```

(the disabled test was from before, the skipped ones are new, see
further below).

Media-related topics:

- A number of tetst (e.g. `AudioDecoderTest` and others) needed a number
of system libraries to support codecs like AAC, AC3 etc but those are
part of non-free Debian repos, so couldn't install those in Docker. This
CL adds a new method `IsProprietaryAudioCodec()` to be used to SKIP test
cases related to those codecs, when the build flag
`SKIP_PROPRIETARY_CODEC_TESTS` is present.
- `VideoDecoderTests` and `PlayerComponentsTest` failed flakily due to
X11 use not being torn down correctly; they need `xvfb-run`. This makes
me think those are not pure unit-tests but integration tests like
`nplb`. For the time being they are commented out with a TODO.
- `media_util_test.cc` needed `operator==` on `SbMediaColorMetadata`s,
so I added it as extern.
- `FileCacheReader` needs to find the media files under the output
folder's `content/` directory. Files are under the output folder's
`starboard/content`, because of the starboard toolchain. This CL leaves
a quick hack and a TODO() to find a proper solution.

Finally:
- `//starboard/raspi/shared/:starboard_platform_tests` target was empty,
this CL removes it.

Bug: b/384819454

original-hexsha: 82430e3
briantting pushed a commit that referenced this pull request Aug 26, 2025
)

This is a follow-up to #4831, rolling `nplb_evergreen_compat_tests` into
`nplb` proper.

Run via `./out/linux-x64x11_devel/nplb
--gtest_filter=*CrashpadConfigTest*:*SabiTest*:*ExecutableMemoryTest*:*MaxFileNameTest*:*StorageTest*:*LoaderAppMetricsTest:*FontsTest*`
--

Two sets of test failed on my Linux and needed attention:

- `CrashpadConfigTest.VerifyUploadCert` was IIUC broken due to an
extra `...app/cobalt/content...` path manually added to the cert
location. Looking at the GN `ssl:copy_ssl_certificates` target, it
seems to agree with `GetCACertificatesPath()` in that the extra path
is not needed. Discussing this with @y4vor, we decided to add a new
helper target `copy_ssl_certificates_evergreen` to put the certs
in the right spot.
- `FontsTest.*` needed `deps` on `fonts:copy_font_data` GN targets
(both `data_deps` and `deps`). This worked, but I had to comment
out the `install_content = true` statements in that BUILD.gn (it's
unclear whether this would break other things).  Said GN target
uses `exec_script` and needs an exception in //.gn, this CL adds
that too.

Asides from it, some unnecessary test classes are removed, and some
preprocessor logic simplified.

Bug: b/384819454

original-hexsha: 6e8f112
briantting pushed a commit that referenced this pull request Aug 27, 2025
…4831)

This CL creates a starboard_unittests and folds in a few ...test
targets that are currently built separately (and likely not run
very often). The original `target(gtest_target_type, "bla")` are
refactored into `source_set("bla")`.

After this CL starboard_unittests runs 124 test cases, of which
only `EzTimeTExplodeTest.PositivePacific` fails (left DISABLED)
with a TODO.

Bug: b/384819454

original-hexsha: 455a1ec
briantting pushed a commit that referenced this pull request Aug 29, 2025
This is a follow up to #4831 which landed with a TODO to move the newly
introduced `starboard_unittests` into a `if (current_toolchain ==
starboard_toolchain)` block, and let external users depend on a
`starboard_unittests_wrapper` instead.

#4831 landed unintendedly, so this CL follows up quickly; CI is likely
to fail while #4464 is being worked on.

Bug: b/384819454

original-hexsha: bdaba2e
briantting pushed a commit that referenced this pull request Aug 29, 2025
This PR continues the work of #4831 and rolls up all other targets I
could find that looked like unit tests into `starboard_unittests`.

With this I see
```
[==========] 1454 tests from 55 test suites ran. (8612 ms total)
[  PASSED  ] 989 tests.
[  SKIPPED ] 465 tests, listed below:
...
  YOU HAVE 1 DISABLED TEST
```

(the disabled test was from before, the skipped ones are new, see
further below).

Media-related topics:

- A number of tetst (e.g. `AudioDecoderTest` and others) needed a number
of system libraries to support codecs like AAC, AC3 etc but those are
part of non-free Debian repos, so couldn't install those in Docker. This
CL adds a new method `IsProprietaryAudioCodec()` to be used to SKIP test
cases related to those codecs, when the build flag
`SKIP_PROPRIETARY_CODEC_TESTS` is present.
- `VideoDecoderTests` and `PlayerComponentsTest` failed flakily due to
X11 use not being torn down correctly; they need `xvfb-run`. This makes
me think those are not pure unit-tests but integration tests like
`nplb`. For the time being they are commented out with a TODO.
- `media_util_test.cc` needed `operator==` on `SbMediaColorMetadata`s,
so I added it as extern.
- `FileCacheReader` needs to find the media files under the output
folder's `content/` directory. Files are under the output folder's
`starboard/content`, because of the starboard toolchain. This CL leaves
a quick hack and a TODO() to find a proper solution.

Finally:
- `//starboard/raspi/shared/:starboard_platform_tests` target was empty,
this CL removes it.

Bug: b/384819454

original-hexsha: 82430e3
madhurajayaraman pushed a commit to madhurajayaraman/cobalt that referenced this pull request Sep 8, 2025
…utube#4946)

This is a follow-up to youtube#4831, rolling `nplb_evergreen_compat_tests` into
`nplb` proper.

Run via `./out/linux-x64x11_devel/nplb
--gtest_filter=*CrashpadConfigTest*:*SabiTest*:*ExecutableMemoryTest*:*MaxFileNameTest*:*StorageTest*:*LoaderAppMetricsTest:*FontsTest*`
--

Two sets of test failed on my Linux and needed attention:

- `CrashpadConfigTest.VerifyUploadCert` was IIUC broken due to an
extra `...app/cobalt/content...` path manually added to the cert
location. Looking at the GN `ssl:copy_ssl_certificates` target, it
seems to agree with `GetCACertificatesPath()` in that the extra path
is not needed. Discussing this with @y4vor, we decided to add a new
helper target `copy_ssl_certificates_evergreen` to put the certs
in the right spot.
- `FontsTest.*` needed `deps` on `fonts:copy_font_data` GN targets
(both `data_deps` and `deps`). This worked, but I had to comment
out the `install_content = true` statements in that BUILD.gn (it's
unclear whether this would break other things).  Said GN target
uses `exec_script` and needs an exception in //.gn, this CL adds
that too.

Asides from it, some unnecessary test classes are removed, and some
preprocessor logic simplified.

Bug: b/384819454

original-hexsha: 6e8f112
madhurajayaraman pushed a commit to madhurajayaraman/cobalt that referenced this pull request Sep 8, 2025
…outube#4831)

This CL creates a starboard_unittests and folds in a few ...test
targets that are currently built separately (and likely not run
very often). The original `target(gtest_target_type, "bla")` are
refactored into `source_set("bla")`.

After this CL starboard_unittests runs 124 test cases, of which
only `EzTimeTExplodeTest.PositivePacific` fails (left DISABLED)
with a TODO.

Bug: b/384819454

original-hexsha: 455a1ec
madhurajayaraman pushed a commit to madhurajayaraman/cobalt that referenced this pull request Sep 9, 2025
This is a follow up to youtube#4831 which landed with a TODO to move the newly
introduced `starboard_unittests` into a `if (current_toolchain ==
starboard_toolchain)` block, and let external users depend on a
`starboard_unittests_wrapper` instead.

youtube#4831 landed unintendedly, so this CL follows up quickly; CI is likely
to fail while youtube#4464 is being worked on.

Bug: b/384819454

original-hexsha: bdaba2e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants