Commit Graph

9 Commits

Author SHA1 Message Date
Jacob Trimble
428586b0eb Change test storage to use protobuf
[ Merge of http://go/wvgerrit/193190 ]

This changes the persistent test storage to use protobufs instead of
manual parsing.  This simplifies the code but makes the files less
"human readable".  Files can be read using 'gqui' if needed.

Bug: 312529037
Test: unit/integration tests
Change-Id: I1b025eac96458c0061e0883e1e4fd05484842ff2
2024-03-20 13:59:14 -07:00
Alex Dale
b0bb45876d Remove usage info clean up test tear down.
[ Merge of http://go/wvgerrit/160857 ]

Reboot tests were attempting to clean up usage info records when the
tests were done.  However, usage info are no longer supported.
Unfortunately, the clean up code would trigger a test failure if the
usage info records could not be deleted.

Bug: 258469123
Test: OfflineLicenseTest.VariousTests
Change-Id: I17cebd82da1e45ef53853d35dbe314365a1909be
2022-11-09 14:42:31 -08:00
Alex Dale
a20ee5bc54 Update system time for OPK reboot tests
[ Merge of http://go/wvgerrit/154593 ]

This CL updates the initial time used for reboot tests to be
within the valid range used by OPK. Also, the fake clock is
now synced with every use of the TestHost's clock function.

Also, the OPK's system clock is no longer initialized to 0
because this caused some tests to set initial playback time
to 0. That broke code that assumed a time of 0 mean "never".

I also removed some log spam in the WTPI code.

Bug: 222353528
Bug: 236317198
Change-Id: Ibdbdb2440454b9cf561cd9ec65ca3e40cf5a8d93
2022-07-20 14:47:25 -07:00
John "Juce" Bruce
0890fae039 Create test FileSystems in a platform-specific manner
(This is a merge of http://go/wvgerrit/153552.)

The correct way to create a FileSystem object for testing CdmEngine
depends on the platform. However, our code has historically just
instantiated a new FileSystem object using the default constructor. This
works fine for Android and has historically worked fine for the CE CDM
tests because they did not implement storage correctly. However, an
upcoming commit will fix the implementation of storage in the CE CDM
TestHost, causing tests that use a default FileSystem constructor to
fail. This patch adds a new platform-defined function that instantiates
per-origin test storage in a platform-correct way. For Android, it
continues to use the default constructor, while for CE CDM, it uses the
TestHost.

Bug: 193060708
Test: x86-64 w/ storage separated
Test: build_and_run_all_unit_tests.sh
Change-Id: I0a9b6a4d3943e053d51d6018e392b7f215f50642
2022-06-29 18:14:26 -07:00
Rahul Frias
41b5bd18de Reboot tests: verify offline license is valid after reboot
[ Merge of http://go/wvgerrit/143749 ]

Tests are added to verify that the policy durations are enforced for
an offline license after a device has been rebooted.

Bug: 26163469
Test: GtsMediaTestCases on sunfish
Change-Id: I54e65d7abc5e59eae7c150555b2244dbf96da3f5
2022-03-16 01:35:50 -07:00
Rahul Frias
6cda6717a9 Reboot test: Initialize fake clock
[ Merge of http://go/wvgerrit/143630 ]

When we run a test with the fake clock, the clock had been initialized
to the current time, or to 0. This causes a problem for reboot tests
because the clock might go backwards over the reboot. With this
change, we monitor the clock at the end of one reboot pass and
initialize the clock for the next pass based on the previous value.

Bug: 26163469
Test: GtsMediaTestCases on sunfish
Change-Id: Ibd0024f963634382af70553fced38da6e1d857d2
2022-03-16 01:34:36 -07:00
Rahul Frias
520368cea2 Reboot test: save large files
[ Merge of http://go/wvgerrit/143629 ]

The standard b2a_hex only saves about 2k, so we need a special version
that can handle larger strings. This is needed because a license file
is about 7k.

Bug: 194342751
Test: GtsMediaTestCases on sunfish
Change-Id: I6a6ac3f8f4fa6d9cd8a0119fc64fc8f3cc5f3ae8
2022-03-16 01:34:12 -07:00
Kyle Zhang
642965c678 Merge latest oemcrypto-v17 change
No-Typo-Check: Not related to this change.

Bug: 161477208
Change-Id: I99e4780f6855b7045aa0cd5a49c13d2d0d51ed64
2022-01-27 20:07:15 -08:00
Fred Gylys-Colwell
9cab445e2c Add initial reboot test infrastructure
Merge from Widevine repo of http://go/wvgerrit/130469
Parse and decode persistent data for reboot tests

Merge from Widevine repo of http://go/wvgerrit/130468
Save and restore persistent test data

Merge from Widevine repo of http://go/wvgerrit/130467
Saving and restore the test host's file system

Merge from Widevine repo of http://go/wvgerrit/130466
Add reboot test class

Test: android/run_reboot_test.sh and jenkins/run_fake_l1_tests
Bug: 194342751
Bug: 194342800
Change-Id: Id2f3d9850cb75cb286f7863738aa8fd38a1a5301
2021-10-14 17:50:14 +00:00