exec
-
[ANT] exec, sshexec로 결과(return, property) 가져오기Software Test/자동화 2016. 1. 26. 17:43
ANT를 좀 더 다양하게 이용하다보면 실행한 결과값을 이용해야할 경우가 있다 이 떄 exec나 sshexec 모두 outputproperty를 이용하면 exec 수행에 따른 결과를 받아올 수 있다. 또한 명령어를 통한 결과값을 받아올 때 줄바꿈까지 오는 경우가 많다. 이 경우에는 line.separotor를 분리해주어야한다. 1. exec result : ${result} 실행 : ant -f test.xml exec_test 결과 exec_test: [echo] result : -rw-rw-r-- 1 test test 308 1¿u 26 17:17 test.xml 2. sshexec ssh_result : ${ssh_result} 실행 : ant -f test.xml sshexec_test 결과 ssh..