(command.CommandList
  children: [
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (C {<.>} 
              {
                (DQ 
                  (braced_var_sub
                    token: <Id.VSub_Name srcdir>
                    suffix_op: (suffix_op.Unary op_id:Id.VTest_Equals arg_word:{<.>})
                  ) <'/tests/init.sh'>
                )
              }
            )
          terminator: <Id.Op_Semi _>
        )
        (C {<path_prepend_>} {<'./src'>})
      ]
    )
    (C {<print_ver_>} {<tail>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:debug)
          op: assign_op.Equal
          rhs: {(SQ <---disable-inotify>)}
          spids: [71]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:debug)
          op: assign_op.Equal
          rhs: (word.Empty)
          spids: [76]
        )
      ]
    )
    (command.CommandList
      children: [
        (command.Sentence
          child: 
            (command.Simple
              words: [{<tail>} {($ Id.VSub_DollarName '$debug')} {<-F>} {<-s.1>} {<'missing/file'>}]
              redirects: [
                (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<out>})
                (redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})
              ]
              do_fork: T
            )
          terminator: <Id.Op_Amp _>
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:pid)
              op: assign_op.Equal
              rhs: {($ Id.VSub_Bang '$!')}
              spids: [97]
            )
          ]
        )
      ]
    )
    (command.ShFunction
      name: check_tail_output
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'delay='> (DQ ($ Id.VSub_Number '$1'))})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [{<grep>} {(DQ ($ Id.VSub_DollarName '$tail_re'))} {<out>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
                (BraceGroup
                  children: [
                    (command.Sentence
                      child: (C {<sleep>} {($ Id.VSub_DollarName '$delay')})
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (command.Simple
          words: [{<retry_delay_>} {<check_tail_output>} {<.1>} {<7>}]
          more_env: [(env_pair name:tail_re val:{(SQ <'cannot open'>)} spids:[154])]
          do_fork: T
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:fail)
              op: assign_op.Equal
              rhs: {<1>}
              spids: [169]
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<mkdir>} {<missing>})
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:fail)
              op: assign_op.Equal
              rhs: {<1>}
              spids: [179]
            )
          ]
        )
      ]
    )
    (command.Subshell
      child: 
        (command.AndOr
          ops: [Id.Op_DAmp]
          children: [
            (C {<cd>} {<missing>})
            (command.Simple
              words: [{<echo>} {<x>}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<file>})]
              do_fork: T
            )
          ]
        )
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (command.Simple
          words: [{<retry_delay_>} {<check_tail_output>} {<.1>} {<7>}]
          more_env: [(env_pair name:tail_re val:{(SQ <'has appeared'>)} spids:[205])]
          do_fork: T
        )
        (BraceGroup
          children: [
            (command.Sentence
              child: (C {<echo>} {(DQ ($ Id.VSub_Number '$0') <': file: unexpected delay?'>)})
              terminator: <Id.Op_Semi _>
            )
            (command.Sentence child:(C {<cat>} {<out>}) terminator:<Id.Op_Semi _>)
            (command.Sentence
              child: 
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:fail)
                      op: assign_op.Equal
                      rhs: {<1>}
                      spids: [236]
                    )
                  ]
                )
              terminator: <Id.Op_Semi _>
            )
          ]
        )
      ]
    )
    (C {<kill>} {<-HUP>} {($ Id.VSub_DollarName '$pid')})
    (command.ShFunction
      name: cleanup
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'delay='> (DQ ($ Id.VSub_Number '$1'))})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<rm>} {<-rf>} {<missing>})
                (BraceGroup
                  children: [
                    (command.Sentence
                      child: (C {<sleep>} {($ Id.VSub_DollarName '$delay')})
                      terminator: <Id.Op_Semi _>
                    )
                    (command.Sentence
                      child: (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (C {<retry_delay_>} {<cleanup>} {<.1>} {<6>})
    (C {<Exit>} {($ Id.VSub_DollarName '$fail')})
  ]
)