data = '''
================================================================================
Annotation file:
/b/cd-builder/sandboxes/sb_DEV_COMMON_BRANCH-_act-builder-4977/annofile-4977TB53661_cd-builder.xml
Build ID: 27951 on Host bng-emake-5a.juniper.net, Cluster Manager: bng-ea-cm-02:8030
Start Time: Sun Jun 17 23:57:30 2018
Job ID: J00002adde8677420 , Exit Value 1
CWD: /b/cd-builder/sandboxes/sb_DEV_COMMON_BRANCH-_act-builder-4977/obj/bsd11/amd64/junos/usr.sbin/rpd/bgp/lib/proto
Node: bng-ea-agent-14a-3 Start: 2018-06-18 00:20:55.488609 (1405.488609)
End: 2018-06-18 00:20:56.653945 (1406.653945)
Command:
export BMAKELOCATION=/b/cd-builder/sandboxes/sb_DEV_COMMON_BRANCH-_act-builder-4977/src/build/mk/jnx.sym_check.mk:37; CURDIR=/b/cd-builder/sandboxes/sb_DEV_COMMON_BRANCH-_act-builder-4977/src/junos/usr.sbin/rpd/bgp/lib/proto OBJDUMP=/volume/hab/Linux/Ubuntu-12.04/x86_64/llvm/3.7/current/bin/amd64-unknown-freebsd11.0-objdump BSS_SYMS=bss_syms.clang.amd64,bsdx TLS_SYMS=tls_syms.clang.amd64,bsdx ACCEPT_CMD='mk --machine amd64,bsd11 -C junos/usr.sbin/rpd/bgp/lib/proto accept-syms' /volume/hab/Linux/Ubuntu-12.04/x86_64/bsd-tools/current/bin/sh /b/cd-builder/sandboxes/sb_DEV_COMMON_BRANCH-_act-builder-4977/src/build/scripts/sym_check.sh librpd-proto-bgp.a
------------------------------ Output ------------------------------
ERROR: /b/cd-builder/sandboxes/sb_DEV_COMMON_BRANCH-_act-builder-4977/src/junos/usr.sbin/rpd/bgp/lib/proto/tls_syms.clang.amd64,bsdx: changed global or static TLS variables
261a262
> bgp_inetsrte_incolor_update._xinfo
If correct, use:
mk --machine amd64,bsd11 -C junos/usr.sbin/rpd/bgp/lib/proto accept-syms
make[1]: *** [check-syms] Error 1
--------------------------------------------------------------------
Operations:
================================================================================
+ echo -e '\e[31m Displaying Production.log.errs\e[0m'
Displaying Production.log.errs
+ echo 'End Meta Error logs'
End Meta Error logs
'''
output = '''
ERROR: /b/cd-builder/sandboxes/sb_DEV_COMMON_BRANCH-_act-builder-4977/src/junos/usr.sbin/rpd/bgp/lib/proto/tls_syms.clang.amd64,bsdx: changed global or static TLS variables
261a262
> bgp_inetsrte_incolor_update._xinfo
If correct, use:
mk --machine amd64,bsd11 -C junos/usr.sbin/rpd/bgp/lib/proto accept-syms
make[1]: *** [check-syms] Error 1
'''
不知道为什么我下面的代码不起作用。
for result in re.findall(r'------------------------------ Output ------------------------------(.*?) '
'--------------------------------------------------------------------', data, re.S):
output += result