Hi,
We execute a python script from QuickBild and want a log to print all the script printings.
We use a string buffer to save the output and the log is being cut.
Any idea how can we save and show the full log?
This is our groovy code:
def command = ("python /home/svjer/my_tests/Scripts/automation/ssh.py"
+ " " + vars.getValue("host_ip")
+ " " + vars.getValue("hostname")
+ " " + vars.getValue("pdu_ip")
+ " " + vars.getValue("pdu_port")
+ " " + vars.getValue("number_of_pf")
+ " " + vars.getValue("gpio_ip")
+ " " + vars.getValue("gpio_port"))
logger.warn(command)
logger.info "command to execute is :" + command;
String[] output;
String oneline="";
proc = command.execute()
def outputStream = new StringBuffer();
def erroutputStream = new StringBuffer();
proc.waitForProcessOutput(outputStream, erroutputStream );
logger.info ("out = {} " , outputStream );
logger.info ("error = {}" ,erroutputStream);
And the log we get:
23:17:13,681 INFO - out = /home/svjer/quickbuild-9.0.9/bin
/home/svjer/quickbuild-9.0.9/bin
['/home/svjer/my_tests/Scripts/automation/ssh.py', '10.12.234.244', 'Platform2', '10.12.235.3', '2', '1', '10.12.249.49', '4']
['/home/svjer/my_tests/Scripts/automation/ssh.py', '10.12.234.244', 'Platform2', '10.12.235.3', '2', '1', '10.12.249.49', '4']
start
Test Start Time : 2019-06-11 23:17:12
^^^^^^^^^^^^^^^^^^^^^^^^^^ Setting GPIO Board to Debug MODE ^^^^^^^^^^^^^^^^^^^^^^^^
Child returned {} {}
^^^^^^^^^^^^^^^^^^^^^^^^^^ GPIO Board Set to Debug MODE ^^^^^^^^^^^^^^^^^^^^^^^^
svjer@10.12.234.244's password: $giga
Last login: Tue Jun 11 23:15:37 2019 from 10.12.249.131
[1;32m
############################################
[0m
Fedora release 26 (Twenty Six)
[1;32m
Platform2
[0m
4.16.11-100.fc26.x86_64
Tue Jun 11 04:03:47 IDT 2019
[1;32m
############################################
[0m
################Host Connected###########################
svjer@10.12.234.244's p...
This is the log we supposed to get:
python ssh.py Platform2 Platform2 10.12.235.3 2 1 10.12.249.49 4
['ssh.py', 'Platform2', 'Platform2', '10.12.235.3', '2', '1', '10.12.249.49', '4']
['ssh.py', 'Platform2', 'Platform2', '10.12.235.3', '2', '1', '10.12.249.49', '4']
start
Test Start Time : 2019-06-11 14:17:21
^^^^^^^^^^^^^^^^^^^^^^^^^^ Setting GPIO Board to Debug MODE ^^^^^^^^^^^^^^^^^^^^^^^^
/home/svjer/my_tests/Scripts/automation
/home/svjer/my_tests/Scripts/automation
Child returned {} {}
^^^^^^^^^^^^^^^^^^^^^^^^^^ GPIO Board Set to Debug MODE ^^^^^^^^^^^^^^^^^^^^^^^^
svjer@platform2's password: $giga
Last login: Tue Jun 11 14:16:12 2019 from 10.12.249.131
############################################
Fedora release 26 (Twenty Six)
Platform2
4.16.11-100.fc26.x86_64
Tue Jun 11 04:03:47 IDT 2019
############################################
################Host Connected###########################
svjer@platform2's password: $giga
Last login: Tue Jun 11 14:17:21 2019 from 10.12.249.131
############################################
Fedora release 26 (Twenty Six)
Platform2
4.16.11-100.fc26.x86_64
Tue Jun 11 04:03:47 IDT 2019
############################################
################Host Connected###########################
ls /home/svjer/Desktop/Images/ -1t | head -1
[svjer@Platform2 ~$] ls /home/svjer/Desktop/Images/ -1t | head -1
TEST_FVLB1_XXV710_7p00_KR_KR4_SFP28_NCSI_CFGID12p0_Dual_8MB_0.96_80004E8D.bin
TEST_FVLB1_XXV710_7p00_KR_KR4_SFP28_NCSI_CFGID12p0_Dual_8MB_0.96_80004E8D
/net/Platform2/home/svjer/Desktop/Images/TEST_FVLB1_XXV710_7p00_KR_KR4_SFP28_NCSI_CFGID12p0_Dual_8MB_0.96_80004E8D.bin
///////////////////////////// /net/Platform2/home/svjer/Desktop/Images/TEST_FVLB1_XXV710_7p00_KR_KR4_SFP28_NCSI_CFGID12p0_Dual_8MB_0.96_80004E8D.bin
^^start erase
Host.hostname = Platform2
lspci | grep "Ethernet Controller"
[svjer@Platform2 ~$] EEID = 0x80004E8D
**
Important comment: our real script is much longer than this one
**
Thanks,
Meital.