(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: 
                                (DBracket
                                  expr: 
                                    (BoolBinary
                                      op_id: BoolBinary_GlobDEqual
                                      left: {($ VSub_Name '$t')}
                                      right: {(asdl/arith_parse_test.py)}
                                    )
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [(ControlFlow token:<ControlFlow_Continue continue>)]
                          spids: [16777215 234]
                        )
                      ]
                      spids: [16777215 240]
                    )
                    (C {(echo)} {($ VSub_Name '$t')})
                  ]
                  spids: [214 248]
                )
              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: [265]
                )
              ]
              spids: [263]
            )
            (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: [287]
                                )
                              ]
                            )
                          ]
                          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 291]
                )
              ]
              spids: [16777215 317]
            )
          ]
          spids: [260]
        )
      spids: [256 259]
    )
    (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: [330]
        )
      spids: [326 329]
    )
    (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: [383]
                )
              ]
              spids: [381]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:t)
                  op: Equal
                  rhs: {($ VSub_Number '$2')}
                  spids: [389]
                )
              ]
              spids: [387]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:log)
                  op: Equal
                  rhs: {(_tmp/unit/) ($ VSub_Name '$t') (.txt)}
                  spids: [400]
                )
              ]
              spids: [398]
            )
            (C {(mkdir)} {(-p)} 
              {
                (CommandSubPart
                  command_list: (CommandList children:[(C {(dirname)} {($ VSub_Name '$log')})])
                  left_token: <Left_CommandSub '$('>
                  spids: [410 414]
                )
              }
            )
            (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: [443]
                )
                (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[446])
              ]
            )
          ]
          spids: [378]
        )
      spids: [374 377]
    )
    (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:[461])]
              spids: [459]
            )
            (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: [486]
                )
              ]
              spids: [484]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:status) op:Equal rhs:{(0)} spids:[494])]
              spids: [492]
            )
            (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: [514]
                )
              ]
            )
            (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:[541])]
                  spids: [541]
                )
              ]
            )
            (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 557]
                )
              ]
              spids: [16777215 586]
            )
            (C {(echo)})
            (C {(echo)} {(DQ ('All unit tests passed.'))})
          ]
          spids: [456]
        )
      spids: [452 455]
    )
    (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: [629 635]
                      )
                    }
                  spids: [628]
                )
              ]
              spids: [626]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:base_url)
                  op: Equal
                  rhs: {(SQ <../../web>)}
                  spids: [640]
                )
              ]
              spids: [638]
            )
            (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: [653]
                )
              ]
            )
            (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: [725]
                )
              ]
            )
          ]
          spids: [623]
        )
      spids: [619 622]
    )
    (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: [763]
                )
              ]
              spids: [761]
            )
            (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: [778]
                )
              ]
            )
            (C {(echo)} {(DQ ('Wrote ') ($ VSub_Name '$out'))})
          ]
          spids: [758]
        )
      spids: [754 757]
    )
    (FuncDef
      name: run-for-release
      body: (BraceGroup children:[(C {(run-all-and-log)}) (C {(write-report)})] spids:[800])
      spids: [796 799]
    )
    (C {(DQ ($ VSub_At '$@'))})
  ]
)