(CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:NO_SIGNAL_OVERRIDE) op:Equal rhs:{(1)} spids:[55])] spids: [55] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:CURRENT_DIR) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(dirname)} { (DQ (BracedVarSub token: <VSub_Name BASH_SOURCE> bracket_op: (ArrayIndex expr: (ArithWord w:{(Lit_Digits 0)}) ) spids: [71 76] ) ) } ) ] ) left_token: <Left_CommandSub "$("> spids: [67 78] ) ) } ) (C {(pwd)}) ] op_id: Op_DAmp ) ] ) left_token: <Left_CommandSub "$("> spids: [63 84] ) ) } spids: [61] ) ] spids: [61] ) (AndOr children: [ (C {(source)} {(DQ (${ VSub_Name CURRENT_DIR) (/../integration_test_setup.sh))}) (BraceGroup children: [ (Sentence child: (SimpleCommand words: [{(echo)} {(DQ ("integration_test_setup.sh not found!"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[108])] ) terminator: <Op_Semi ";"> ) (Sentence child:(C {(exit)} {(1)}) terminator:<Op_Semi ";">) ] spids: [100] ) ] op_id: Op_DPipe ) (FuncDef name: runbazel body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:startup_opt) op: Equal rhs: {($ VSub_Number "$1")} spids: [138] ) ] spids: [138] ) terminator: <Op_Semi ";"> ) (C {(shift)}) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:sleepyfifo) op: Equal rhs: {(x/sleepyfifo)} spids: [148] ) ] spids: [146] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:testfifo) op: Equal rhs: {(x/testfifo)} spids: [154] ) ] spids: [152] ) (AndOr children: [(C {(mkdir)} {(-p)} {(x)}) (C {(fail)} {(DQ ("Can't create x"))})] op_id: Op_DPipe ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(x/BUILD)} spids:[175]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("genrule(\n") (" name = ") (Right_DoubleQuote "\"") (sleepy) (Right_DoubleQuote "\"") (",\n") (" srcs = [],\n") (" outs = [") (Right_DoubleQuote "\"") (sleepy.out) (Right_DoubleQuote "\"") ("],\n") (" local = 1,\n") (" cmd = ") (Right_DoubleQuote "\"") ("echo 'hi test' > ") ($ VSub_Name "$testfifo") ("; cat ") ($ VSub_Name "$sleepyfifo") ("; sleep 9999") (Right_DoubleQuote "\"") ("\n") (")\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [179] ) ] ) (AndOr children: [ (C {(mkfifo)} {($ VSub_Name "$testfifo")} {($ VSub_Name "$sleepyfifo")}) (C {(fail)} {(DQ ("Couldn't create FIFOs under x"))}) ] op_id: Op_DPipe ) (C {(set)} {(-m)}) (Sentence child: (SimpleCommand words: [ {(bazel)} {($ VSub_Name "$startup_opt")} {(build)} {(--package_path)} {(.)} {(//x) (Lit_Other ":") (sleepy)} ] redirects: [ (Redir op_id: Redir_GreatAnd fd: -1 arg_word: {($ VSub_Name "$TEST_log")} spids: [243] ) ] ) terminator: <Op_Amp "&"> ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:pid) op: Equal rhs: {($ VSub_Bang "$!")} spids: [252] ) ] spids: [250] ) (C {(echo)} { (DQ (${ VSub_Name PRODUCT_NAME) (" running in background with pid ") ($ VSub_Name "$pid") ) } ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:testfifocontents) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(cat)} {($ VSub_Name "$testfifo")})] ) left_token: <Left_CommandSub "$("> spids: [271 275] ) } spids: [270] ) ] spids: [268] ) (SimpleCommand words: [{(echo)} {(DQ ("hi sleepy"))}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$sleepyfifo")} spids: [284] ) ] ) (C {(echo)} {(DQ ("Interrupting pid ") ($ VSub_Name "$pid"))}) (Sentence child: (C {(kill)} {(-INT)} {($ VSub_Name "$pid")}) terminator: <Op_Semi ";"> ) (C {(sleep)} {(3)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:status) op:Equal rhs:{(0)} spids:[310])] spids: [310] ) (AndOr children: [ (C {(wait)} {($ VSub_Name "$pid")}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:status) op: Equal rhs: {($ VSub_QMark "$?")} spids: [324] ) ] spids: [324] ) ] op_id: Op_DPipe ) (C {(assert_equals)} {(8)} {($ VSub_Name "$status")}) (C {(assert_equals)} {(DQ ("hi test"))} {(DQ ($ VSub_Name "$testfifocontents"))}) (C {(set)} {(Lit_Other "+") (m)}) ] spids: [135] ) spids: [129 134] ) (FuncDef name: tear_down body: (BraceGroup children:[(C {(bazel)} {(shutdown)})(C {(rm)} {(-rf)} {(x)})] spids:[363]) spids: [357 362] ) (FuncDef name: assert_sigint_stops_build body: (BraceGroup children: [ (C {(runbazel)} {($ VSub_Number "$1")}) (C {(expect_log)} {(SQ <"Loading package: x">)}) (C {(expect_log)} {(SQ <"Elapsed time">)}) (C {(expect_log)} {(SQ <"build interrupted">)}) ] spids: [386] ) spids: [380 385] ) (FuncDef name: test_sigint_server_mode body: (BraceGroup children:[(C {(assert_sigint_stops_build)} {(DQ (--nobatch))})] spids:[428]) spids: [422 427] ) (FuncDef name: test_sigint_batch_mode body: (BraceGroup children:[(C {(assert_sigint_stops_build)} {(DQ (--batch))})] spids:[446]) spids: [440 445] ) (C {(run_suite)} {(DQ ("Tests of SIGINT on ") (${ VSub_Name PRODUCT_NAME))}) ] )