fastlane-plugin-android_testlab_script_swit 0.1.40 → 0.1.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/android_testlab_script_swit/actions/android_testlab_script_swit_action.rb +17 -15
- data/lib/fastlane/plugin/android_testlab_script_swit/helper/android_testlab_script_swit_helper.rb +4 -18
- data/lib/fastlane/plugin/android_testlab_script_swit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c15ca72f725c182785dc8e83d26b2da450f74c60dfe41e44bd828ee3e0cde1e4
|
4
|
+
data.tar.gz: 6be234529f0c6764906ba4c4aa2a335ec71afabeaf52d8c3f60d80f6f21705e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbe5dcf6aee2a3a5c90e643ec8f376e7ac32b59d44ab8f35c6ccab286011c1cedde767276fbf37a01f79db10deffed64eed1197d6c3267af48e07fddd6f6313c
|
7
|
+
data.tar.gz: a01b4db94d039dc74017ff75e17b224622a5d3f2fe9801f569650918b5c8323d5346e105fb998db8d01c4a079dea26d417e41b80c141cf1403a582e22e0f1353
|
data/lib/fastlane/plugin/android_testlab_script_swit/actions/android_testlab_script_swit_action.rb
CHANGED
@@ -24,7 +24,9 @@ module Fastlane
|
|
24
24
|
robo_script_option = params[:robo_script_path].nil? ? "" : "--robo-script #{params[:robo_script_path]} "
|
25
25
|
|
26
26
|
# Run Firebase Test Lab
|
27
|
-
|
27
|
+
UI.message(params[:gcloud_components_channel])
|
28
|
+
|
29
|
+
Helper.run_tests(params[:gcloud_components_channel], "--type #{params[:type]} "\
|
28
30
|
"--app #{params[:app_apk]} "\
|
29
31
|
"#{"--test #{params[:app_test_apk]} " unless params[:app_test_apk].nil?}"\
|
30
32
|
"#{"--use-orchestrator " if params[:type] == "instrumentation" && params[:use_orchestrator]}"\
|
@@ -39,20 +41,20 @@ module Fastlane
|
|
39
41
|
|
40
42
|
# wait_for_test_to_complete(test_results_url)
|
41
43
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
44
|
+
# json = JSON.parse(File.read(params[:console_log_file_name]))
|
45
|
+
# UI.message("Test status: #{json}")
|
46
|
+
#
|
47
|
+
# # Fetch results
|
48
|
+
# download_dir = params[:download_dir]
|
49
|
+
# if download_dir
|
50
|
+
# UI.message("Fetch results from Firebase Test Lab results bucket")
|
51
|
+
# json.each do |status|
|
52
|
+
# axis = status["axis_value"]
|
53
|
+
# Helper.if_need_dir("#{download_dir}/#{axis}")
|
54
|
+
# Helper.copy_from_gcs("#{results_bucket}/#{results_dir}/#{axis}", download_dir)
|
55
|
+
# Helper.set_public("#{results_bucket}/#{results_dir}/#{axis}")
|
56
|
+
# end
|
57
|
+
# end
|
56
58
|
|
57
59
|
UI.message("Finish Action")
|
58
60
|
end
|
data/lib/fastlane/plugin/android_testlab_script_swit/helper/android_testlab_script_swit_helper.rb
CHANGED
@@ -32,27 +32,13 @@ module Fastlane
|
|
32
32
|
Action.sh("gcloud auth activate-service-account --key-file #{gcloud_key_file}")
|
33
33
|
end
|
34
34
|
|
35
|
-
def self.run_tests(
|
35
|
+
def self.run_tests(arguments)
|
36
36
|
UI.message("Test running...")
|
37
|
-
Action.sh("set +e; gcloud
|
37
|
+
Action.sh("set +e; gcloud#{' ' + gcloud_components_channel unless gcloud_components_channel == "stable"} firebase test android run #{arguments}; set -e")
|
38
|
+
# Action.sh("set +e; gcloud #{gcloud_components_channel unless gcloud_components_channel == "stable"} firebase test android run #{arguments}; set -e")
|
39
|
+
# Action.sh("set +e; gcloud stable firebase test android run #{arguments}; set -e")
|
38
40
|
end
|
39
41
|
|
40
|
-
def self.run_tests2(gcloud_components_channel, arguments)
|
41
|
-
UI.message("Test running...")
|
42
|
-
|
43
|
-
thread = Thread.new do
|
44
|
-
Action.sh("set +e; gcloud #{gcloud_components_channel unless gcloud_components_channel == "stable"} firebase test android run #{arguments}; set -e")
|
45
|
-
end
|
46
|
-
|
47
|
-
while thread.alive?
|
48
|
-
# Do something while waiting for the test to complete...
|
49
|
-
sleep(10) # wait for a few seconds before checking again.
|
50
|
-
end
|
51
|
-
|
52
|
-
UI.message("Test completed.")
|
53
|
-
end
|
54
|
-
|
55
|
-
|
56
42
|
def self.copy_from_gcs(bucket_and_path, copy_to)
|
57
43
|
UI.message("Copy from gs://#{bucket_and_path}")
|
58
44
|
Action.sh("gsutil -m cp -r gs://#{bucket_and_path} #{copy_to}")
|