github.com/upcmd/up@v0.8.1-0.20230108151705-ad8b797bf04f/tests/functests/c0116.yml (about) 1 notes: 2 goal: 3 - not included to docs 4 - add feature to show task tree 5 - test task inspect 6 - goup list task -d ./tests/functests -t c0116.yml -i dev --configdir=./tests/functests 7 8 tasks: 9 - 10 name: task 11 desc: main entry 12 task: 13 - 14 func: cmd 15 name: step1 16 desc: check value of tom after it is registered in current task stack 17 do: 18 - name: print 19 cmd: 'in subtask1 print1: {{.tom}}' 20 21 - 22 func: call 23 name: step2 24 desc: call subtask and exam the return value in following steps 25 do: subtask1 26 27 - 28 func: cmd 29 desc: | 30 check value of tom 31 in this case tom's value should come from subtask1 32 tom's expected value: tom created in subtask1 33 do: 34 - name: print 35 cmd: 'in main task print3: {{.tom}}' 36 37 - 38 name: subtask1 39 desc: subtask to test reg and return 40 task: 41 - 42 func: cmd 43 desc: check value of tom after it is registered in current task stack 44 do: 45 - name: print 46 cmd: 'in subtask1 print1: {{.tom}}' 47 48 - 49 func: cmd 50 desc: check value of tom and it should be available in current stack 51 vars: 52 john: john in sub_loop func2 53 do: 54 - name: print 55 cmd: 'in subtask1 print21: {{.tom}}' 56 57 - 58 func: call 59 desc: call subtask and exam the return value in following steps 60 do: subtask2 61 62 - 63 func: cmd 64 desc: check value of tom and it should be available in current stack 65 vars: 66 john: john in sub_loop func2 67 do: 68 - name: print 69 cmd: 'in subtask1 print22: {{.tom}}' 70 71 - name: return 72 cmd: 73 - tom 74 75 - 76 name: subtask2 77 desc: subtask to test reg and return 78 task: 79 - 80 func: cmd 81 desc: check value of tom after it is registered in current task stack 82 vars: 83 john: john in sub_loop func1 84 do: 85 - name: reg 86 desc: by default hitom is registered in to global context 87 cmd: 88 name: tom 89 value: 'tom2 created in subtask2' 90 91 - name: print 92 cmd: 'in subtask2 print1: {{.tom}}' 93 94 - 95 func: cmd 96 desc: check value of tom and it should be available in current stack 97 vars: 98 john: john in sub_loop func2 99 do: 100 - name: print 101 cmd: 'in subtask2 print2: {{.tom}}' 102 103 - name: return 104 cmd: 105 - tom 106