Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTalank <talank@gces.edu.np>2022-02-24 10:05:44 +0300
committerGitHub <noreply@github.com>2022-02-24 10:05:44 +0300
commit6feb852e7b53090ac4d6af6eea124dd62bd0c276 (patch)
treedb2c79f432028cd535f6254b73521c7f4620309e /test
parent45d76e9d956d56d9d3b9b5dda248a6f615ae8a61 (diff)
[Tests-Only]Make log comment depends upon existance of logs (#9459)
Diffstat (limited to 'test')
-rw-r--r--test/gui/drone/comment.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/gui/drone/comment.sh b/test/gui/drone/comment.sh
new file mode 100644
index 000000000..e0e463c66
--- /dev/null
+++ b/test/gui/drone/comment.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+# $1 - GUI_TEST_REPORT_DIR
+# $2 - DRONE_REPO
+# $3 - DRONE_BUILD_NUMBER
+
+# create a github comment file only if guiTestUpload Folder is not empty
+if [[ $(find $1 -maxdepth 0 -empty) ]]; then
+ echo "No test results to upload"
+ echo "Exiting..."
+
+else
+ echo "creating comment for GUI log"
+ # if there is index.html generated by squishrunner then create a comment indicating link of GUI result
+ if [[ -f $1/index.html ]]; then
+ echo ":boom: The GUI tests failed."
+ echo "GUI Logs: (${CACHE_ENDPOINT}/${CACHE_BUCKET}/$2/$3/guiReportUpload/index.html)" >> $1/comments.file
+ fi
+
+ # if there is serverlog.log generated by squishserver then create a comment indicating link of server result
+ if [[ -f $1/serverlog.log ]]; then
+ echo "creating comment for server log"
+ echo "Server Logs: (${CACHE_ENDPOINT}/${CACHE_BUCKET}/$2/$3/guiReportUpload/serverlog.log)" >> $1/comments.file
+ fi
+fi \ No newline at end of file