Skip to content

Commit 8b48df9

Browse files
committed
set CI env var & update audio/video tests
* isDarwin() now checks CI env var. This way all tests can be run locally * test_osn_audio: do not check for default audio device on the test runner * test_osn_advanced_replayBuffer.ts: still flaky on macOS test runner so disable on those * main.yml: add CI environment variable
1 parent 04b54cb commit 8b48df9

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ jobs:
151151
OSN_ACCESS_KEY_ID: ${{secrets.AWS_RELEASE_ACCESS_KEY_ID}}
152152
OSN_SECRET_ACCESS_KEY: ${{secrets.AWS_RELEASE_SECRET_ACCESS_KEY}}
153153
RELEASE_NAME: ${{matrix.ReleaseName}}
154+
CI: true
154155
# Run even after test failures so the PR still gets the flaky summary.
155156
- name: Publish flaky test check
156157
if: ${{ always() }}

tests/osn-tests/src/test_osn_advanced_replayBuffer.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ describe(testName, () => {
131131
});
132132

133133
it('Start advanced replay buffer - Use Recording', async function() {
134+
if (obs.isDarwin()) {
135+
this.skip();
136+
}
134137
replayBuffer = osn.AdvancedReplayBufferFactory.create();
135138
replayBuffer.path = path.join(path.normalize(__dirname), '..', 'osnData');
136139
replayBuffer.format = osn.ERecordingFormat.MP4;
@@ -258,6 +261,9 @@ describe(testName, () => {
258261
});
259262

260263
it('Start advanced replay buffer - Use Stream through Recording', async function() {
264+
if (obs.isDarwin()) {
265+
this.skip();
266+
}
261267
replayBuffer = osn.AdvancedReplayBufferFactory.create();
262268
replayBuffer.path = path.join(path.normalize(__dirname), '..', 'osnData');
263269
replayBuffer.format = osn.ERecordingFormat.MP4;

tests/osn-tests/src/test_osn_audio.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ describe(testName, () => {
7070
foundDefaultDevice = true;
7171
}
7272
}
73-
expect(foundDefaultDevice).to.equal(true, GetErrorMessage(ETestErrorMsg.DefaultDeviceNotFound));
73+
if (!obs.isDarwin()) { // On virtual mac(s) the default output device is not included in the list of output devices
74+
expect(foundDefaultDevice).to.equal(true, GetErrorMessage(ETestErrorMsg.DefaultDeviceNotFound));
75+
}
7476
});
7577

7678
it('Get input audio devices', function() {

tests/osn-tests/util/obs_handler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,8 @@ export class OBSHandler {
553553

554554
isDarwin()
555555
{
556-
// Wrapped this in a function- just incase we want to add more conditions later or disable only within the build agent.
557-
return this.os === 'darwin';
556+
// Wrapped this in a function- just in case we want to add more conditions later or disable only within the build agent.
557+
return this.os === 'darwin' && this.ci;
558558
}
559559

560560
// is the build server environment

0 commit comments

Comments
 (0)