(command.CommandList
  children: [
    (C {<set>} {<-euo>} {<pipefail>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:THIS_DIR)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (C {<dirname>} 
                    {
                      (DQ 
                        (command_sub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (C {<readlink>} {<-f>} 
                              {
                                (DQ 
                                  (braced_var_sub
                                    token: <Id.VSub_Name BASH_SOURCE>
                                    bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                                  )
                                )
                              }
                            )
                        )
                      )
                    }
                  )
              )
            }
          spids: [59]
        )
      ]
    )
    (C {<cd>} {(DQ ($ Id.VSub_DollarName '$THIS_DIR'))})
    (C {<'../shell/test-packages.sh'>} {<-f>})
    (C {<export>} 
      {<Id.Lit_VarLike 'SANDSTORM_DIR='> 
        (DQ 
          (braced_var_sub
            token: <Id.VSub_Name SANDSTORM_DIR>
            suffix_op: 
              (suffix_op.Unary
                tok: <Id.VTest_ColonHyphen ':-'>
                arg_word: {<Id.Lit_Slash '/'> <opt> <Id.Lit_Slash '/'> <sandstorm>}
              )
          )
        )
      }
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<test>} {<-e>} {<'assets/ssjekyll5.spk'>})
        (command.Simple
          words: [{<curl>} {<https> <Id.Lit_Colon ':'> <'//sandstorm.io/apps/ssjekyll5.spk'>}]
          redirects: [
            (redir
              op: <Id.Redir_Great '>'>
              loc: (redir_loc.Fd fd:1)
              arg: {<'assets/ssjekyll5.spk'>}
            )
          ]
          do_fork: T
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<test>} {<-e>} {<'assets/ssjekyll6.spk'>})
        (command.Simple
          words: [{<curl>} {<https> <Id.Lit_Colon ':'> <'//sandstorm.io/apps/ssjekyll6.spk'>}]
          redirects: [
            (redir
              op: <Id.Redir_Great '>'>
              loc: (redir_loc.Fd fd:1)
              arg: {<'assets/ssjekyll6.spk'>}
            )
          ]
          do_fork: T
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<test>} {<-e>} {<'assets/ssjekyll7.spk'>})
        (command.Simple
          words: [{<curl>} {<https> <Id.Lit_Colon ':'> <'//sandstorm.io/apps/ssjekyll7.spk'>}]
          redirects: [
            (redir
              op: <Id.Redir_Great '>'>
              loc: (redir_loc.Fd fd:1)
              arg: {<'assets/ssjekyll7.spk'>}
            )
          ]
          do_fork: T
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                      {
                        (DQ 
                          (braced_var_sub
                            token: <Id.VSub_Name TESTCASE>
                            suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:(word.Empty))
                          )
                        )
                      } {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<read>} {<TESTFILE>} {<TESTNAME>}]
              redirects: [
                (redir
                  op: <Id.Redir_TLess '<<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: {(DQ ($ Id.VSub_DollarName '$TESTCASE'))}
                )
              ]
              do_fork: T
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$TESTNAME'))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NIGHTWATCH_PARAMS)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [{<-t>} {($ Id.VSub_DollarName '$TESTFILE')}]
                              )
                            }
                          spids: [225]
                        )
                      ]
                    )
                  ]
                  spids: [209 222]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NIGHTWATCH_PARAMS)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (sh_array_literal
                            left: <Id.Op_LParen _>
                            words: [
                              {<-t>}
                              {($ Id.VSub_DollarName '$TESTFILE')}
                              {<--testcase>}
                              {(DQ ($ Id.VSub_DollarName '$TESTNAME'))}
                            ]
                          )
                        }
                      spids: [236]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:SKIP_UNITTESTS)
                  op: assign_op.Equal
                  rhs: {<true>}
                  spids: [253]
                )
              ]
            )
          ]
          spids: [163 181]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Unary
                          op_id: Id.BoolUnary_z
                          child: 
                            {
                              (DQ 
                                (braced_var_sub
                                  token: <Id.VSub_Name LAUNCH_URL>
                                  suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:(word.Empty))
                                )
                              )
                            }
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.Unary
                                  op_id: Id.BoolUnary_z
                                  child: 
                                    {
                                      (DQ 
                                        (braced_var_sub
                                          token: <Id.VSub_Name SKIP_UNITTESTS>
                                          suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:(word.Empty))
                                        )
                                      )
                                    }
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<nightwatch>} {<-e>} {<unittests>} 
                      {
                        (DQ 
                          (braced_var_sub
                            token: <Id.VSub_Name NIGHTWATCH_PARAMS>
                            bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                            suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:(word.Empty))
                          )
                        )
                      }
                    )
                  ]
                  spids: [278 294]
                )
              ]
            )
            (C {<nightwatch>} {<-e>} {<default>} 
              {
                (DQ 
                  (braced_var_sub
                    token: <Id.VSub_Name NIGHTWATCH_PARAMS>
                    bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                    suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:(word.Empty))
                  )
                )
              }
            )
          ]
          spids: [259 275]
        )
      ]
      else_action: [
        (command.Simple
          words: [
            {<sed>}
            {
              (DQ <'s|.*launch_url.*|'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                <launch_url> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' : '> 
                (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ($ Id.VSub_DollarName '$LAUNCH_URL') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                <',|g'>
              )
            }
            {<nightwatch.json>}
          ]
          redirects: [
            (redir
              op: <Id.Redir_Great '>'>
              loc: (redir_loc.Fd fd:1)
              arg: {<nightwatch.tmp.json>}
            )
          ]
          do_fork: T
        )
        (command.If
          arms: [
            (if_arm
              cond: 
                (condition.Shell
                  commands: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Unary
                              op_id: Id.BoolUnary_z
                              child: 
                                {
                                  (DQ 
                                    (braced_var_sub
                                      token: <Id.VSub_Name SKIP_UNITTESTS>
                                      suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:(word.Empty))
                                    )
                                  )
                                }
                            )
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
              action: [
                (C {<nightwatch>} {<-e>} {<unittests>} {<-c>} {<'./nightwatch.tmp.json'>} 
                  {
                    (DQ 
                      (braced_var_sub
                        token: <Id.VSub_Name NIGHTWATCH_PARAMS>
                        bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                        suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:(word.Empty))
                      )
                    )
                  }
                )
              ]
              spids: [357 373]
            )
          ]
        )
        (C {<nightwatch>} {<-e>} {<default>} {<-c>} {<'./nightwatch.tmp.json'>} 
          {
            (DQ 
              (braced_var_sub
                token: <Id.VSub_Name NIGHTWATCH_PARAMS>
                bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:(word.Empty))
              )
            )
          }
        )
      ]
    )
  ]
)