File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
system-test/src/test/java/oracle/weblogic/deploy/integration Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change
1
+
2
+
3
+
4
+
5
+
6
+
1
7
// Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved.
2
8
// Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
3
9
@@ -79,7 +85,8 @@ protected static void cleanup() throws Exception {
79
85
logger .info ("cleaning up the test environment ..." );
80
86
81
87
// remove WDT script home directory
82
- String cmd = "rm -rf " + getTargetDir () + FS + WDT_HOME_DIR ;
88
+ String cmd = "tar -cvf" + getTargetDir () +FS
89
+
83
90
executeNoVerify (cmd );
84
91
85
92
// delete the domain directory created by the tests
@@ -89,7 +96,13 @@ protected static void cleanup() throws Exception {
89
96
FileUtils .deleteDirectory (domainParentDir );
90
97
}
91
98
}
99
+ protected static void saveLogFiles (testMethodName ) throws Exception {
100
+ logger .info ("saving log files ..." );
92
101
102
+ // remove WDT script home directory
103
+ String cmd = "tar -cvf" + getTargetDir () +FS + "testMethodName.tar " + getTargetDir () + FS + WDT_HOME_DIR ;
104
+ executeNoVerify (cmd );
105
+ }
93
106
protected static String getProjectRoot () {
94
107
return projectRoot ;
95
108
}
Original file line number Diff line number Diff line change @@ -362,6 +362,7 @@ public void testFDiscoverDomainWithRequiredArgument() throws Exception {
362
362
363
363
logger .info ("executing command: " + cmd );
364
364
ExecResult result = ExecCommand .exec (cmd );
365
+ saveLogFiles (testMethodName );
365
366
verifyResult (result , "discoverDomain.sh completed successfully" );
366
367
367
368
// unzip discoveredArchive.zip
@@ -393,6 +394,7 @@ public void testGDiscoverDomainWithModelFile() throws Exception {
393
394
394
395
logger .info ("executing command: " + cmd );
395
396
ExecResult result = ExecCommand .exec (cmd );
397
+ saveLogFiles (testMethodName );
396
398
verifyResult (result , "discoverDomain.sh completed successfully" );
397
399
398
400
// verify model file
@@ -418,6 +420,7 @@ public void testHDiscoverDomainJRFDomainType() throws Exception {
418
420
419
421
logger .info ("executing command: " + cmd );
420
422
ExecResult result = ExecCommand .exec (cmd );
423
+ saveLogFiles (testMethodName );
421
424
verifyResult (result , "discoverDomain.sh completed successfully" );
422
425
423
426
// verify model file
You can’t perform that action at this time.
0 commit comments