RobertBerger icon

task debugging

RobertBerger | PRO | 03/24/22 06:43:12 AM UTC | 0 ⭐ | 707 👁️ | Never ⏰ | []
text |

610 B

|

None

|

0 👍

/

0 👎

# this is a python task:
python do_printdate () {
    import datetime
    # goes to cooker shell:
    bb.warn('py: --> S: %s <--' % (d.getVar("S", True)))
    bb.plain('py: Date: %s' % (datetime.date.today()))
    # goes to log:
    print(datetime.datetime.now())
    print(datetime.date.today())
    # goes to cooker shell:
    bb.plain("py: Check the logs!")
    bb.plain('py: this log file: %s/log.do_printdate' % (d.getVar("T", True)))
}
addtask do_printdate after do_compile before do_install
 # this is a shell task:
do_s () {
    bbwarn "shell: --> S: ${S} <--"
}
addtask do_s before do_printdate
 

Comments