-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
15fc4f9
commit b5883b8
Showing
8 changed files
with
124 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
TEST_DEVICE_OUTPUTS_DIR="${TEST_DEVICE_OUTPUTS_DIR:-/sdcard/Download/test-outputs/attachments}" # Must match the path where e2e tests output their attachments | ||
REPORT_DIR="${REPORT_DIR:-}" | ||
|
||
while [[ "$#" -gt 0 ]]; do | ||
case $1 in | ||
--test-type) | ||
if [[ -n "${2-}" && "$2" =~ ^(app|mockapi|e2e)$ ]]; then | ||
TEST_TYPE="$2" | ||
else | ||
echo "Error: Bad or missing test type. Must be one of: app, mockapi, e2e" | ||
exit 1 | ||
fi | ||
shift 2 | ||
;; | ||
*) | ||
echo "Unknown argument: $1" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
if [[ -z $TEST_DEVICE_OUTPUTS_DIR ]]; then | ||
echo "" | ||
echo "Error: The variable TEST_DEVICE_OUTPUTS_DIR must be set." | ||
exit 1 | ||
fi | ||
|
||
if [[ -z $REPORT_DIR || ! -d $REPORT_DIR ]]; then | ||
echo "" | ||
echo "Error: The variable REPORT_DIR must be set and the directory must exist." | ||
exit 1 | ||
fi | ||
|
||
echo "Collecting produced test attachments and logs..." | ||
adb pull "$TEST_DEVICE_OUTPUTS_DIR" "$REPORT_DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters