(CommandList
  children: [
    (C {(set)} {(-o)} {(nounset)})
    (C {(set)} {(-o)} {(pipefail)})
    (C {(set)} {(-o)} {(errexit)})
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:OSH)
          op: Equal
          rhs: 
            {
              (BracedVarSub
                token: <VSub_Name OSH>
                suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(bin) (Lit_Slash /) (osh)})
                spids: [41 47]
              )
            }
          spids: [40]
        )
      ]
      spids: [38]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:JOBS)
          op: Equal
          rhs: 
            {
              (ArithSubPart
                anode: 
                  (ArithBinary
                    op_id: Arith_Minus
                    left: 
                      (ArithWord
                        w: 
                          {
                            (CommandSubPart
                              command_list: (CommandList children:[(C {(nproc)})])
                              left_token: <Left_CommandSub '$('>
                              spids: [58 60]
                            )
                          }
                      )
                    right: (ArithWord w:{(Lit_Digits 1)})
                  )
                spids: [56 67]
              )
            }
          spids: [55]
        )
      ]
      spids: [53]
    )
    (FuncDef
      name: log
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_At '$@'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[83])]
            )
          ]
          spids: [74]
        )
      spids: [70 73]
    )
    (FuncDef
      name: die
      body: 
        (BraceGroup
          children: [
            (C {(log)} {(DQ ($ VSub_At '$@'))})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [93]
        )
      spids: [89 92]
    )
    (FuncDef
      name: fail
      body: 
        (BraceGroup
          children: [
            (C {(echo)} {(SQ <'TEST FAILURE  '>)} {(DQ ($ VSub_At '$@'))})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [114]
        )
      spids: [110 113]
    )
    (FuncDef
      name: assert
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DPipe]
              children: [
                (C {(test)} {(DQ ($ VSub_At '$@'))})
                (C {(die)} {(DQ ("'") ($ VSub_At '$@') ("' failed"))})
              ]
            )
          ]
          spids: [142]
        )
      spids: [138 141]
    )
    (FuncDef
      name: run-task-with-status
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:out_file)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [173]
                )
              ]
              spids: [171]
            )
            (C {(shift)})
            (AndOr
              ops: [Op_DPipe]
              children: [
                (C {(/usr/bin/env)} {(KW_Time time)} {(--output)} {($ VSub_Name '$out_file')} {(--format)} 
                  {(SQ <'%x %e'>)} {(--)} {(DQ ($ VSub_At '$@'))}
                )
                (C {(true)})
              ]
            )
            (C {(sed)} {(-i)} {(SQ <'/Command exited with non-zero status/d'>)} 
              {($ VSub_Name '$out_file')}
            )
          ]
          spids: [168]
        )
      spids: [164 167]
    )
    (FuncDef
      name: run-task-with-status-test
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DPipe]
              children: [
                (C {(run-task-with-status)} {(_tmp/status.txt)} {(sh)} {(-c)} {(SQ <'sleep 0.1; exit 1'>)})
                (C {(true)})
              ]
            )
            (C {(cat)} {(_tmp/status.txt)})
            (AndOr
              ops: [Op_DPipe]
              children: [
                (C {(test)} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (SimpleCommand
                                words: [{(wc)} {(-l)}]
                                redirects: [
                                  (Redir
                                    op_id: Redir_Less
                                    fd: 16777215
                                    arg_word: {(_tmp/status.txt)}
                                    spids: [295]
                                  )
                                ]
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [290 298]
                      )
                    )
                  } {(Lit_Other '=')} {(SQ <1>)}
                )
                (C {(die)} {(DQ ('Expected only one line'))})
              ]
            )
          ]
          spids: [262]
        )
      spids: [258 261]
    )
    (FuncDef
      name: run-all
      body: 
        (BraceGroup
          children: [
            (ForEach
              iter_name: t
              iter_words: [{(DQ ($ VSub_At '$@'))}]
              do_arg_iter: F
              body: 
                (DoGroup
                  children: [(C {($ VSub_Name '$t')}) (C {(echo)} {(DQ ('OK  ') ($ VSub_Name '$t'))})]
                  spids: [339 357]
                )
              spids: [333 337]
            )
            (C {(echo)})
            (C {(echo)} {(DQ ('All ') ($ VSub_Number '$0') (' tests passed.'))})
          ]
          spids: [325]
        )
      spids: [321 324]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(test)} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {($ VSub_Number '$0')})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [380 384]
                      )
                    )
                  } {(Lit_Other '=')} {(SQ <common.sh>)}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(DQ ($ VSub_At '$@'))})]
          spids: [16777215 394]
        )
      ]
      spids: [16777215 401]
    )
  ]
)