Skip to content

Commit 196f035

Browse files
authored
Update folder installation in chrome for testing (#158)
* Update the usage of install_dir parameter for chrome for testing * Remove zip
1 parent 7466d00 commit 196f035

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/commands/install_chrome_for_testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ parameters:
1414
type: string
1515
default: /usr/local/bin
1616
description: >
17-
Directory in which to download Chrome and the driver.
17+
Directory in which to download and install Chrome and the driver.
1818
1919
install_chromedriver:
2020
type: boolean

src/scripts/install_chrome_for_testing.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if uname -a | grep Darwin >/dev/null 2>&1; then
2727
$SUDO rm chrome-for-testing.zip
2828
$SUDO mv ./chrome-mac-arm64 /opt/chrome-for-testing
2929
# leveraging /opt instead of /Applications/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing as this should be temporary
30-
$SUDO ln -fs /opt/chrome-for-testing/chrome /usr/local/bin/chrome
30+
$SUDO ln -fs /opt/chrome-for-testing/chrome "$ORB_PARAM_DIR/chrome"
3131
else
3232
echo "Version $target_version doesn't exist"
3333
#exit 1
@@ -36,6 +36,7 @@ if uname -a | grep Darwin >/dev/null 2>&1; then
3636
if [ "$ORB_PARAM_INSTALL_CHROMEDRIVER" = true ] ; then
3737
$SUDO curl -s -o chrome-for-testing-driver.zip "https://storage.googleapis.com/chrome-for-testing-public/$target_version/mac-arm64/chromedriver-mac-arm64.zip"
3838
$SUDO unzip chrome-for-testing-driver.zip >/dev/null 2>&1
39+
$SUDO rm chrome-for-testing-driver.zip
3940
$SUDO mv chromedriver-mac-arm64/chromedriver chromedriver
4041
fi
4142
elif command -v apt >/dev/null 2>&1; then
@@ -51,7 +52,7 @@ elif command -v apt >/dev/null 2>&1; then
5152
$SUDO unzip chrome-for-testing.zip >/dev/null 2>&1
5253
$SUDO rm chrome-for-testing.zip
5354
$SUDO mv ./chrome-linux64 /opt/chrome-for-testing
54-
$SUDO ln -fs /opt/chrome-for-testing/chrome /usr/local/bin/chrome
55+
$SUDO ln -fs /opt/chrome-for-testing/chrome "$ORB_PARAM_DIR/chrome"
5556
else
5657
echo "Version $target_version doesn't exist"
5758
exit 1
@@ -66,6 +67,7 @@ elif command -v apt >/dev/null 2>&1; then
6667
if [ "$ORB_PARAM_INSTALL_CHROMEDRIVER" = true ] ; then
6768
$SUDO curl -s -o chrome-for-testing-driver.zip "https://storage.googleapis.com/chrome-for-testing-public/$target_version/linux64/chromedriver-linux64.zip"
6869
$SUDO unzip chrome-for-testing-driver.zip >/dev/null 2>&1
70+
$SUDO rm chrome-for-testing-driver.zip
6971
$SUDO mv chromedriver-linux64/chromedriver chromedriver
7072
fi
7173
fi

0 commit comments

Comments
 (0)