You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Boolean to see if any failure has occured while executing commands
30
+
failure="false"
31
+
29
32
main() {
30
33
31
34
setVscodeVersionToTest
@@ -40,6 +43,7 @@ main() {
40
43
npm run build
41
44
npm run compile
42
45
vsce package
46
+
updateExitStatus
43
47
else
44
48
45
49
#Initialisation step
@@ -67,9 +71,12 @@ main() {
67
71
chown -R runner src/test/resources/gradle
68
72
# Gradle tests should be run before Maven tests because the after hook for copying the screeshots from temporary to a permananet location is written in the Maven tests so that the copying will be done at the end of every test cases.
69
73
npm run test-mac-gradle -- -u
74
+
updateExitStatus
70
75
npm run test-mac-maven -- -u
76
+
updateExitStatus
71
77
else
72
78
npm run test -- -u
79
+
updateExitStatus
73
80
fi
74
81
else
75
82
# Run the plugin's install goal against the target vscode version
@@ -78,18 +85,19 @@ main() {
78
85
chown -R runner src/test/resources/gradle
79
86
# Gradle tests should be run before Maven tests because the after hook for copying the screeshots from temporary to a permananet location is written in the Maven tests so that the copying will be done at the end of every test cases.
80
87
npm run test-mac-gradle -- -u -c $VSCODE_VERSION_TO_RUN
88
+
updateExitStatus
81
89
npm run test-mac-maven -- -u -c $VSCODE_VERSION_TO_RUN
82
-
90
+
updateExitStatus
83
91
else
84
92
npm run test -- -u -c $VSCODE_VERSION_TO_RUN
93
+
updateExitStatus
85
94
fi
86
95
fi
87
96
fi
88
97
89
98
# If there were any errors, gather some debug data before exiting.
90
-
rc=$?
91
-
if [ "$rc"-ne 0 ];then
92
-
echo"ERROR: Failure while driving npm install on plugin. rc: ${rc}."
99
+
if [ "$failure"="true" ];then
100
+
echo"ERROR: Failure occurred while running ${TYPE} step."
93
101
94
102
if [ $TYPE="TEST" ];then
95
103
echo"DEBUG: Maven Liberty messages.log:\n"
@@ -152,4 +160,13 @@ setVscodeVersionToTest() {
152
160
fi
153
161
}
154
162
163
+
# Finding the exit status of a command and updating failure boolean.
164
+
# Need to call this method after executing each npm command to store the status.
165
+
updateExitStatus() {
166
+
status=$?
167
+
if [ "$failure"="false" ] && [ $status-ne 0 ];then
0 commit comments