Skip to content

Commit 75609d9

Browse files
authored
fix(aws): remove video processing since we switched to newer phones (#344)
* fix(aws): remove video processing since we switched to newer phones This prevents a bug in Flashlight Cloud where Flashlight would get stuck in the processing video phases for longer tests * fix: change default device since A10s is now unsupported
1 parent 0a3d64f commit 75609d9

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

packages/plugins/aws-device-farm/src/commands/checkResults.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from "path";
33
import { ArtifactType } from "@aws-sdk/client-device-farm";
44
import { Logger } from "@perf-profiler/logger";
55
import { TestCaseResult } from "@perf-profiler/types";
6-
import { installFFMpeg, processVideoFile, downloadFile, unzip } from "@perf-profiler/shell";
6+
import { installFFMpeg, downloadFile, unzip } from "@perf-profiler/shell";
77
import { testRepository } from "../repositories";
88
import { TMP_FOLDER } from "../TMP_FOLDER";
99

@@ -60,11 +60,9 @@ export const checkResults = async ({
6060
};
6161

6262
const processVideo = async (fileName: string) => {
63-
// When coming from AWS Device Farm, it seems the video is not encoded properly
64-
Logger.info(`Fixing video metadata on ${fileName}...`);
65-
// VSync 0 is important since we have variable frame rate from adb shell screenrecord
66-
await processVideoFile(`${tmpFolder}/${fileName}`, `${reportDestinationPath}/${fileName}`);
67-
Logger.info(`Video ${fileName} processed ✅`);
63+
// We needed to run FFMpeg to fix the video file on older devices like the A10s
64+
// However, using newer devices like the A15 by default, video is already good so we just need to copy
65+
fs.copyFileSync(`${tmpFolder}/${fileName}`, `${reportDestinationPath}/${fileName}`);
6866
};
6967

7068
await installFFMpeg();

packages/plugins/aws-device-farm/src/commands/runTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const DEFAULT_RUN_TEST_OPTIONS = {
1818
projectName: "Flashlight",
1919
testName: "Flashlight",
2020
reportDestinationPath: ".",
21-
deviceName: "A10s",
21+
deviceName: "A15",
2222
};
2323

2424
const getSingleFileTestFolderArn = async ({ projectArn }: { projectArn: string }) => {

0 commit comments

Comments
 (0)