File tree 2 files changed +60
-1
lines changed
2 files changed +60
-1
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ BROWSER_DIR=` dirname $( realpath $0 ) ` && cd $BROWSER_DIR
6
+
7
+ function download_chromium {
8
+
9
+ # Set defaults
10
+ arch=" x64"
11
+ os=" linux"
12
+ chromium_version=" 112"
13
+ chromium_binary=" chrome"
14
+ ARCHTYPE=` uname -m`
15
+ force=$1
16
+
17
+ # Architecture
18
+ if [ " $ARCHTYPE " = " aarch64" ] || [ " $ARCHTYPE " = " arm64" ]; then
19
+ arch=" arm64"
20
+ fi
21
+
22
+ # Platform
23
+ if (echo " $OSTYPE " | grep -qi darwin); then
24
+ os=" mac"
25
+ chromium_binary=" Chromium.app/Contents/MacOS/Chromium"
26
+ elif [ " $OSTYPE " = " msys" ] || [ " $OSTYPE " = " cygwin" ] || [ " $OSTYPE " = " win32" ]; then
27
+ os=" win"
28
+ chromium_binary=" chrome.exe"
29
+ BROWSER_DIR=` pwd -W`
30
+ fi
31
+
32
+ # Variables
33
+ artifact=" chromium-$os -$arch .zip"
34
+ chromium_url=" https://ci.opensearch.org/ci/dbc/tools/chromium/$chromium_version /zip/$artifact "
35
+ chromium_path=" $BROWSER_DIR /chromium/chrome-$os /$chromium_binary "
36
+
37
+ # Get artifact
38
+ if [ " $force " = " true" ] || [ ! -f " $chromium_path " ]; then
39
+ rm -rf chromium
40
+ mkdir -p chromium
41
+ cd chromium
42
+ curl -sSLO $chromium_url
43
+ unzip -qq $artifact
44
+ rm $artifact
45
+ fi
46
+
47
+ echo " $chromium_path chromium-$chromium_version os-$os arch-$arch "
48
+
49
+ # Verify binary
50
+ if [ " $os " = " win" ]; then
51
+ powershell -command " (Get-Item $chromium_path )" .VersionInfo
52
+ else
53
+ $chromium_path --version
54
+ fi
55
+ }
Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
+ . ./browser_downloader.sh
6
+
5
7
function usage() {
6
8
echo " "
7
9
echo " This script is used to run integration tests for plugin installed on a remote OpenSearch/Dashboards cluster."
@@ -99,7 +101,9 @@ PASSWORD=`echo $CREDENTIAL | awk -F ':' '{print $2}'`
99
101
# User can send custom browser path through env variable
100
102
if [ -z " $BROWSER_PATH " ]
101
103
then
102
- BROWSER_PATH=" chromium"
104
+ # chromium@1108766 is version 112 with revision r1108766
105
+ # Please keep this version until cypress upgrade or test will freeze: https://github.com/opensearch-project/opensearch-build/issues/4241
106
+ BROWSER_PATH=` download_chromium | head -n 1 | cut -d ' ' -f1`
103
107
fi
104
108
105
109
. ./test_finder.sh
You can’t perform that action at this time.
0 commit comments