From a4453615d465cfef0bd8334d0a09ef63e2deb822 Mon Sep 17 00:00:00 2001 From: dibs Date: Fri, 29 Mar 2013 17:54:54 +0900 Subject: [PATCH] [title] Fixed testcase about query-log command --- build-cli | 3 ++ .../build-server.basic1/build-cli-32.testcase | 32 +++---------------- 2 files changed, 7 insertions(+), 28 deletions(-) diff --git a/build-cli b/build-cli index 47186af..760f48a 100755 --- a/build-cli +++ b/build-cli @@ -38,6 +38,7 @@ require "BuildComm" require "FileTransferViaFTP" require "FileTransferViaDirect" require "JobLog" +require "BuildServerException" #option parsing @@ -321,6 +322,7 @@ begin raise RuntimeError, "The output file is already exist." end log = File.open(output, "w") + puts "Started query log, writing to the file \"#{output}\"" end result = JobLog.monitor(addr[0], addr[1], option[:job].strip) do |line| @@ -328,6 +330,7 @@ begin end if result and not output.nil? then log.puts "=LOG_END" + puts "End query log, check file \"#{output}\"" end rescue BuildServerException => e log.puts e.err_message() diff --git a/test/build-server.basic1/build-cli-32.testcase b/test/build-server.basic1/build-cli-32.testcase index 691473e..5a14609 100644 --- a/test/build-server.basic1/build-cli-32.testcase +++ b/test/build-server.basic1/build-cli-32.testcase @@ -1,34 +1,10 @@ #PRE-EXEC echo "query-log" -../../build-cli query-log -d 127.0.0.1:2223 -j 1 --output a.txt +rm -rf a.txt #EXEC -cat a.txt | grep {2} | cut -d '}' -f2 +../../build-cli query-log -d 127.0.0.1:2223 -j 1 --output a.txt #POST-EXEC rm -rf a.txt #EXPECT -Added new job -Initializing job... -Checking package version ... -Invoking a thread for building Job -New Job -hecking build dependency ... -Checking install dependency ... -Started to build this job... -JobBuilder -ownloding client is initializing... -Installing dependent packages... -Downloading dependent source packages... -Make clean... -Make build... -Make install... -eneratiing pkginfo.manifest... -Zipping... -Creating package file ... a_0.0.1_ubuntu-32.zip -Checking reverse build dependency ... -Uploading ... -Upload succeeded. Sync local pkg-server again... -Snapshot: -Job is completed! -Job is FINISHED successfully! -Updating the source info for project "testa" -=LOG_END +Started query log, writing to the file "a.txt" +End query log, check file "a.txt" -- 2.34.1