(command.CommandList
  children: [
    (C {<set>} {<-o>} {<nounset>})
    (C {<set>} {<-o>} {<pipefail>})
    (C {<set>} {<-o>} {<errexit>})
    (C {<source>} {<'test/common.sh'>})
    (C {<export>} {<Id.Lit_VarLike 'PYTHONPATH='> <.>})
    (command.ShFunction name:unit body:(BraceGroup children:[(C {(DQ ($ Id.VSub_At '$@'))})]))
    (command.ShFunction
      name: delete-pyc
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Pipeline
                  children: [
                    (C {<find>} {<.>} {<-name>} {(SQ <'*.pyc'>)})
                    (C {<xargs>} {<--no-run-if-empty>} {<-->} {<rm>})
                  ]
                  negated: F
                )
                (C {<true>})
              ]
            )
          ]
        )
    )
    (C {<readonly>} 
      {<Id.Lit_VarLike 'PY_273='> <Id.Lit_TildeLike '~'> <'/src/languages/Python-2.7.3/python'>}
    )
    (C {<readonly>} 
      {<Id.Lit_VarLike 'PY_272='> <Id.Lit_TildeLike '~'> <'/src/languages/Python-2.7.2/python'>}
    )
    (C {<readonly>} 
      {<Id.Lit_VarLike 'PY_27='> <Id.Lit_TildeLike '~'> <'/src/languages/Python-2.7/python'>}
    )
    (command.ShFunction
      name: banner
      body: 
        (BraceGroup
          children: [(C {<echo>} {<----->}) (C {<echo>} {(DQ ($ Id.VSub_At '$@'))}) (C {<echo>} {<---->})]
        )
    )
    (command.ShFunction
      name: tests-to-run
      body: 
        (BraceGroup
          children: [
            (command.ForEach
              iter_name: t
              iter_words: [
                (word.BracedTree
                  parts: [
                    (word_part.BracedTuple
                      words: [{<build>} {<test>} {<native>} {<asdl>} {<core>} {<osh>} {<test>} {<tools>}]
                    )
                    <'/'>
                    <Id.Lit_Star '*'>
                    <_test.py>
                  ]
                )
              ]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.AndOr
                                      ops: [Id.Op_DAmp]
                                      children: [
                                        (C {<test>} {($ Id.VSub_DollarName '$t')} {<Id.Lit_Equals '='>} 
                                          {(SQ <'native/fastlex_test.py'>)}
                                        )
                                        (command.Pipeline
                                          children: [(C {<test>} {<-e>} {(SQ <fastlex.so>)})]
                                          negated: T
                                        )
                                      ]
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [(command.ControlFlow token:<Id.ControlFlow_Continue continue>)]
                          spids: [225 250]
                        )
                      ]
                    )
                    (C {<echo>} {($ Id.VSub_DollarName '$t')})
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: run-test-and-maybe-abort
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 't='> ($ Id.VSub_Number '$1')})
            (C {<echo>})
            (C {<echo>} {(DQ <'['> ($ Id.VSub_DollarName '$t') <']'>)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (command.Simple
                                  words: [{($ Id.VSub_DollarName '$t')}]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_Great '>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<'/dev/null'>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>})
                    (C {<echo>} {(DQ <'*** '> ($ Id.VSub_DollarName '$t') <' FAILED ***'>)})
                    (C {<echo>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<255>}
                    )
                  ]
                  spids: [297 307]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: all
      body: 
        (BraceGroup
          children: [
            (command.TimeBlock
              pipeline: 
                (command.Pipeline
                  children: [
                    (C {<tests-to-run>})
                    (C {<xargs>} {<-n>} {<1>} {<-->} {($ Id.VSub_Number '$0')} {<run-test-and-maybe-abort>})
                  ]
                  negated: F
                )
            )
            (C {<echo>})
            (C {<echo>} {(DQ <'All unit tests passed.'>)})
          ]
        )
    )
    (command.ShFunction
      name: all-in-one
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [
                {<python>}
                {<-m>}
                {<unittest>}
                {<discover>}
                {<--failfast>}
                {<--verbose>}
                {<--pattern>}
                {(SQ <'*_test.py'>)}
              ]
              more_env: [
                (env_pair
                  name: _OVM_RESOURCE_ROOT
                  val: {($ Id.VSub_DollarName '$PWD')}
                  spids: [398]
                )
              ]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: run-test-and-log
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'tasks_csv='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 't='> ($ Id.VSub_Number '$2')})
            (C {<local>} {<Id.Lit_VarLike 'log='> <'_tmp/unit/'> ($ Id.VSub_DollarName '$t') <.txt>})
            (C {<mkdir>} {<-p>} 
              {
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: (C {<dirname>} {($ Id.VSub_DollarName '$log')})
                )
              }
            )
            (command.Simple
              words: [
                {<'benchmarks/time.py'>}
                {<--out>}
                {($ Id.VSub_DollarName '$tasks_csv')}
                {<--field>}
                {($ Id.VSub_DollarName '$t')}
                {<--field>}
                {(DQ ($ Id.VSub_DollarName '$t') <.txt>)}
                {<-->}
                {($ Id.VSub_DollarName '$t')}
              ]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$log')}
                )
                (redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})
              ]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: run-all-and-log
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'out_dir='> <'_tmp/unit'>})
            (C {<mkdir>} {<-p>} {($ Id.VSub_DollarName '$out_dir')})
            (C {<rm>} {<-r>} {<-f>} {($ Id.VSub_DollarName '$out_dir') <'/'> <Id.Lit_Star '*'>})
            (C {<local>} 
              {<Id.Lit_VarLike 'tasks_csv='> ($ Id.VSub_DollarName '$out_dir') <'/tasks.csv'>}
            )
            (C {<local>} {<Id.Lit_VarLike 'status='> <0>})
            (command.Simple
              words: [{<echo>} {(SQ <'status,elapsed_secs,test,test_HREF'>)}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$tasks_csv')}
                )
              ]
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.TimeBlock
                  pipeline: 
                    (command.Pipeline
                      children: [
                        (C {<tests-to-run>})
                        (C {<xargs>} {<-n>} {<1>} {<-->} {($ Id.VSub_Number '$0')} {<run-test-and-log>} 
                          {($ Id.VSub_DollarName '$tasks_csv')}
                        )
                      ]
                      negated: F
                    )
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:status)
                      op: assign_op.Equal
                      rhs: {<1>}
                      spids: [624]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<test>} {($ Id.VSub_DollarName '$status')} {<-ne>} {<0>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<cat>} {($ Id.VSub_DollarName '$tasks_csv')})
                    (C {<echo>})
                    (C {<echo>} 
                      {
                        (DQ <'*** Some tests failed.  See '> ($ Id.VSub_DollarName '$tasks_csv') 
                          <' ***'>
                        )
                      }
                    )
                    (C {<echo>})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {($ Id.VSub_DollarName '$status')}
                    )
                  ]
                  spids: [629 640]
                )
              ]
            )
            (C {<echo>})
            (C {<echo>} {(DQ <'All unit tests passed.'>)})
          ]
        )
    )
    (C {<source>} {<'benchmarks/common.sh'>})
    (command.ShFunction
      name: print-report
      body: 
        (BraceGroup
          children: [
            (C {<local>} 
              {<Id.Lit_VarLike 'in_dir='> 
                (braced_var_sub
                  token: <Id.VSub_Number 1>
                  suffix_op: 
                    (suffix_op.Unary
                      tok: <Id.VTest_ColonHyphen ':-'>
                      arg_word: {<_tmp> <Id.Lit_Slash '/'> <unit>}
                    )
                )
              }
            )
            (C {<local>} {<Id.Lit_VarLike 'base_url='> (SQ <'../../web'>)})
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      here_begin: {<EOF>}
                      here_end_span_id: 798
                      stdin_parts: [
                        <'<!DOCTYPE html>\n'>
                        <'<html>\n'>
                        <'  <head>\n'>
                        <'    <title>Unit Test Results</title>\n'>
                        <'    <script type='>
                        <Id.Right_DoubleQuote '"'>
                        <'text/javascript'>
                        <Id.Right_DoubleQuote '"'>
                        <' src='>
                        <Id.Right_DoubleQuote '"'>
                        ($ Id.VSub_DollarName '$base_url')
                        <'/table/table-sort.js'>
                        <Id.Right_DoubleQuote '"'>
                        <'></script>\n'>
                        <'    <link rel='>
                        <Id.Right_DoubleQuote '"'>
                        <stylesheet>
                        <Id.Right_DoubleQuote '"'>
                        <' type='>
                        <Id.Right_DoubleQuote '"'>
                        <'text/css'>
                        <Id.Right_DoubleQuote '"'>
                        <' href='>
                        <Id.Right_DoubleQuote '"'>
                        ($ Id.VSub_DollarName '$base_url')
                        <'/table/table-sort.css'>
                        <Id.Right_DoubleQuote '"'>
                        <' />\n'>
                        <'    <link rel='>
                        <Id.Right_DoubleQuote '"'>
                        <stylesheet>
                        <Id.Right_DoubleQuote '"'>
                        <' type='>
                        <Id.Right_DoubleQuote '"'>
                        <'text/css'>
                        <Id.Right_DoubleQuote '"'>
                        <' href='>
                        <Id.Right_DoubleQuote '"'>
                        ($ Id.VSub_DollarName '$base_url')
                        <'/benchmarks.css'>
                        <Id.Right_DoubleQuote '"'>
                        <' />\n'>
                        <'\n'>
                        <'  </head>\n'>
                        <'  <body>\n'>
                        <'    <p id='>
                        <Id.Right_DoubleQuote '"'>
                        <home-link>
                        <Id.Right_DoubleQuote '"'>
                        <'>\n'>
                        <'      <a href='>
                        <Id.Right_DoubleQuote '"'>
                        <'/'>
                        <Id.Right_DoubleQuote '"'>
                        <'>oilshell.org</a>\n'>
                        <'    </p>\n'>
                        <'    <h2>Unit Test Results</h2>\n'>
                        <'\n'>
                      ]
                    )
                )
              ]
              do_fork: T
            )
            (C {<csv2html>} {($ Id.VSub_DollarName '$in_dir') <'/report.csv'>})
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      here_begin: {<EOF>}
                      here_end_span_id: 815
                      stdin_parts: [<'  </body>\n'> <'</html>\n'>]
                    )
                )
              ]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: write-report
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'out='> <'_tmp/unit/index.html'>})
            (C {<'test/report.R'>} {<unit>} {<'_tmp/unit'>} {<'_tmp/unit'>})
            (command.Simple
              words: [{<print-report>}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$out')}
                )
              ]
              do_fork: T
            )
            (C {<echo>} {(DQ <'Wrote '> ($ Id.VSub_DollarName '$out'))})
          ]
        )
    )
    (command.ShFunction
      name: run-for-release
      body: (BraceGroup children:[(C {<run-all-and-log>}) (C {<write-report>})])
    )
    (C {(DQ ($ Id.VSub_At '$@'))})
  ]
)