Skip to content

Commit

Permalink
fix: missing profiler binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Jun 27, 2024
1 parent 4ee43a3 commit 7b6d2af
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/e2ePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ jobs:

- name: Copy e2e code into zip folder
run: cp tests/e2e/dist/index.js zip/testRunner.ts

- name: Copy profiler binaries into zip folder
run: cp -r node_modules/@perf-profiler/android/cpp-profiler/bin zip/bin

- name: Zip everything in the zip directory up
run: zip -qr App.zip ./zip
Expand Down
File renamed without changes.
26 changes: 26 additions & 0 deletions patches/@perf-profiler+android+0.12.0+002+aws-binaries.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/node_modules/@perf-profiler/android/dist/src/commands/platforms/UnixProfiler.js b/node_modules/@perf-profiler/android/dist/src/commands/platforms/UnixProfiler.js
index 59aeed9..ee1d8a6 100644
--- a/node_modules/@perf-profiler/android/dist/src/commands/platforms/UnixProfiler.js
+++ b/node_modules/@perf-profiler/android/dist/src/commands/platforms/UnixProfiler.js
@@ -28,7 +28,7 @@ exports.CppProfilerName = `BAMPerfProfiler`;
// into the Flipper plugin directory
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
-const binaryFolder = global.Flipper
+const binaryFolder = (global.Flipper || process.env.AWS)
? `${__dirname}/bin`
: `${__dirname}/../../..${__dirname.includes("dist") ? "/.." : ""}/cpp-profiler/bin`;
class UnixProfiler {
diff --git a/node_modules/@perf-profiler/android/src/commands/platforms/UnixProfiler.ts b/node_modules/@perf-profiler/android/src/commands/platforms/UnixProfiler.ts
index ccacf09..1eea659 100644
--- a/node_modules/@perf-profiler/android/src/commands/platforms/UnixProfiler.ts
+++ b/node_modules/@perf-profiler/android/src/commands/platforms/UnixProfiler.ts
@@ -26,7 +26,7 @@ export const CppProfilerName = `BAMPerfProfiler`;
// into the Flipper plugin directory
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
-const binaryFolder = global.Flipper
+const binaryFolder = (global.Flipper || process.env.AWS)
? `${__dirname}/bin`
: `${__dirname}/../../..${__dirname.includes("dist") ? "/.." : ""}/cpp-profiler/bin`;

1 change: 1 addition & 0 deletions tests/e2e/TestSpec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ phases:
commands:
# Install correct version of node
- export NVM_DIR=$HOME/.nvm
- export AWS=true
- . $NVM_DIR/nvm.sh
# Note: Node v16 is the latest supported version of node for AWS Device Farm
# using v20 will not work!
Expand Down

0 comments on commit 7b6d2af

Please sign in to comment.