From 922019a8d07c56863d83a095aed0fa5b93330802 Mon Sep 17 00:00:00 2001 From: John Knox Date: Mon, 2 Sep 2019 10:58:44 -0700 Subject: [PATCH] Add script to run headless tests easily Summary: It's not obvious how to run the headless tests at the moment, and requires manual steps this adds a script to do it. It still does not start an emulator or the sample app, but it's an improvement. Reviewed By: passy Differential Revision: D17155308 fbshipit-source-id: 846b87389823f422030470807aa4aabacce69179 --- scripts/run-headless-tests.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 scripts/run-headless-tests.sh diff --git a/scripts/run-headless-tests.sh b/scripts/run-headless-tests.sh new file mode 100755 index 000000000..d04b2ffd7 --- /dev/null +++ b/scripts/run-headless-tests.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -xeuo pipefail + +if [ `adb devices | wc -l` -lt "3" ] +then + echo "No devices are connected. Make sure emulator is booted with flipper sample app running" + exit 1 +fi + +yarn build-headless --mac +unzip -u dist/Flipper-headless.zip -d /tmp +(cd headless-tests && yarn test)