(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: all-in-one body: (BraceGroup children: [ (SimpleCommand words: [ {(python)} {(-m)} {(unittest)} {(discover)} {(--failfast)} {(--verbose)} {(--pattern)} {(SQ <'*_test.py'>)} ] more_env: [(env_pair name:_OVM_RESOURCE_ROOT val:{($ VSub_Name '$PWD')} spids:[398])] ) ] spids: [387] ) spids: [383 386] ) (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: [466] ) ] spids: [464] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:t) op: Equal rhs: {($ VSub_Number '$2')} spids: [472] ) ] spids: [470] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:log) op: Equal rhs: {(_tmp/unit/) ($ VSub_Name '$t') (.txt)} spids: [483] ) ] spids: [481] ) (C {(mkdir)} {(-p)} { (CommandSubPart command_list: (CommandList children:[(C {(dirname)} {($ VSub_Name '$log')})]) left_token: <Left_CommandSub '$('> spids: [493 497] ) } ) (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: [526] ) (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[529]) ] ) ] spids: [461] ) spids: [457 460] ) (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:[544])] spids: [542] ) (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: [569] ) ] spids: [567] ) (Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(LhsName name:status) op:Equal rhs:{(0)} spids:[577])] spids: [575] ) (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: [597] ) ] ) (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:[624])] spids: [624] ) ] ) (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 640] ) ] spids: [16777215 669] ) (C {(echo)}) (C {(echo)} {(DQ ('All unit tests passed.'))}) ] spids: [539] ) spids: [535 538] ) (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: [712 718] ) } spids: [711] ) ] spids: [709] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:base_url) op: Equal rhs: {(SQ <../../web>)} spids: [723] ) ] spids: [721] ) (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: [736] ) ] ) (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: [808] ) ] ) ] spids: [706] ) spids: [702 705] ) (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: [846] ) ] spids: [844] ) (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: [861] ) ] ) (C {(echo)} {(DQ ('Wrote ') ($ VSub_Name '$out'))}) ] spids: [841] ) spids: [837 840] ) (FuncDef name: run-for-release body: (BraceGroup children:[(C {(run-all-and-log)}) (C {(write-report)})] spids:[883]) spids: [879 882] ) (C {(DQ ($ VSub_At '$@'))}) ] )