(command.CommandList
  children: [
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$FORK'))} {(Id.Lit_RBracket ']')})
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:TIMEOUT)
              op: assign_op.Equal
              rhs: 
                {
                  (braced_var_sub
                    token: (Token id:Id.VSub_Name val:TIMEOUT span_id:26)
                    suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(180)})
                  )
                }
              spids: [24]
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {(.)} {(sources/utility_functions.sh)})
        (command.ControlFlow
          token: (Token id:Id.ControlFlow_Exit val:exit span_id:38)
          arg_word: {(1)}
        )
      ]
    )
    (command.ShFunction
      name: dotest
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$FORK'))} 
                  {(Id.Lit_RBracket ']')}
                )
                (C {(echo)} {(-n)} {(DQ ('Testing ') ($ Id.VSub_Number '$1') (':'))})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} 
                  {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {(Id.Lit_RBracket ']')}
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:VERBOSITY)
                      op: assign_op.Equal
                      rhs: {(DQ ('tee >(cat >&2) |'))}
                      spids: [89]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RESULT)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:97)
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (command.Simple
                                      words: [{(more/smoketest.sh)} {(DQ ($ Id.VSub_Number '$1'))}]
                                      redirects: [
                                        (redir.Redir
                                          op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:104)
                                          fd: 2
                                          arg_word: {(1)}
                                        )
                                      ]
                                    )
                                    (C {(eval)} 
                                      {
                                        (DQ ($ Id.VSub_DollarName '$VERBOSITY') 
                                          (" grep 'Hello world!'")
                                        )
                                      }
                                    )
                                  ]
                                  negated: F
                                )
                              ]
                            )
                        )
                      )
                    }
                  spids: [95]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [
                (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$RESULT'))} 
                  {(Id.Lit_RBracket ']')}
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:RESULT)
                      op: assign_op.Equal
                      rhs: {(DQ (FAIL))}
                      spids: [131]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:RESULT)
                      op: assign_op.Equal
                      rhs: {(DQ (PASS))}
                      spids: [138]
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [
                (C {(Id.Lit_LBracket '[')} {(-z)} {(DQ ($ Id.VSub_DollarName '$FORK'))} 
                  {(Id.Lit_RBracket ']')}
                )
                (C {(echo)} {(DQ ($ Id.VSub_DollarName '$RESULT'))})
                (C {(echo)} 
                  {(DQ ('Testing ') ($ Id.VSub_Number '$1') (':') ($ Id.VSub_DollarName '$RESULT'))}
                )
              ]
            )
            (command.Simple
              words: [{(rm)} {(-f)} {(build/system-image-) (DQ ($ Id.VSub_Number '$1')) (/hdb.img)}]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'2>' span_id:184)
                  fd: 2
                  arg_word: {(/dev/null)}
                )
              ]
            )
          ]
        )
    )
    (command.ForEach
      iter_name: i
      iter_words: [
        {
          (command_sub
            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:203)
            command_list: 
              (command.CommandList
                children: [
                  (command.Pipeline
                    children: [
                      (C {(ls)} {(-d)} {(sources/targets/) (Id.Lit_Star '*')})
                      (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'s@.*/@@' span_id:216))})
                      (C {(grep)} {(-v)} {(DQ ('^hw-'))})
                    ]
                    negated: F
                  )
                ]
              )
          )
        }
      ]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (C {(Id.Lit_LBracket '[')} {(-e)} 
                      {(DQ (build/system-image-) ($ Id.VSub_DollarName '$i'))} {(Id.Lit_RBracket ']')}
                    )
                  ]
                  action: [(C {(maybe_fork)} {(DQ ('dotest ') ($ Id.VSub_DollarName '$i'))})]
                  spids: [233 247]
                )
              ]
              else_action: [(C {(echo)} {(DQ ('Testing ') ($ Id.VSub_DollarName '$i') (':NONE'))})]
            )
          ]
        )
    )
    (C {(wait)})
  ]
)