(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 {(set)} {(-e)}) (FuncDef name: set_up body: (BraceGroup children: [ (C {(mkdir)} {(-p)} {(pkg)}) (C {(cd)} {(pkg)}) (C {(mkdir)} {(-p)} {(a/b)} {(c/d)} {(e/f/g)} {(x/y)}) (C {(touch)} {(py.py)} {(a/b/no_module.py)} {(c/d/one_module.py)} {(c/__init__.py)} {(e/f/g/ignored.py)} {(x/y/z.sh)} ) (C {(chmod)} {(Lit_Other "+") (x)} {(x/y/z.sh)}) (C {(cd)} {(..)}) (C {(touch)} {(__init__.py)}) ] spids: [129] ) spids: [123 128] ) (FuncDef name: test_hidden body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(pkg/BUILD)} spids:[209]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("py_binary(name = ") (Right_DoubleQuote "\"") (py) (Right_DoubleQuote "\"") (",\n") (" srcs = [ ") (Right_DoubleQuote "\"") (py.py) (Right_DoubleQuote "\"") (" ],\n") (" data = [ ") (Right_DoubleQuote "\"") (e/f) (Right_DoubleQuote "\"") (",\n") (" ") (Right_DoubleQuote "\"") (e/f/g/hidden.py) (Right_DoubleQuote "\"") (" ])\n") ("genrule(name = ") (Right_DoubleQuote "\"") (hidden) (Right_DoubleQuote "\"") (",\n") (" outs = [ ") (Right_DoubleQuote "\"") (e/f/g/hidden.py) (Right_DoubleQuote "\"") (" ],\n") (" cmd = ") (Right_DoubleQuote "\"") ("touch ") (EscapedLiteralPart token:<Lit_EscapedChar "\\$">) ("@") (Right_DoubleQuote "\"") (")\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [213] ) ] ) (AndOr children: [ (SimpleCommand words: [{(bazel)} {(build)} {(pkg) (Lit_Other ":") (py)}] redirects: [ (Redir op_id: Redir_GreatAnd fd: -1 arg_word: {($ VSub_Name "$TEST_log")} spids: [263] ) (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[266]) ] ) (C {(fail)} {(DQ ("build failed"))}) ] op_id: Op_DPipe ) (C {(expect_log_once)} {(DQ ("/genfiles/pkg/e/f/g/hidden.py obscured by pkg/e/f "))}) ] spids: [204] ) spids: [198 203] ) (FuncDef name: test_foo_runfiles body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(BUILD)} spids:[302]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("py_library(name = ") (Right_DoubleQuote "\"") (root) (Right_DoubleQuote "\"") (",\n") (" srcs = [") (Right_DoubleQuote "\"") (__init__.py) (Right_DoubleQuote "\"") ("],\n") (" visibility = [") (Right_DoubleQuote "\"") ("//visibility:public") (Right_DoubleQuote "\"") ("])\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [306] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(pkg/BUILD)} spids:[327]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("sh_binary(name = ") (Right_DoubleQuote "\"") (foo) (Right_DoubleQuote "\"") (",\n") (" srcs = [ ") (Right_DoubleQuote "\"") (x/y/z.sh) (Right_DoubleQuote "\"") (" ],\n") (" data = [ ") (Right_DoubleQuote "\"") (":py") (Right_DoubleQuote "\"") (",\n") (" ") (Right_DoubleQuote "\"") (e/f) (Right_DoubleQuote "\"") (" ])\n") ("py_binary(name = ") (Right_DoubleQuote "\"") (py) (Right_DoubleQuote "\"") (",\n") (" srcs = [ ") (Right_DoubleQuote "\"") (py.py) (Right_DoubleQuote "\"") (",\n") (" ") (Right_DoubleQuote "\"") (a/b/no_module.py) (Right_DoubleQuote "\"") (",\n") (" ") (Right_DoubleQuote "\"") (c/d/one_module.py) (Right_DoubleQuote "\"") (",\n") (" ") (Right_DoubleQuote "\"") (c/__init__.py) (Right_DoubleQuote "\"") (",\n") (" ") (Right_DoubleQuote "\"") (e/f/g/ignored.py) (Right_DoubleQuote "\"") (" ],\n") (" deps = [") (Right_DoubleQuote "\"") ("//:root") (Right_DoubleQuote "\"") ("])\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [331] ) ] ) (AndOr children: [ (SimpleCommand words: [{(bazel)} {(build)} {(pkg) (Lit_Other ":") (foo)}] redirects: [ (Redir op_id: Redir_GreatAnd fd: -1 arg_word: {($ VSub_Name "$TEST_log")} spids: [399] ) ] ) (C {(fail)} {(DQ ("build failed"))}) ] op_id: Op_DPipe ) (C {(cd)} {(${ VSub_Name PRODUCT_NAME) (-bin/pkg/foo.runfiles)}) (C {(touch)} {($ VSub_Name "$TEST_TMPDIR") (/__fail)}) (C {(test)} {(-f)} {(MANIFEST)}) (C {(test)} {(-s)} {(MANIFEST)}) (C {(cd)} {(${ VSub_Name WORKSPACE_NAME)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-L)} {(pkg)}) (C {(test)} {(-d)} {(pkg)}) (C {(cd)} {(pkg)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-L)} {(a)}) (C {(test)} {(-d)} {(a)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-L)} {(a/b)}) (C {(test)} {(-d)} {(a/b)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-L)} {(c)}) (C {(test)} {(-d)} {(c)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-L)} {(c/d)}) (C {(test)} {(-d)} {(c/d)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-L)} {(e)}) (C {(test)} {(-d)} {(e)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-L)} {(x)}) (C {(test)} {(-d)} {(x)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-L)} {(x/y)}) (C {(test)} {(-d)} {(x/y)}) (C {(test)} {(-L)} {(foo)}) (C {(test)} {(-L)} {(x/y/z.sh)}) (C {(test)} {(-L)} {(a/b/no_module.py)}) (C {(test)} {(-L)} {(c/d/one_module.py)}) (C {(test)} {(-L)} {(c/__init__.py)}) (C {(test)} {(-L)} {(e/f)}) (C {(test)} {(-d)} {(e/f)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-L)} {(a/__init__.py)}) (C {(test)} {(-f)} {(a/__init__.py)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-s)} {(a/__init__.py)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-L)} {(a/b/__init__.py)}) (C {(test)} {(-f)} {(a/b/__init__.py)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-s)} {(a/b/__init__.py)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-L)} {(c/d/__init__.py)}) (C {(test)} {(-f)} {(c/d/__init__.py)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-s)} {(c/d/__init__.py)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-L)} {(__init__.py)}) (C {(test)} {(-f)} {(__init__.py)}) (C {(test)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-s)} {(__init__.py)}) (C {(cd)} {(../..)}) (C {(assert_equals)} {(9)} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(find)} {(${ VSub_Name WORKSPACE_NAME)} {(-type)} {(l)}) (C {(wc)} {(-l)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [774 790] ) } ) (C {(assert_equals)} {(4)} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(find)} {(${ VSub_Name WORKSPACE_NAME)} {(-type)} {(f)}) (C {(wc)} {(-l)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [797 813] ) } ) (C {(assert_equals)} {(9)} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(find)} {(${ VSub_Name WORKSPACE_NAME)} {(-type)} {(d)}) (C {(wc)} {(-l)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [820 836] ) } ) (C {(assert_equals)} {(22)} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(find)} {(${ VSub_Name WORKSPACE_NAME)}) (C {(wc)} {(-l)})] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [843 855] ) } ) (C {(assert_equals)} {(13)} { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [{(wc)} {(-l)}] redirects: [ (Redir op_id: Redir_Less fd: -1 arg_word: {(MANIFEST)} spids: [867] ) ] ) ] ) left_token: <Left_CommandSub "$("> spids: [862 870] ) } ) (ForEach iter_name: i iter_words: [ { (CommandSubPart command_list: (CommandList children: [ (C {(find)} {(${ VSub_Name WORKSPACE_NAME)} {(EscapedLiteralPart token:<Lit_EscapedChar "\\!">)} {(-type)} {(d)} ) ] ) left_token: <Left_CommandSub "$("> spids: [880 892] ) } ] do_arg_iter: False body: (DoGroup children: [ (C {(echo)} { (DQ ($ VSub_Name "$i") (" ") (CommandSubPart command_list: (CommandList children: [(C {(readlink)} {(DQ ($ VSub_Name "$i"))})] ) left_token: <Left_CommandSub "$("> spids: [903 909] ) ) } ) ] spids: [895 913] ) redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(MANIFEST2)} spids:[915])] spids: [879 893] ) (C {(diff)} {(-u)} { (CommandSubPart command_list: (CommandList children:[(C {(sort)} {(MANIFEST)})]) left_token: <Left_ProcSubIn "<("> spids: [923 927] ) } { (CommandSubPart command_list: (CommandList children:[(C {(sort)} {(MANIFEST2)})]) left_token: <Left_ProcSubIn "<("> spids: [929 933] ) } ) ] spids: [298] ) spids: [292 297] ) (FuncDef name: test_workspace_name_change body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(WORKSPACE)} spids:[949]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("workspace(name = ") (Right_DoubleQuote "\"") (foo) (Right_DoubleQuote "\"") (")\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [953] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(BUILD)} spids:[965]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("cc_binary(\n") (" name = ") (Right_DoubleQuote "\"") (thing) (Right_DoubleQuote "\"") (",\n") (" srcs = [") (Right_DoubleQuote "\"") (thing.cc) (Right_DoubleQuote "\"") ("],\n") (" data = [") (Right_DoubleQuote "\"") (BUILD) (Right_DoubleQuote "\"") ("],\n") (")\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [969] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(thing.cc)} spids:[992]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ ("int main() { return 0; }\n"))} do_expansion: True here_end: EOF was_filled: True spids: [996] ) ] ) (Sentence child: (C {(bazel)} {(build)} {(//) (Lit_Other ":") (thing)}) terminator: <Op_Amp "&"> ) (AndOr children: [ (SimpleCommand redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$TEST_log")} spids: [1010] ) ] ) (C {(fail)} {(DQ ("Build failed"))}) ] op_id: Op_DPipe ) (AndOr children: [ (DBracket expr: (BoolUnary op_id: BoolUnary_d child: {(${ VSub_Name PRODUCT_NAME) (-bin/thing.runfiles/foo)} ) ) (C {(fail)} {(DQ ("foo not found"))}) ] op_id: Op_DPipe ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(WORKSPACE)} spids:[1046]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("workspace(name = ") (Right_DoubleQuote "\"") (bar) (Right_DoubleQuote "\"") (")\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [1050] ) ] ) (Sentence child: (C {(bazel)} {(build)} {(//) (Lit_Other ":") (thing)}) terminator: <Op_Amp "&"> ) (AndOr children: [ (SimpleCommand redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {($ VSub_Name "$TEST_log")} spids: [1068] ) ] ) (C {(fail)} {(DQ ("Build failed"))}) ] op_id: Op_DPipe ) (AndOr children: [ (DBracket expr: (BoolUnary op_id: BoolUnary_d child: {(${ VSub_Name PRODUCT_NAME) (-bin/thing.runfiles/bar)} ) ) (C {(fail)} {(DQ ("bar not found"))}) ] op_id: Op_DPipe ) (AndOr children: [ (DBracket expr: (LogicalNot child: (BoolUnary op_id: BoolUnary_d child: {(${ VSub_Name PRODUCT_NAME) (-bin/thing.runfiles/foo)} ) ) ) (C {(fail)} {(DQ ("Old foo still found"))}) ] op_id: Op_DPipe ) ] spids: [944] ) spids: [938 943] ) (C {(run_suite)} {(DQ (runfiles))}) ] )