forked from oracle-actions/setup-testpilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
61 lines (49 loc) · 1.26 KB
/
Copy pathMain.java
File metadata and controls
61 lines (49 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
** Oracle Test Pilot
**
** Copyright (c) 2025-2026 Oracle
** Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
*/
package com.oracle.testpilot;
import com.oracle.testpilot.exception.TestPilotException;
import java.util.Locale;
/**
* Oracle Test Pilot services main entry point.
*
* @author LLEFEVRE
* @since 1.0.0
*/
public class Main {
static {
Locale.setDefault(Locale.US);
System.setProperty("java.net.useSystemProxies", "false");
}
public static final String VERSION="1.0.25";
public static void main(final String[] args) {
int exitStatus = 0;
Session session = null;
try {
session = new Session(args);
session.run();
}
catch (TestPilotException te) {
exitStatus = te.getErrorCode();
if (session != null) {
switch (session.action) {
case CREATE:
System.out.printf("Provisioning failed (%d)%n", exitStatus);
break;
case DELETE:
System.out.printf("De-provisioning failed (%d)%n", exitStatus);
break;
case SKIP_TESTING:
System.out.printf("Skip testing check failed (%d)%n", exitStatus);
break;
}
}
//System.out.println("Error: " + te.getMessage());
te.printStackTrace(System.err);
}
System.exit(exitStatus);
}
}