Change-Id: I6bdfdc011100b8f6a51757fe638d4afd321b57bc
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3722
Reviewed-by: Chang Lee <changlee@vmware.com>
Tested-by: gerrit-photon <photon-checkins@vmware.com>
| ... | ... |
@@ -560,9 +560,21 @@ class PackageUtils(object): |
| 560 | 560 |
containerID, |
| 561 | 561 |
package, |
| 562 | 562 |
macros) |
| 563 |
+ self.logger.info("Successfully built rpm:"+package)
|
|
| 563 | 564 |
except Exception as e: |
| 564 | 565 |
self.logger.error("Failed while building rpm: " + package)
|
| 565 | 566 |
raise e |
| 567 |
+ finally: |
|
| 568 |
+ if destLogPath is not None: |
|
| 569 |
+ rpmLog = destLogPath + "/" + package + ".log" |
|
| 570 |
+ if constants.rpmCheck and package in constants.testForceRPMS and constants.specData.isCheckAvailable(package): |
|
| 571 |
+ cmd="sed -i '/^Executing(%check):/,/^Processing files:/{//!b};d' "+ rpmLog
|
|
| 572 |
+ logFile = destLogPath+"/adjustTestFile.log" |
|
| 573 |
+ returnVal = CommandUtils().runCommandInShell(cmd, logFile) |
|
| 574 |
+ testLogFile = destLogPath+"/"+package+"-test.log" |
|
| 575 |
+ shutil.copyfile(rpmLog, testLogFile) |
|
| 576 |
+ else: |
|
| 577 |
+ shutil.copy2(rpmLog, destLogPath) |
|
| 566 | 578 |
self.logger.info("RPM build is successful")
|
| 567 | 579 |
|
| 568 | 580 |
# Verify RPM and SRPM files exist as success criteria |