(CommandList children: [ (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: [65 70] ) ) } ) ] ) left_token: <Left_CommandSub "$("> spids: [61 72] ) ) } ) (C {(pwd)}) ] op_id: Op_DAmp ) ] ) left_token: <Left_CommandSub "$("> spids: [57 78] ) ) } spids: [55] ) ] spids: [55] ) (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:[102])] ) terminator: <Op_Semi ";"> ) (Sentence child:(C {(exit)} {(1)}) terminator:<Op_Semi ";">) ] spids: [94] ) ] op_id: Op_DPipe ) (C {(add_to_bazelrc)} {(DQ ("build --noshow_progress"))}) (FuncDef name: test_ide_build_file_generation body: (BraceGroup children: [ (C {(mkdir)} {(-p)} {(com/google/example/simple)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/simple/Simple.java)} spids: [139] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("package com.google.example.simple;\n") ("\n") ("public class Simple {\n") (" public static void main(String[] args) {\n") (" System.out.println(") (Right_DoubleQuote "\"") ("Hello world!") (Right_DoubleQuote "\"") (");\n") (" }\n") ("}\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [143] ) ] ) (C {(mkdir)} {(-p)} {(com/google/example/complex)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/complex/Complex.java)} spids: [167] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("package com.google.example.complex;\n") ("\n") ("import com.google.example.simple.Simple;\n") ("\n") ("public class Complex {\n") (" public static void main(String[] args) {\n") (" Simple.main(args);\n") (" }\n") ("}\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [171] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/BUILD)} spids: [187] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("java_library(\n") (" name = ") (Right_DoubleQuote "\"") (simple) (Right_DoubleQuote "\"") (",\n") (" srcs = [") (Right_DoubleQuote "\"") (simple/Simple.java) (Right_DoubleQuote "\"") ("]\n") (")\n") ("\n") ("java_library(\n") (" name = ") (Right_DoubleQuote "\"") (complex) (Right_DoubleQuote "\"") (",\n") (" srcs = [") (Right_DoubleQuote "\"") (complex/Complex.java) (Right_DoubleQuote "\"") ("],\n") (" deps = [") (Right_DoubleQuote "\"") (":simple") (Right_DoubleQuote "\"") ("]\n") (")\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [191] ) ] ) (AndOr children: [ (C {(bazel)} {(build)} {(//com/google/example) (Lit_Other ":") (complex)} {(--aspects)} {(AndroidStudioInfoAspect)} {(--output_groups)} {(DQ (ide-info))} ) (C {(fail)} {(DQ ("Expected success"))}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SIMPLE_ASWB_BUILD) op: Equal rhs: {(DQ (${ VSub_Name PRODUCT_NAME) (-bin/com/google/example/simple.aswb-build))} spids: [257] ) ] spids: [257] ) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {($ VSub_Name "$SIMPLE_ASWB_BUILD")} {(Lit_Other "]")}) (C {(fail)} {(DQ ($ VSub_Name "$SIMPLE_ASWB_BUILD") (" not found"))}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPLEX_ASWB_BUILD) op: Equal rhs: {(DQ (${ VSub_Name PRODUCT_NAME) (-bin/com/google/example/complex.aswb-build))} spids: [284] ) ] spids: [284] ) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {($ VSub_Name "$COMPLEX_ASWB_BUILD")} {(Lit_Other "]")}) (C {(fail)} {(DQ ($ VSub_Name "$COMPLEX_ASWB_BUILD") (" not found"))}) ] op_id: Op_DPipe ) ] spids: [127] ) spids: [121 126] ) (FuncDef name: test_detailed_result body: (BraceGroup children: [ (AndOr children: [(C {(bazel)} {(clean)}) (C {(bazel)} {(shutdown)})] op_id: Op_DAmp ) (C {(mkdir)} {(-p)} {(com/google/example/simple)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/simple/Simple.java)} spids: [351] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("package com.google.example.simple;\n") ("\n") ("public class Simple {\n") (" public static void main(String[] args) {\n") (" System.out.println(") (Right_DoubleQuote "\"") ("Hello world!") (Right_DoubleQuote "\"") (");\n") (" }\n") ("}\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [355] ) ] ) (C {(mkdir)} {(-p)} {(com/google/example/complex)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/complex/Complex.java)} spids: [379] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("package com.google.example.complex;\n") ("\n") ("import com.google.example.simple.Simple;\n") ("\n") ("public class Complex {\n") (" public static void main(String[] args) {\n") (" Simple.main(args);\n") (" }\n") ("}\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [383] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/BUILD)} spids: [399] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("java_library(\n") (" name = ") (Right_DoubleQuote "\"") (simple) (Right_DoubleQuote "\"") (",\n") (" srcs = [") (Right_DoubleQuote "\"") (simple/Simple.java) (Right_DoubleQuote "\"") ("]\n") (")\n") ("\n") ("java_library(\n") (" name = ") (Right_DoubleQuote "\"") (complex) (Right_DoubleQuote "\"") (",\n") (" srcs = [") (Right_DoubleQuote "\"") (complex/Complex.java) (Right_DoubleQuote "\"") ("],\n") (" deps = [") (Right_DoubleQuote "\"") (":simple") (Right_DoubleQuote "\"") ("]\n") (")\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [403] ) ] ) (AndOr children: [ (SimpleCommand words: [ {(bazel)} {(build)} {(//com/google/example) (Lit_Other ":") (complex)} {(--aspects)} {(AndroidStudioInfoAspect)} {(--output_groups)} {(DQ (ide-info))} {(--experimental_show_artifacts)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {($ VSub_Name "$TEST_log")} spids: [462] ) ] ) (C {(fail)} {(DQ ("Expected success"))}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SIMPLE_ASWB_BUILD) op: Equal rhs: {(DQ (${ VSub_Name PRODUCT_NAME) (-bin/com/google/example/simple.aswb-build))} spids: [477] ) ] spids: [477] ) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {($ VSub_Name "$SIMPLE_ASWB_BUILD")} {(Lit_Other "]")}) (C {(fail)} {(DQ ($ VSub_Name "$SIMPLE_ASWB_BUILD") (" not found"))}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPLEX_ASWB_BUILD) op: Equal rhs: {(DQ (${ VSub_Name PRODUCT_NAME) (-bin/com/google/example/complex.aswb-build))} spids: [504] ) ] spids: [504] ) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {($ VSub_Name "$COMPLEX_ASWB_BUILD")} {(Lit_Other "]")}) (C {(fail)} {(DQ ($ VSub_Name "$COMPLEX_ASWB_BUILD") (" not found"))}) ] op_id: Op_DPipe ) (C {(expect_log)} {(SQ <"^Build artifacts:">)}) (C {(expect_log)} {(DQ ("^>>>.*/com/google/example/complex.aswb-build"))}) (C {(expect_log)} {(DQ ("^>>>.*/com/google/example/simple.aswb-build"))}) (AndOr children: [ (SimpleCommand words: [ {(bazel)} {(build)} {(//com/google/example) (Lit_Other ":") (complex)} {(--aspects)} {(AndroidStudioInfoAspect)} {(--output_groups)} {(DQ (ide-info))} {(--experimental_show_artifacts)} ] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {($ VSub_Name "$TEST_log")} spids: [582] ) ] ) (C {(fail)} {(DQ ("Expected success"))}) ] op_id: Op_DPipe ) (C {(expect_log)} {(SQ <"^Build artifacts:">)}) (C {(expect_log)} {(DQ ("^>>>.*/com/google/example/complex.aswb-build"))}) (C {(expect_log)} {(DQ ("^>>>.*/com/google/example/simple.aswb-build"))}) ] spids: [319] ) spids: [313 318] ) (FuncDef name: test_ide_resolve_output_group body: (BraceGroup children: [ (C {(mkdir)} {(-p)} {(com/google/example/simple)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/simple/Simple.java)} spids: [638] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("package com.google.example.simple;\n") ("\n") ("public class Simple {\n") (" public static void main(String[] args) {\n") (" System.out.println(") (Right_DoubleQuote "\"") ("Hello world!") (Right_DoubleQuote "\"") (");\n") (" }\n") ("}\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [642] ) ] ) (C {(mkdir)} {(-p)} {(com/google/example/complex)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/complex/Complex.java)} spids: [666] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("package com.google.example.complex;\n") ("\n") ("import com.google.example.simple.Simple;\n") ("\n") ("public class Complex {\n") (" public static void main(String[] args) {\n") (" Simple.main(args);\n") (" }\n") ("}\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [670] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/BUILD)} spids: [686] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("java_library(\n") (" name = ") (Right_DoubleQuote "\"") (simple) (Right_DoubleQuote "\"") (",\n") (" srcs = [") (Right_DoubleQuote "\"") (simple/Simple.java) (Right_DoubleQuote "\"") ("]\n") (")\n") ("\n") ("java_library(\n") (" name = ") (Right_DoubleQuote "\"") (complex) (Right_DoubleQuote "\"") (",\n") (" srcs = [") (Right_DoubleQuote "\"") (complex/Complex.java) (Right_DoubleQuote "\"") ("],\n") (" deps = [") (Right_DoubleQuote "\"") (":simple") (Right_DoubleQuote "\"") ("]\n") (")\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [690] ) ] ) (AndOr children: [ (C {(bazel)} {(build)} {(//com/google/example) (Lit_Other ":") (complex)} {(--aspects)} {(AndroidStudioInfoAspect)} {(--output_groups)} {(DQ (ide-resolve))} ) (C {(fail)} {(DQ ("Expected success"))}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {(${ VSub_Name PRODUCT_NAME) (-bin/com/google/example/libsimple.jar)} {(Lit_Other "]")} ) (C {(fail)} { (DQ (${ VSub_Name PRODUCT_NAME) ("-bin/com/google/example/libsimple.jar not found") ) } ) ] op_id: Op_DPipe ) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {(${ VSub_Name PRODUCT_NAME) (-bin/com/google/example/libcomplex.jar)} {(Lit_Other "]")} ) (C {(fail)} { (DQ (${ VSub_Name PRODUCT_NAME) ("-bin/com/google/example/libcomplex.jar not found") ) } ) ] op_id: Op_DPipe ) ] spids: [626] ) spids: [620 625] ) (FuncDef name: test_filtered_gen_jar_generation body: (BraceGroup children: [ (C {(mkdir)} {(-p)} {(com/google/example)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/Test.java)} spids: [826] ) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("package com.google.example;\n") ("class Test {}\n"))} do_expansion: True here_end: EOF was_filled: True spids: [830] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/BUILD)} spids: [839] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("genrule(\n") (" name = ") (Right_DoubleQuote "\"") (gen) (Right_DoubleQuote "\"") (",\n") (" outs = [") (Right_DoubleQuote "\"") (Gen.java) (Right_DoubleQuote "\"") ("],\n") (" cmd = ") (Right_DoubleQuote "\"") ("echo 'package gen; class Gen {}' > ") (EscapedLiteralPart token:<Lit_EscapedChar "\\$">) ("@") (Right_DoubleQuote "\"") (",\n") (")\n") ("java_library(\n") (" name = ") (Right_DoubleQuote "\"") (test) (Right_DoubleQuote "\"") (",\n") (" srcs = [") (Right_DoubleQuote "\"") (Test.java) (Right_DoubleQuote "\"") (", ") (Right_DoubleQuote "\"") (":gen") (Right_DoubleQuote "\"") ("],\n") (")\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [843] ) ] ) (AndOr children: [ (C {(bazel)} {(build)} {(//com/google/example) (Lit_Other ":") (test)} {(--aspects)} {(AndroidStudioInfoAspect)} {(--output_groups)} {(DQ (ide-resolve))} {(--experimental_show_artifacts)} ) (C {(fail)} {(DQ ("Expected success"))}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:EXAMPLE_DIR) op: Equal rhs: {(DQ (${ VSub_Name PRODUCT_NAME) (-bin/com/google/example))} spids: [918] ) ] spids: [918] ) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {(DQ (${ VSub_Name EXAMPLE_DIR) (/libtest.jar))} {(Lit_Other "]")} ) (C {(fail)} {(DQ (${ VSub_Name EXAMPLE_DIR) ("/libtest.jar not found"))}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {(DQ (${ VSub_Name EXAMPLE_DIR) (/test-filtered-gen.jar))} {(Lit_Other "]")} ) (C {(fail)} {(DQ (${ VSub_Name EXAMPLE_DIR) ("/test-filtered-gen.jar not found"))}) ] op_id: Op_DPipe ) (C {(unzip)} {(DQ (${ VSub_Name EXAMPLE_DIR) (/test-filtered-gen.jar))}) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {(gen/Gen.class)} {(Lit_Other "]")}) (C {(fail)} {(DQ ("Filtered gen jar does not contain Gen.class"))}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(Lit_Other "[")} {(KW_Bang "!")} {(-e)} {(com/google/example/Test.class)} {(Lit_Other "]")} ) (C {(fail)} {(DQ ("Filtered gen jar incorrectly contains Test.class"))}) ] op_id: Op_DPipe ) ] spids: [814] ) spids: [808 813] ) (FuncDef name: test_ide_build_text_file_generation body: (BraceGroup children: [ (C {(mkdir)} {(-p)} {(com/google/example/simple)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/simple/Simple.java)} spids: [1052] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("package com.google.example.simple;\n") ("\n") ("public class Simple {\n") (" public static void main(String[] args) {\n") (" System.out.println(") (Right_DoubleQuote "\"") ("Hello world!") (Right_DoubleQuote "\"") (");\n") (" }\n") ("}\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [1056] ) ] ) (C {(mkdir)} {(-p)} {(com/google/example/complex)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/complex/Complex.java)} spids: [1080] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("package com.google.example.complex;\n") ("\n") ("import com.google.example.simple.Simple;\n") ("\n") ("public class Complex {\n") (" public static void main(String[] args) {\n") (" Simple.main(args);\n") (" }\n") ("}\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [1084] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(com/google/example/BUILD)} spids: [1100] ) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("java_library(\n") (" name = ") (Right_DoubleQuote "\"") (simple) (Right_DoubleQuote "\"") (",\n") (" srcs = [") (Right_DoubleQuote "\"") (simple/Simple.java) (Right_DoubleQuote "\"") ("]\n") (")\n") ("\n") ("java_library(\n") (" name = ") (Right_DoubleQuote "\"") (complex) (Right_DoubleQuote "\"") (",\n") (" srcs = [") (Right_DoubleQuote "\"") (complex/Complex.java) (Right_DoubleQuote "\"") ("],\n") (" deps = [") (Right_DoubleQuote "\"") (":simple") (Right_DoubleQuote "\"") ("]\n") (")\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [1104] ) ] ) (AndOr children: [ (C {(bazel)} {(build)} {(//com/google/example) (Lit_Other ":") (complex)} {(--aspects)} {(AndroidStudioInfoAspect)} {(--output_groups)} {(DQ (ide-info-text))} ) (C {(fail)} {(DQ ("Expected success"))}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:SIMPLE_ASWB_BUILD) op: Equal rhs: { (DQ (${ VSub_Name PRODUCT_NAME) (-bin/com/google/example/simple.aswb-build.txt)) } spids: [1170] ) ] spids: [1170] ) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {($ VSub_Name "$SIMPLE_ASWB_BUILD")} {(Lit_Other "]")}) (C {(fail)} {(DQ ($ VSub_Name "$SIMPLE_ASWB_BUILD") (" not found"))}) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMPLEX_ASWB_BUILD) op: Equal rhs: { (DQ (${ VSub_Name PRODUCT_NAME) (-bin/com/google/example/complex.aswb-build.txt)) } spids: [1197] ) ] spids: [1197] ) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {($ VSub_Name "$COMPLEX_ASWB_BUILD")} {(Lit_Other "]")}) (C {(fail)} {(DQ ($ VSub_Name "$COMPLEX_ASWB_BUILD") (" not found"))}) ] op_id: Op_DPipe ) ] spids: [1040] ) spids: [1034 1039] ) (C {(run_suite)} {(DQ ("Test IDE info files generation"))}) ] )