(CommandList children: [ (C {(set)} {(-eu)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SCRIPT_DIR) op: Equal rhs: { (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: [61 66] ) ) } ) ] ) left_token: <Left_CommandSub "$("> spids: [57 68] ) ) } ) (C {(pwd)}) ] op_id: Op_DAmp ) ] ) left_token: <Left_CommandSub "$("> spids: [53 74] ) } spids: [52] ) ] spids: [52] ) (AndOr children: [ (C {(source)} {(${ VSub_Name SCRIPT_DIR) (/testenv.sh)}) (BraceGroup children: [ (Sentence child: (SimpleCommand words: [{(echo)} {(DQ ("testenv.sh not found!"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[93])] ) terminator: <Op_Semi ";"> ) (Sentence child:(C {(exit)} {(1)}) terminator:<Op_Semi ";">) ] spids: [85] ) ] op_id: Op_DPipe ) (C {(setup_git_repository)}) (AndOr children: [ (C {(source)} {(${ VSub_Name SCRIPT_DIR) (/relnotes.sh)}) (BraceGroup children: [ (Sentence child: (SimpleCommand words: [{(echo)} {(DQ ("relnotes.sh not found!"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[131])] ) terminator: <Op_Semi ";"> ) (Sentence child:(C {(exit)} {(1)}) terminator:<Op_Semi ";">) ] spids: [123] ) ] op_id: Op_DPipe ) (FuncDef name: set_up body: (BraceGroup children:[(C {(cd)} {(${ VSub_Name MASTER_ROOT)})] spids:[153]) spids: [147 152] ) (FuncDef name: test_format_release_notes body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:expected) op: Equal rhs: { (SQ <" - Lorem ipsus I do not know more of latin than that but I need to\n"> <" type random text that spans multiple line so we can test that the\n"> <" wrapping of lines works as intended.\n"> <" - Another thing I must type.\n"> <" - Yet another test that spans across multiple lines so I must type\n"> <" some random stuff to test wrapping."> ) } spids: [176] ) ] spids: [174] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:input) op: Equal rhs: { (ArrayLiteralPart words: [ { (DQ ("Lorem ipsus I do not know more of latin ") ( "than that but I need to type random text that spans multiple line so we " ) ("can test that the wrapping of lines works as intended.") ) } {(DQ ("Another thing I must type."))} { (DQ ("Yet another test that spans across multiple lines so I must type ") ("some random stuff to test wrapping.") ) } ] ) } spids: [189] ) ] spids: [187] ) (C {(assert_equals)} {(DQ (${ VSub_Name expected))} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(format_release_notes)} { (DQ (BracedVarSub token: <VSub_Name input> bracket_op: (WholeArray op_id:Lit_At) spids: [224 229] ) ) } ) ] ) left_token: <Left_CommandSub "$("> spids: [220 231] ) ) } ) ] spids: [171] ) spids: [165 170] ) (FuncDef name: test_get_release_notes_commits body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:commits) op: Equal rhs: { (DQ ("0188971 957934c 7a99c7f b5ba24a c9041bf 8232d9b 422c731 e9029d4 ") ( "cc44636 06b09ce 29b05c8 67944d8 e8f6647 6d9fb36 f7c9922 5c0e4b2 9e387dd " ) ("98c9274 db4d861 a689f29 db487ce 965c392 bb59d88 d3461db cef25c4 14d905b") ) } spids: [254] ) ] spids: [254] ) (C {(assert_equals)} {(DQ ($ VSub_Name "$commits"))} { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(get_release_notes_commits)} {(00d7223)}) (C {(xargs)})] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [271 279] ) ) } ) (C {(assert_equals)} { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name "$commits"))}) (C {(sed)} {(SQ <"s/957934c //">)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [286 300] ) ) } { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(get_release_notes_commits)} {(00d7223)} {(957934c)}) (C {(xargs)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [306 316] ) ) } ) ] spids: [243] ) spids: [237 242] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TEST_INC_CHANGE) op: Equal rhs: { (SQ <"Incompatible changes:\n"> <"\n"> <" - Remove deprecated \"make var\" INCDIR\n"> <"\n"> ) } spids: [322] ) ] spids: [322] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TEST_NEW_CHANGE) op: Equal rhs: { (SQ <"New features:\n"> <"\n"> <" - added --with_aspect_deps to blaze query, that prints additional\n"> <" information about aspects of target when --output is set to {xml,\n"> <" proto, record}.\n"> <"\n"> ) } spids: [330] ) ] spids: [330] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TEST_CHANGE) op: Equal rhs: { (SQ <"Important changes:\n"> <"\n"> <" - Use a default implementation of a progress message, rather than\n"> <" defaulting to null for all SpawnActions.\n"> <" - Attribute error messages related to Android resources are easier\n"> <" to understand now."> ) } spids: [340] ) ] spids: [340] ) (FuncDef name: test_release_notes body: (BraceGroup children: [ (C {(assert_equals)} { (DQ ($ VSub_Name "$TEST_INC_CHANGE") (CommandSubPart command_list: (CommandList children:[(C {(echo)})]) left_token: <Left_CommandSub "$("> spids: [364 366] ) ($ VSub_Name "$TEST_NEW_CHANGE") (CommandSubPart command_list: (CommandList children:[(C {(echo)})]) left_token: <Left_CommandSub "$("> spids: [368 370] ) ($ VSub_Name "$TEST_CHANGE") ) } { (DQ (CommandSubPart command_list: (CommandList children: [(C {(release_notes)} {(965c392ab1d68d5bc23fdef3d86d635ec9d2da8e)})] ) left_token: <Left_CommandSub "$("> spids: [377 381] ) ) } ) (C {(assert_equals)} { (DQ ($ VSub_Name "$TEST_NEW_CHANGE") (CommandSubPart command_list: (CommandList children:[(C {(echo)})]) left_token: <Left_CommandSub "$("> spids: [389 391] ) ($ VSub_Name "$TEST_CHANGE") ) } { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(release_notes)} {(965c392ab1d68d5bc23fdef3d86d635ec9d2da8e)} {(bb59d88)}) ] ) left_token: <Left_CommandSub "$("> spids: [398 404] ) ) } ) ] spids: [357] ) spids: [351 356] ) (FuncDef name: test_get_last_release body: (BraceGroup children: [ (C {(rm)} {(-f)} {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)}) (If arms: [ (if_arm cond: [ (Sentence child: (Subshell child: (C {(get_last_release)} {(DQ (${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md))}) spids: [431 440] ) terminator: <Op_Semi ";"> ) ] action: [(C {(fail)} {(DQ ("Should have returned false for initial release"))})] spids: [-1 443] ) ] spids: [-1 453] ) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("## No release\n"))} do_expansion: True here_end: EOF was_filled: True spids: [458] ) (Redir op_id: Redir_Great fd: -1 arg_word: {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)} spids: [461] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (Subshell child: (C {(get_last_release)} {(DQ (${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md))}) spids: [471 480] ) terminator: <Op_Semi ";"> ) ] action: [(C {(fail)} {(DQ ("Should have returned false when no release exists"))})] spids: [-1 483] ) ] spids: [-1 493] ) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("## New release\n") ("\n") ("Baseline: 965c392\n") ("\n") ("Initial release without cherry-picks\n") ("\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [498] ) (Redir op_id: Redir_Great fd: -1 arg_word: {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)} spids: [501] ) ] ) (C {(assert_equals)} {(DQ (965c392))} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(get_last_release)} {(DQ (${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md))}) ] ) left_token: <Left_CommandSub "$("> spids: [523 532] ) ) } ) (C {(mv)} {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)} {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md.bak)} ) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("## Cherry-picking bb59d88\n") ("\n") ("Baseline: 965c392\n") ("\n") ("Cherry picks:\n") (" + bb59d88: RELNOTES[INC]: Remove deprecated ") (Right_DoubleQuote "\"") ("make var") (Right_DoubleQuote "\"") (" INCDIR\n") ("\n") ($ VSub_Name "$TEST_INC_CHANGE") ("\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [553] ) (Redir op_id: Redir_Great fd: -1 arg_word: {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)} spids: [556] ) ] ) (SimpleCommand words: [{(cat)} {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md.bak)}] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)} spids: [583] ) ] ) (C {(rm)} {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md.bak)}) (C {(assert_equals)} {(DQ ("965c392 bb59d88"))} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(get_last_release)} {(DQ (${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md))}) ] ) left_token: <Left_CommandSub "$("> spids: [607 616] ) ) } ) (C {(mv)} {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)} {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md.bak)} ) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("## Cherry-picking bb59d88 and 14d905b\n") ("\n") ("Baseline: 965c392\n") ("\n") ("Cherry picks:\n") (" + bb59d88: RELNOTES[INC]: Remove deprecated ") (Right_DoubleQuote "\"") ("make var") (Right_DoubleQuote "\"") (" INCDIR\n") (" + 14d905b: Add --with_aspect_deps flag to blaze query. This flag\n") (" should produce additional information about aspect\n") (" dependencies when --output is set to {xml, proto}.\n") ("\n") ($ VSub_Name "$TEST_INC_CHANGE") ("\n") ($ VSub_Name "$TEST_NEW_CHANGE") ("\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [636] ) (Redir op_id: Redir_Great fd: -1 arg_word: {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)} spids: [639] ) ] ) (SimpleCommand words: [{(cat)} {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md.bak)}] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)} spids: [671] ) ] ) (C {(rm)} {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md.bak)}) (C {(assert_equals)} {(DQ ("965c392 bb59d88 14d905b"))} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(get_last_release)} {(DQ (${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md))}) ] ) left_token: <Left_CommandSub "$("> spids: [695 704] ) ) } ) ] spids: [416] ) spids: [410 415] ) (FuncDef name: test_create_release_notes body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("## New release\n") ("\n") ("Baseline: 965c392\n") ("\n") ("Initial release without cherry-picks\n") ("\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [722] ) (Redir op_id: Redir_Great fd: -1 arg_word: {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)} spids: [725] ) ] ) (C {(assert_equals)} { (DQ ($ VSub_Name "$TEST_INC_CHANGE") (CommandSubPart command_list: (CommandList children:[(C {(echo)})]) left_token: <Left_CommandSub "$("> spids: [742 744] ) ($ VSub_Name "$TEST_NEW_CHANGE") (CommandSubPart command_list: (CommandList children:[(C {(echo)})]) left_token: <Left_CommandSub "$("> spids: [746 748] ) ($ VSub_Name "$TEST_CHANGE") ) } { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(create_release_notes)} {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)}) ] ) left_token: <Left_CommandSub "$("> spids: [755 762] ) ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {("## Cherry-picking bb59d88\n") ("\n") ("```\n") ("Baseline: 965c392\n") ("\n") ("Cherry picks:\n") (" + bb59d88: RELNOTES[INC]: Remove deprecated \"make var\" INCDIR\n") ("```\n") ("\n") } do_expansion: False here_end: EOF was_filled: True spids: [769] ) (Redir op_id: Redir_Great fd: -1 arg_word: {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)} spids: [774] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ($ VSub_Name "$TEST_INC_CHANGE") ("\n"))} do_expansion: True here_end: EOF was_filled: True spids: [783] ) (Redir op_id: Redir_DGreat fd: -1 arg_word: {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)} spids: [786] ) ] ) (C {(assert_equals)} { (DQ ($ VSub_Name "$TEST_NEW_CHANGE") (CommandSubPart command_list: (CommandList children:[(C {(echo)})]) left_token: <Left_CommandSub "$("> spids: [799 801] ) ($ VSub_Name "$TEST_CHANGE") ) } { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(create_release_notes)} {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)}) ] ) left_token: <Left_CommandSub "$("> spids: [808 815] ) ) } ) (C {(assert_equals)} {(DQ ("965c392 bb59d88"))} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(get_last_release)} {(DQ (${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md))}) ] ) left_token: <Left_CommandSub "$("> spids: [828 837] ) ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: {("## Cherry-picking bb59d88 and 14d905b\n") ("\n") ("```\n") ("Baseline: 965c392\n") ("\n") ("Cherry picks:\n") (" + bb59d88: RELNOTES[INC]: Remove deprecated \"make var\" INCDIR\n") (" + 14d905b: Add --with_aspect_deps flag to blaze query. This flag\n") (" should produce additional information about aspect\n") (" dependencies when --output is set to {xml, proto}.\n") ("```\n") ("\n") } do_expansion: False here_end: EOF was_filled: True spids: [844] ) (Redir op_id: Redir_Great fd: -1 arg_word: {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)} spids: [849] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ($ VSub_Name "$TEST_INC_CHANGE") ("\n") ($ VSub_Name "$TEST_NEW_CHANGE") ("\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [858] ) (Redir op_id: Redir_DGreat fd: -1 arg_word: {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)} spids: [861] ) ] ) (C {(assert_equals)} {(DQ ($ VSub_Name "$TEST_CHANGE"))} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(create_release_notes)} {(${ VSub_Name TEST_TMPDIR) (/CHANGELOG.md)}) ] ) left_token: <Left_CommandSub "$("> spids: [881 888] ) ) } ) ] spids: [717] ) spids: [711 716] ) (FuncDef name: test_create_revision_information body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:expected) op: Equal rhs: { (SQ <"Baseline: 965c392\n"> <"\n"> <"Cherry picks:\n"> <" + bb59d88: RELNOTES[INC]: Remove deprecated \"make var\" INCDIR\n"> <" + 14d905b: Add --with_aspect_deps flag to blaze query. This flag\n"> <" should produce additional information about aspect\n"> <" dependencies when --output is set to {xml, proto}."> ) } spids: [903] ) ] spids: [903] ) (C {(assert_equals)} {(DQ ($ VSub_Name "$expected"))} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(create_revision_information)} {(965c392ab1d68d5bc23fdef3d86d635ec9d2da8e)} {(bb59d88)} {(14d905b5cce9a1bbc2911331809b03679b23dad1)} ) ] ) left_token: <Left_CommandSub "$("> spids: [924 932] ) ) } ) ] spids: [900] ) spids: [894 899] ) (C {(run_suite)} {(DQ ("Release notes generation tests"))}) ] )