(CommandList
  children: [
    (C {(set)} {(-o)} {(nounset)})
    (C {(set)} {(-o)} {(pipefail)})
    (C {(set)} {(-o)} {(errexit)})
    (C {(source)} {(test/common.sh)})
    (C {(export)} {(Lit_VarLike 'PYTHONPATH=') (.)})
    (FuncDef
      name: unit
      body: (BraceGroup children:[(C {(DQ ($ VSub_At '$@'))})] spids:[74])
      spids: [70 73]
    )
    (FuncDef
      name: delete-pyc
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DPipe]
              children: [
                (Pipeline
                  children: [
                    (C {(find)} {(.)} {(-name)} {(SQ <'*.pyc'>)})
                    (C {(xargs)} {(--no-run-if-empty)} {(--)} {(rm)})
                  ]
                  negated: F
                )
                (C {(true)})
              ]
            )
          ]
          spids: [93]
        )
      spids: [89 92]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:PY_273)
          op: Equal
          rhs: {(TildeSubPart prefix:'') (/src/languages/Python-2.7.3/python)}
          spids: [125]
        )
      ]
      spids: [123]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:PY_272)
          op: Equal
          rhs: {(TildeSubPart prefix:'') (/src/languages/Python-2.7.2/python)}
          spids: [131]
        )
      ]
      spids: [129]
    )
    (Assignment
      keyword: Assign_Readonly
      pairs: [
        (assign_pair
          lhs: (LhsName name:PY_27)
          op: Equal
          rhs: {(TildeSubPart prefix:'') (/src/languages/Python-2.7/python)}
          spids: [137]
        )
      ]
      spids: [135]
    )
    (FuncDef
      name: banner
      body: 
        (BraceGroup
          children: [(C {(echo)} {(-----)}) (C {(echo)} {(DQ ($ VSub_At '$@'))}) (C {(echo)} {(----)})]
          spids: [153]
        )
      spids: [149 152]
    )
    (FuncDef
      name: tests-to-run
      body: 
        (BraceGroup
          children: [
            (ForEach
              iter_name: t
              iter_words: [
                (BracedWordTree
                  parts: [
                    (BracedAltPart
                      words: [{(build)} {(test)} {(native)} {(asdl)} {(core)} {(osh)} {(test)} {(tools)}]
                    )
                    (/)
                    (Lit_Other '*')
                    (_test.py)
                  ]
                )
              ]
              do_arg_iter: F
              body: 
                (DoGroup
                  children: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (AndOr
                                  ops: [Op_DAmp]
                                  children: [
                                    (C {(test)} {($ VSub_Name '$t')} {(Lit_Other '=')} 
                                      {(SQ <native/fastlex_test.py>)}
                                    )
                                    (Pipeline
                                      children: [(C {(test)} {(-e)} {(SQ <fastlex.so>)})]
                                      negated: T
                                    )
                                  ]
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [(ControlFlow token:<ControlFlow_Continue continue>)]
                          spids: [16777215 250]
                        )
                      ]
                      spids: [16777215 256]
                    )
                    (C {(echo)} {($ VSub_Name '$t')})
                  ]
                  spids: [214 264]
                )
              spids: [191 212]
            )
          ]
          spids: [179]
        )
      spids: [175 178]
    )
    (FuncDef
      name: run-test-and-maybe-abort
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:t)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [281]
                )
              ]
              spids: [279]
            )
            (C {(echo)})
            (C {(echo)} {(DQ ('[') ($ VSub_Name '$t') (']'))})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (Pipeline
                          children: [
                            (SimpleCommand
                              words: [{($ VSub_Name '$t')}]
                              redirects: [
                                (Redir
                                  op_id: Redir_Great
                                  fd: 16777215
                                  arg_word: {(/dev/null)}
                                  spids: [303]
                                )
                              ]
                            )
                          ]
                          negated: T
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)})
                    (C {(echo)} {(DQ ('*** ') ($ VSub_Name '$t') (' FAILED ***'))})
                    (C {(echo)})
                    (ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(255)}
                    )
                  ]
                  spids: [16777215 307]
                )
              ]
              spids: [16777215 333]
            )
          ]
          spids: [276]
        )
      spids: [272 275]
    )
    (FuncDef
      name: all
      body: 
        (BraceGroup
          children: [
            (TimeBlock
              pipeline: 
                (Pipeline
                  children: [
                    (C {(tests-to-run)})
                    (C {(xargs)} {(-n)} {(1)} {(--)} {($ VSub_Number '$0')} {(run-test-and-maybe-abort)})
                  ]
                  negated: F
                )
            )
            (C {(echo)})
            (C {(echo)} {(DQ ('All unit tests passed.'))})
          ]
          spids: [346]
        )
      spids: [342 345]
    )
    (FuncDef
      name: run-test-and-log
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:tasks_csv)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [399]
                )
              ]
              spids: [397]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:t)
                  op: Equal
                  rhs: {($ VSub_Number '$2')}
                  spids: [405]
                )
              ]
              spids: [403]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:log)
                  op: Equal
                  rhs: {(_tmp/unit/) ($ VSub_Name '$t') (.txt)}
                  spids: [416]
                )
              ]
              spids: [414]
            )
            (C {(mkdir)} {(-p)} 
              {
                (CommandSubPart
                  command_list: (CommandList children:[(C {(dirname)} {($ VSub_Name '$log')})])
                  left_token: <Left_CommandSub '$('>
                  spids: [426 430]
                )
              }
            )
            (SimpleCommand
              words: [
                {(benchmarks/time.py)}
                {(--out)}
                {($ VSub_Name '$tasks_csv')}
                {(--field)}
                {($ VSub_Name '$t')}
                {(--field)}
                {(DQ ($ VSub_Name '$t') (.txt))}
                {(--)}
                {($ VSub_Name '$t')}
              ]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$log')}
                  spids: [459]
                )
                (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[462])
              ]
            )
          ]
          spids: [394]
        )
      spids: [390 393]
    )
    (FuncDef
      name: run-all-and-log
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:out_dir) op:Equal rhs:{(_tmp/unit)} spids:[477])]
              spids: [475]
            )
            (C {(mkdir)} {(-p)} {($ VSub_Name '$out_dir')})
            (C {(rm)} {(-r)} {(-f)} {($ VSub_Name '$out_dir') (/) (Lit_Other '*')})
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:tasks_csv)
                  op: Equal
                  rhs: {($ VSub_Name '$out_dir') (/tasks.csv)}
                  spids: [502]
                )
              ]
              spids: [500]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:status) op:Equal rhs:{(0)} spids:[510])]
              spids: [508]
            )
            (SimpleCommand
              words: [{(echo)} {(SQ <'status,elapsed_secs,test,test_HREF'>)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$tasks_csv')}
                  spids: [530]
                )
              ]
            )
            (AndOr
              ops: [Op_DPipe]
              children: [
                (TimeBlock
                  pipeline: 
                    (Pipeline
                      children: [
                        (C {(tests-to-run)})
                        (C {(xargs)} {(-n)} {(1)} {(--)} {($ VSub_Number '$0')} {(run-test-and-log)} 
                          {($ VSub_Name '$tasks_csv')}
                        )
                      ]
                      negated: F
                    )
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LhsName name:status) op:Equal rhs:{(1)} spids:[557])]
                  spids: [557]
                )
              ]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: (C {(test)} {($ VSub_Name '$status')} {(-ne)} {(0)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(cat)} {($ VSub_Name '$tasks_csv')})
                    (C {(echo)})
                    (C {(echo)} 
                      {(DQ ('*** Some tests failed.  See ') ($ VSub_Name '$tasks_csv') (' ***'))}
                    )
                    (C {(echo)})
                    (ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {($ VSub_Name '$status')}
                    )
                  ]
                  spids: [16777215 573]
                )
              ]
              spids: [16777215 602]
            )
            (C {(echo)})
            (C {(echo)} {(DQ ('All unit tests passed.'))})
          ]
          spids: [472]
        )
      spids: [468 471]
    )
    (C {(source)} {(benchmarks/common.sh)})
    (FuncDef
      name: print-report
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:in_dir)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 1>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: {(_tmp) (Lit_Slash /) (unit)}
                          )
                        spids: [645 651]
                      )
                    }
                  spids: [644]
                )
              ]
              spids: [642]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:base_url)
                  op: Equal
                  rhs: {(SQ <../../web>)}
                  spids: [656]
                )
              ]
              spids: [654]
            )
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {
                      (DQ ('<!DOCTYPE html>\n') ('<html>\n') ('  <head>\n') 
                        ('    <title>Unit Test Results</title>\n') ('    <script type=') (Right_DoubleQuote '"') (text/javascript) (Right_DoubleQuote '"') (' src=') 
                        (Right_DoubleQuote '"') ($ VSub_Name '$base_url') (/table/table-sort.js) (Right_DoubleQuote '"') ('></script>\n') 
                        ('    <link rel=') (Right_DoubleQuote '"') (stylesheet) (Right_DoubleQuote '"') (' type=') (Right_DoubleQuote '"') (text/css) 
                        (Right_DoubleQuote '"') (' href=') (Right_DoubleQuote '"') ($ VSub_Name '$base_url') (/table/table-sort.css) 
                        (Right_DoubleQuote '"') (' />\n') ('    <link rel=') (Right_DoubleQuote '"') (stylesheet) (Right_DoubleQuote '"') (' type=') 
                        (Right_DoubleQuote '"') (text/css) (Right_DoubleQuote '"') (' href=') (Right_DoubleQuote '"') ($ VSub_Name '$base_url') 
                        (/benchmarks.css) (Right_DoubleQuote '"') (' />\n') ('\n') ('  </head>\n') ('  <body>\n') ('    <p id=') 
                        (Right_DoubleQuote '"') (home-link) (Right_DoubleQuote '"') ('>\n') ('      <a href=') (Right_DoubleQuote '"') (/) 
                        (Right_DoubleQuote '"') ('>oilshell.org</a>\n') ('    </p>\n') ('    <h2>Unit Test Results</h2>\n') ('\n')
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: T
                  spids: [669]
                )
              ]
            )
            (C {(csv2html)} {($ VSub_Name '$in_dir') (/report.csv)})
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ('  </body>\n') ('</html>\n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: T
                  spids: [741]
                )
              ]
            )
          ]
          spids: [639]
        )
      spids: [635 638]
    )
    (FuncDef
      name: write-report
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:out)
                  op: Equal
                  rhs: {(_tmp/unit/index.html)}
                  spids: [779]
                )
              ]
              spids: [777]
            )
            (C {(test/report.R)} {(unit)} {(_tmp/unit)} {(_tmp/unit)})
            (SimpleCommand
              words: [{(print-report)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {($ VSub_Name '$out')}
                  spids: [794]
                )
              ]
            )
            (C {(echo)} {(DQ ('Wrote ') ($ VSub_Name '$out'))})
          ]
          spids: [774]
        )
      spids: [770 773]
    )
    (FuncDef
      name: run-for-release
      body: (BraceGroup children:[(C {(run-all-and-log)}) (C {(write-report)})] spids:[816])
      spids: [812 815]
    )
    (C {(DQ ($ VSub_At '$@'))})
  ]
)