(command.CommandList children: [ (C {(set)} {(-o)} {(errexit)}) (C {(cd)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(dirname)} {(DQ ($ VSub_Number '$0'))})] ) left_token: <Left_CommandSub '$('> spids: [78 84] ) ) } ) (C {(Lit_Other ':')} { (word_part.BracedVarSub token: <VSub_Name VERBOSE> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonEquals arg_word:{(no)}) spids: [99 103] ) } ) (C {(source)} {(scripts/bootstrap/buildenv.sh)}) (command.FuncDef name: usage body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-n)} { (DQ (word_part.BracedVarSub token: <VSub_Number 1> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{(compile)}) spids: [125 129] ) ) } {(Lit_Other ']')} ) (command.SimpleCommand words: [{(echo)} {(DQ ('Invalid command(s): ') ($ VSub_Number '$1'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) ] ) (command.SimpleCommand words: [ {(echo)} { (DQ ('syntax: ') ($ VSub_Number '$0') (' [command[,command]* [BAZEL_BIN [BAZEL_SUM]]]') ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.SimpleCommand words: [{(echo)} {(DQ (' General purpose commands:'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.SimpleCommand words: [{(echo)} {(DQ (' compile = compile the bazel binary (default)'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.SimpleCommand words: [{(echo)} {(DQ (' Commands for developers:'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.SimpleCommand words: [{(echo)} {(DQ (' all = compile,determinism,test'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.SimpleCommand words: [{(echo)} {(DQ (' determinism = test for stability of Bazel builds'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.SimpleCommand words: [{(echo)} {(DQ (' srcs = test that //:srcs contains all the sources'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.SimpleCommand words: [{(echo)} {(DQ (' test = run the full test suite of Bazel'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [117] ) spids: [111 116] ) (command.FuncDef name: parse_options body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:keywords spids:[247]) op: Equal rhs: {(DQ ('(compile|all|determinism|bootstrap|srcs|test)'))} spids: [247] ) ] spids: [245] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:COMMANDS spids:[253]) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Number 1> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonHyphen arg_word: {(compile)} ) spids: [255 259] ) ) } spids: [253] ) ] spids: [253] ) (command.AndOr ops: [Op_DPipe] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ (${ VSub_Name COMMANDS))} right: {(Lit_Other '^') ($ VSub_Name '$keywords') (Lit_Other '(') (Lit_Other ',') ($ VSub_Name '$keywords') (Lit_Other ')') (Lit_Other '*') (Lit_Other '$') } ) ) (C {(usage)} {(DQ ($ VSub_At '$@'))}) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DO_COMPILE spids:[293]) op: Equal rhs: (word.EmptyWord) spids: [293] ) ] spids: [293] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DO_CHECKSUM spids:[296]) op: Equal rhs: (word.EmptyWord) spids: [296] ) ] spids: [296] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DO_FULL_CHECKSUM spids:[299]) op: Equal rhs: {(1)} spids: [299] ) ] spids: [299] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DO_TESTS spids:[303]) op: Equal rhs: (word.EmptyWord) spids: [303] ) ] spids: [303] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DO_SRCS_TEST spids:[306]) op: Equal rhs: (word.EmptyWord) spids: [306] ) ] spids: [306] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ (${ VSub_Name COMMANDS))} right: {(Lit_Other '(') (compile) (Lit_Other '|') (all) (Lit_Other ')')} ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DO_COMPILE spids:[329]) op: Equal rhs: {(1)} spids: [329] ) ] spids: [329] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ (${ VSub_Name COMMANDS))} right: {(Lit_Other '(') (bootstrap) (Lit_Other '|') (determinism) (Lit_Other '|') (all) (Lit_Other ')') } ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DO_CHECKSUM spids:[355]) op: Equal rhs: {(1)} spids: [355] ) ] spids: [355] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ (${ VSub_Name COMMANDS))} right: {(Lit_Other '(') (bootstrap) (Lit_Other ')')} ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DO_FULL_CHECKSUM spids:[377]) op: Equal rhs: (word.EmptyWord) spids: [377] ) ] spids: [377] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ (${ VSub_Name COMMANDS))} right: {(Lit_Other '(') (srcs) (Lit_Other '|') (all) (Lit_Other ')')} ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DO_SRCS_TEST spids:[400]) op: Equal rhs: {(1)} spids: [400] ) ] spids: [400] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_EqualTilde left: {(DQ (${ VSub_Name COMMANDS))} right: {(Lit_Other '(') (test) (Lit_Other '|') (all) (Lit_Other ')')} ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DO_TESTS spids:[424]) op: Equal rhs: {(1)} spids: [424] ) ] spids: [424] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:BAZEL_BIN spids:[429]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 2> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonHyphen arg_word: {(DQ (bazel-bin/src/bazel))} ) spids: [430 436] ) } spids: [429] ) ] spids: [429] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:BAZEL_SUM spids:[439]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Number 3> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ (x))}) spids: [440 446] ) } spids: [439] ) ] spids: [439] ) ] spids: [242] ) spids: [236 241] ) (C {(parse_options)} {(DQ (${ VSub_At '@'))}) (C {(mkdir)} {(-p)} {(output)}) (C {(Lit_Other ':')} { (word_part.BracedVarSub token: <VSub_Name BAZEL> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonEquals arg_word: { (word_part.BracedVarSub token: <VSub_Number 2> suffix_op: (suffix_op.StringUnary op_id:VTest_Hyphen arg_word:{}) spids: [471 474] ) } ) spids: [468 475] ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-x)} {(DQ (${ VSub_Name BAZEL))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(display)} { (DQ ($ VSub_Name '$INFO') ( ' You can skip this first step by providing a path to the bazel binary as second argument:' ) ) } ) (C {(display)} { (DQ ($ VSub_Name '$INFO') (' ') ($ VSub_Number '$0') (' ') (${ VSub_Name COMMANDS) (' /path/to/bazel') ) } ) (C {(new_step)} {(SQ <'Building Bazel from scratch'>)}) (C {(source)} {(scripts/bootstrap/compile.sh)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DO_COMPILE spids:[545]) op: Equal rhs: {(1)} spids: [545] ) ] spids: [545] ) ] spids: [16777215 504] ) ] spids: [16777215 548] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} { (DQ (word_part.BracedVarSub token: <VSub_Name EMBED_LABEL> suffix_op: (suffix_op.StringUnary op_id:VTest_Hyphen arg_word:{(x)}) spids: [565 569] ) ) } {(Lit_Other '=')} {(DQ (x))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:git_sha1 spids:[588]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(git_sha1)})]) left_token: <Left_CommandSub '$('> spids: [589 591] ) } spids: [588] ) ] spids: [588] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:EMBED_LABEL spids:[594]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(get_last_version)})]) left_token: <Left_CommandSub '$('> spids: [596 598] ) (' (@') (word_part.BracedVarSub token: <VSub_Name git_sha1> suffix_op: (suffix_op.StringUnary op_id: VTest_ColonHyphen arg_word: {(non-git)} ) spids: [600 604] ) (')') ) } spids: [594] ) ] spids: [594] ) ] spids: [16777215 581] ) ] spids: [16777215 608] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (command.DBracket expr: (bool_expr.BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Name '$PLATFORM')} right: {(DQ (darwin))} ) ) (command.Pipeline children: [ (command.SimpleCommand words: [{(xcodebuild)} {(-showsdks)}] redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) (C {(grep)} {(-q)} {(SQ <'\\-sdk iphonesimulator'>)}) ] negated: F ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:EXTRA_BAZEL_ARGS spids:[651]) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name EXTRA_BAZEL_ARGS> suffix_op: (suffix_op.StringUnary op_id:VTest_Hyphen arg_word:(word.EmptyWord)) spids: [653 656] ) (' --define IPHONE_SDK=1') ) } spids: [651] ) ] spids: [651] ) ] spids: [16777215 648] ) ] spids: [16777215 660] ) (C {(source)} {(scripts/bootstrap/bootstrap.sh)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$DO_COMPILE')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(new_step)} {(SQ <'Building Bazel with Bazel'>)}) (C {(display)} {(DQ (.))}) (C {(log)} {(DQ ('Building output/bazel'))}) (command.AndOr ops: [Op_DPipe] children: [ (C {(bazel_build)} {(DQ ('src:bazel') (${ VSub_Name EXE_EXT))}) (C {(fail)} {(DQ ('Could not build Bazel'))}) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:bazel_bin_path spids:[720]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(get_bazel_bin_path)})]) left_token: <Left_CommandSub '$('> spids: [722 724] ) (/src/bazel) (${ VSub_Name EXE_EXT) ) } spids: [720] ) ] spids: [720] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-e)} {(DQ ($ VSub_Name '$bazel_bin_path'))} {(Lit_Other ']')}) (C {(fail)} { (DQ ("Could not find freshly built Bazel binary at '") ($ VSub_Name '$bazel_bin_path') ("'") ) } ) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(cp)} {(-f)} {(DQ ($ VSub_Name '$bazel_bin_path'))} {(DQ (output/bazel) (${ VSub_Name EXE_EXT))} ) (C {(fail)} { (DQ ("Could not copy '") ($ VSub_Name '$bazel_bin_path') ("' to 'output/bazel") (${ VSub_Name EXE_EXT) ("'") ) } ) ] ) (C {(chmod)} {(0755)} {(DQ (output/bazel) (${ VSub_Name EXE_EXT))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:BAZEL spids:[799]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> spids: [801 803] ) (/output/bazel) (${ VSub_Name EXE_EXT) ) } spids: [799] ) ] spids: [799] ) ] spids: [16777215 676] ) ] spids: [16777215 810] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$DO_CHECKSUM')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(new_step)} {(DQ ('Determinism test'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} { (word_part.BracedVarSub token: <VSub_Name BAZEL_SUM> suffix_op: (suffix_op.StringUnary op_id:VTest_ColonHyphen arg_word:{(x)}) spids: [852 856] ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:BAZEL_SUM spids:[864]) op: Equal rhs: {(bazel-out/bazel_checksum)} spids: [864] ) ] spids: [864] ) (C {(log)} {(DQ ('First build'))}) (C {(bootstrap_test)} {(${ VSub_Name BAZEL)} {(${ VSub_Name BAZEL_SUM)}) ] spids: [16777215 861] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:BOOTSTRAP spids:[889]) op: Equal rhs: {(${ VSub_Name BAZEL)} spids: [889] ) ] spids: [889] ) ] spids: [886 895] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ (${ VSub_Name BAZEL_SUM))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (${ VSub_Name OUTPUT_DIR) (/bazel_checksum))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(cp)} {(${ VSub_Name BAZEL_SUM)} {(${ VSub_Name OUTPUT_DIR) (/bazel_checksum)}) ] spids: [16777215 921] ) ] spids: [16777215 936] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$DO_FULL_CHECKSUM')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(log)} {(DQ ('Second build'))}) (C {(bootstrap_test)} {(${ VSub_Name BOOTSTRAP)} {(bazel-out/bazel_checksum)}) (C {(log)} {(DQ ('Comparing output'))}) (command.AndOr ops: [Op_DPipe] children: [ (command.Subshell child: (command.SimpleCommand words: [ {(diff)} {(-U)} {(0)} {(${ VSub_Name OUTPUT_DIR) (/bazel_checksum)} {(bazel-out/bazel_checksum)} ] redirects: [ (redir.Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) spids: [974 990] ) (C {(fail)} {(DQ ('Differences detected in outputs!'))}) ] ) ] spids: [16777215 948] ) ] spids: [16777215 1003] ) ] spids: [16777215 834] ) ] spids: [16777215 1005] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$DO_SRCS_TEST')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(new_step)} {(DQ ('Checking that //:srcs contains all the sources'))}) (C {(log)} {(DQ ('Querying //:srcs'))}) (command.Pipeline children: [ (command.SimpleCommand words: [{(${ VSub_Name BAZEL)} {(query)} {(SQ <'kind("source file", deps(//:srcs))'>)}] redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) (C {(grep)} {(-v)} {(SQ <'^@'>)}) (C {(sed)} {(-e)} {(SQ <'s|^//||'>)}) (C {(sed)} {(SQ <'s|^:||'>)}) (C {(sed)} {(SQ <'s|:|/|'>)}) (command.SimpleCommand words: [{(sort)} {(-u)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ (${ VSub_Name OUTPUT_DIR) (/srcs-query))} ) ] ) ] negated: F ) (C {(log)} {(DQ ('Finding all files'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SRCS_EXCLUDES spids:[1129]) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name SRCS_EXCLUDES> suffix_op: (suffix_op.StringUnary op_id: VTest_Hyphen arg_word: {(XXXXXXXXXXXXXX1268778dfsdf4)} ) spids: [1130 1134] ) } spids: [1129] ) ] spids: [1129] ) (command.Pipeline children: [ (C {(find)} {(.)} {(-type)} {(f)}) (C {(sed)} {(SQ <'s|./||'>)}) (C {(grep)} {(-v)} {(SQ <'^bazel-'>)}) (C {(grep)} {(-v)} {(SQ <'^WORKSPACE.user.bzl'>)}) (C {(grep)} {(-v)} {(SQ <'^\\.'>)}) (C {(grep)} {(-v)} {(SQ <'^out/'>)}) (C {(grep)} {(-v)} {(SQ <'^output/'>)}) (C {(grep)} {(-Ev)} {(DQ (${ VSub_Name SRCS_EXCLUDES))}) (C {(grep)} {(-v)} {(SQ <'^tools/defaults/BUILD'>)}) (command.SimpleCommand words: [{(sort)} {(-u)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ (${ VSub_Name OUTPUT_DIR) (/srcs-find))} ) ] ) ] negated: F ) (C {(log)} {(DQ (Diffing))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:res spids:[1266]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.AndOr ops: [Op_DPipe] children: [ (command.Pipeline children: [ (C {(diff)} {(-U)} {(0)} {(DQ (${ VSub_Name OUTPUT_DIR) (/srcs-find))} {(DQ (${ VSub_Name OUTPUT_DIR) (/srcs-query))} ) (C {(sed)} {(SQ <'s|^-||'>)}) (C {(grep)} {(-Ev)} {(SQ <'^(@@|\\+\\+|--)'>)}) ] negated: F ) (C {(true)}) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [1268 1310] ) ) } spids: [1266] ) ] spids: [1266] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ (${ VSub_Name res))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(fail)} { (DQ ('//:srcs filegroup do not contains all the sources, missing:\n') (${ VSub_Name res) ) } ) ] spids: [16777215 1330] ) ] spids: [16777215 1343] ) ] spids: [16777215 1026] ) ] spids: [16777215 1345] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {($ VSub_Name '$DO_TESTS')} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (C {(new_step)} {(DQ ('Running tests'))}) (C {(display)} {(DQ (.))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:ndk_target spids:[1384]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(get_bind_target)} {(//external) (Lit_Other ':') (android_ndk_for_testing)} ) ] ) left_token: <Left_CommandSub '$('> spids: [1386 1392] ) ) } spids: [1384] ) ] spids: [1384] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:sdk_target spids:[1396]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(get_bind_target)} {(//external) (Lit_Other ':') (android_sdk_for_testing)} ) ] ) left_token: <Left_CommandSub '$('> spids: [1398 1404] ) ) } spids: [1396] ) ] spids: [1396] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$ndk_target'))} {(Lit_Other '=')} {(DQ ('//:dummy'))} {(-o)} {(DQ ($ VSub_Name '$sdk_target'))} {(Lit_Other '=')} {(DQ ('//:dummy'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(display)} { (DQ ($ VSub_Name '$WARNING') ( ' Android SDK or NDK are not set in the WORKSPACE file. Android tests will not be run.' ) ) } ) ] spids: [16777215 1437] ) ] spids: [16777215 1448] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Name '$JAVAC_VERSION'))} {(Lit_Other ']')}) (C {(get_java_version)}) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalNot child: (bool_expr.BoolBinary op_id: BoolBinary_EqualTilde left: { (DQ (word_part.BracedVarSub token: <VSub_Name BAZEL_TEST_FILTERS> suffix_op: (suffix_op.StringUnary op_id:VTest_Hyphen arg_word:(word.EmptyWord)) spids: [1474 1477] ) ) } right: {(DQ (-jdk8))} ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(DQ (8))} {(-gt)} { (word_part.BracedVarSub token: <VSub_Name JAVAC_VERSION> suffix_op: (suffix_op.StringUnary op_id: VOp1_Pound arg_word: {('*.')} ) spids: [1502 1506] ) } {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(DQ (${ VSub_Name JAVA_VERSION))} {(Lit_Other '=')} {(DQ (1.7))} {(Lit_Other ']')} ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(display)} { (DQ ($ VSub_Name '$WARNING') (' Your version of Java is lower than 1.8!') ) } ) (C {(display)} { (DQ ($ VSub_Name '$WARNING') (' Deactivating Java 8 tests, please use a JDK 8 to fully') ) } ) (C {(display)} {(DQ ($ VSub_Name '$WARNING') (' test Bazel.'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(-n)} { (DQ (word_part.BracedVarSub token: <VSub_Name BAZEL_TEST_FILTERS> suffix_op: (suffix_op.StringUnary op_id:VTest_Hyphen arg_word:(word.EmptyWord)) spids: [1563 1566] ) ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name: BAZEL_TEST_FILTERS spids: [1575] ) op: Equal rhs: {(DQ (${ VSub_Name BAZEL_TEST_FILTERS) (',-jdk8'))} spids: [1575] ) ] spids: [1575] ) ] spids: [16777215 1572] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:BAZEL_TEST_FILTERS spids:[1587]) op: Equal rhs: {(DQ (-jdk8))} spids: [1587] ) ] spids: [1587] ) ] spids: [1584 1593] ) ] spids: [16777215 1529] ) ] spids: [16777215 1596] ) ] spids: [16777215 1489] ) ] spids: [16777215 1599] ) (command.AndOr ops: [Op_DPipe] children: [ (C {($ VSub_Name '$BAZEL')} {(--bazelrc) (Lit_Other '=') (${ VSub_Name BAZELRC)} {(--nomaster_bazelrc)} {(${ VSub_Name BAZEL_DIR_STARTUP_OPTIONS)} {(test)} {(--test_tag_filters) (Lit_Other '=') (DQ (word_part.BracedVarSub token: <VSub_Name BAZEL_TEST_FILTERS> suffix_op: (suffix_op.StringUnary op_id:VTest_Hyphen arg_word:(word.EmptyWord)) spids: [1627 1630] ) ) } {(--build_tests_only)} {(--nolegacy_bazel_java_test)} {(--define)} {(Lit_VarLike 'JAVA_VERSION=') (${ VSub_Name JAVA_VERSION)} {(${ VSub_Name EXTRA_BAZEL_ARGS)} {(-k)} {(--test_output) (Lit_Other '=') (errors)} {(//src/...)} {(//third_party/ijar/...)} {(//scripts/...)} ) (C {(fail)} {(DQ ('Tests failed'))}) ] ) ] spids: [16777215 1366] ) ] spids: [16777215 1680] ) (C {(clear_log)}) (C {(display)} {(DQ ('Build successful! Binary is here: ') (${ VSub_Name BAZEL))}) ] )