github.com/upcmd/up@v0.8.1-0.20230108151705-ad8b797bf04f/tests/functests/c0107.yml (about) 1 doc_meta: | 2 folder: test-debug 3 title: ues trace 4 head: | 5 For a complicated workflow, if you need to trace and pin point a step, you can use trace cmd. This introduces trace to set a colorful trace marker to easily locate problem in verbose log 6 7 Please note that the display of trace is colored in terminal output 8 9 sections: 10 - title: Demo 11 log: yes 12 13 notes: 14 goal: 15 - to fix a bug in callee task which var has been updated but not reflected 16 - introduce trace to set a colorful trace marker to easily locate problem in verbose log 17 - demo that the vars in callee task has its own stack 18 19 vars: 20 tom: this is tom in global 21 jerry: this is jerry in global 22 23 tasks: 24 - 25 name: task 26 task: 27 - 28 func: call 29 do: sub 30 31 - 32 func: cmd 33 desc: check value of tom 34 do: 35 - name: print 36 cmd: 'in main task print3: {{.tom}}' 37 38 - 39 name: sub 40 task: 41 - 42 func: cmd 43 desc: check value of tom 1 44 vars: 45 john: john in sub func1 46 do: 47 - name: reg 48 cmd: 49 name: tom 50 desc: by default tom is registered in to global context 51 value: 'tom created in sub' 52 53 - name: print 54 cmd: 'in sub print1: {{.tom}}' 55 56 - 57 func: cmd 58 do: 59 - name: trace 60 cmd: debug tom's value==> 61 62 - 63 func: cmd 64 desc: check value of tom 2 65 vars: 66 john: john in sub func2 67 do: 68 - name: print 69 cmd: 'in sub print2: {{.tom}}' 70 71 - 72 func: cmd 73 do: 74 - name: trace 75 cmd: <==debug tom's value