(command.CommandList children: [ (C {<set>} {<-o>} {<errexit>}) (C {<cd>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<dirname>} {(DQ ($ Id.VSub_Number '$0'))}) ) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name VERBOSE> suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonEquals arg_word:{<no>}) ) } ) (C {<source>} {<'scripts/bootstrap/buildenv.sh'>}) (command.ShFunction name: usage body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-n>} { (DQ (braced_var_sub token: <Id.VSub_Number 1> suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<compile>}) ) ) } {<Id.Lit_RBracket ']'>} ) (command.Simple words: [{<echo>} {(DQ <'Invalid command(s): '> ($ Id.VSub_Number '$1'))}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) ] ) (command.Simple words: [ {<echo>} { (DQ <'syntax: '> ($ Id.VSub_Number '$0') <' [command[,command]* [BAZEL_BIN [BAZEL_SUM]]]'> ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <' General purpose commands:'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <' compile = compile the bazel binary (default)'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <' Commands for developers:'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <' all = compile,determinism,test'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <' determinism = test for stability of Bazel builds'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <' srcs = test that //:srcs contains all the sources'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <' test = run the full test suite of Bazel'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ) (command.ShFunction name: parse_options body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'keywords='> (DQ <'(compile|all|determinism|bootstrap|srcs|test)'>)} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:COMMANDS) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: <Id.VSub_Number 1> suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<compile>}) ) ) } spids: [245] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {(DQ (${ Id.VSub_Name COMMANDS))} right: {<Id.Lit_Other '^'> ($ Id.VSub_DollarName '$keywords') <Id.Lit_Other '('> <Id.Lit_Other ','> ($ Id.VSub_DollarName '$keywords') <Id.Lit_Other ')'> <Id.Lit_Other '*'> <Id.Lit_Other '$'> } ) ) (C {<usage>} {(DQ ($ Id.VSub_At '$@'))}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DO_COMPILE) op: assign_op.Equal rhs: (word.Empty) spids: [285] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DO_CHECKSUM) op: assign_op.Equal rhs: (word.Empty) spids: [288] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DO_FULL_CHECKSUM) op: assign_op.Equal rhs: {<1>} spids: [291] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DO_TESTS) op: assign_op.Equal rhs: (word.Empty) spids: [295] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DO_SRCS_TEST) op: assign_op.Equal rhs: (word.Empty) spids: [298] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {(DQ (${ Id.VSub_Name COMMANDS))} right: {<Id.Lit_Other '('> <compile> <Id.Lit_Other '|'> <all> <Id.Lit_Other ')'>} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DO_COMPILE) op: assign_op.Equal rhs: {<1>} spids: [321] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {(DQ (${ Id.VSub_Name COMMANDS))} right: {<Id.Lit_Other '('> <bootstrap> <Id.Lit_Other '|'> <determinism> <Id.Lit_Other '|'> <all> <Id.Lit_Other ')'> } ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DO_CHECKSUM) op: assign_op.Equal rhs: {<1>} spids: [347] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {(DQ (${ Id.VSub_Name COMMANDS))} right: {<Id.Lit_Other '('> <bootstrap> <Id.Lit_Other ')'>} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DO_FULL_CHECKSUM) op: assign_op.Equal rhs: (word.Empty) spids: [369] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {(DQ (${ Id.VSub_Name COMMANDS))} right: {<Id.Lit_Other '('> <srcs> <Id.Lit_Other '|'> <all> <Id.Lit_Other ')'>} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DO_SRCS_TEST) op: assign_op.Equal rhs: {<1>} spids: [392] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {(DQ (${ Id.VSub_Name COMMANDS))} right: {<Id.Lit_Other '('> <test> <Id.Lit_Other '|'> <all> <Id.Lit_Other ')'>} ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DO_TESTS) op: assign_op.Equal rhs: {<1>} spids: [416] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BAZEL_BIN) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Number 2> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {(DQ <'bazel-bin/src/bazel'>)} ) ) } spids: [421] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BAZEL_SUM) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Number 3> suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(DQ <x>)}) ) } spids: [431] ) ] ) ] ) ) (C {<parse_options>} {(DQ (${ Id.VSub_At '@'))}) (C {<mkdir>} {<-p>} {<output>}) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name BAZEL> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonEquals arg_word: { (braced_var_sub token: <Id.VSub_Number 2> suffix_op: (suffix_op.Unary op_id:Id.VTest_Hyphen arg_word:{}) ) } ) ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-x>} {(DQ (${ Id.VSub_Name BAZEL))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<display>} { (DQ ($ Id.VSub_DollarName '$INFO') < ' You can skip this first step by providing a path to the bazel binary as second argument:' > ) } ) (C {<display>} { (DQ ($ Id.VSub_DollarName '$INFO') <' '> ($ Id.VSub_Number '$0') <' '> (${ Id.VSub_Name COMMANDS) <' /path/to/bazel'> ) } ) (C {<new_step>} {(SQ <'Building Bazel from scratch'>)}) (C {<source>} {<'scripts/bootstrap/compile.sh'>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DO_COMPILE) op: assign_op.Equal rhs: {<1>} spids: [537] ) ] ) ] spids: [479 496] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name EMBED_LABEL> suffix_op: (suffix_op.Unary op_id:Id.VTest_Hyphen arg_word:{<x>}) ) ) } {<Id.Lit_Equals '='>} {(DQ <x>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:git_sha1) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<git_sha1>}))} spids: [580] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EMBED_LABEL) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<get_last_version>}) ) <' (@'> (braced_var_sub token: <Id.VSub_Name git_sha1> suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<non-git>}) ) <')'> ) } spids: [586] ) ] ) ] spids: [552 573] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$PLATFORM')} right: {(DQ <darwin>)} ) ) (command.Pipeline children: [ (command.Simple words: [{<xcodebuild>} {<-showsdks>}] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<grep>} {<-q>} {(SQ <'\\-sdk iphonesimulator'>)}) ] negated: F ) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EXTRA_BAZEL_ARGS) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: <Id.VSub_Name EXTRA_BAZEL_ARGS> suffix_op: (suffix_op.Unary op_id:Id.VTest_Hyphen arg_word:(word.Empty)) ) <' --define IPHONE_SDK=1'> ) } spids: [643] ) ] ) ] spids: [603 640] ) ] ) (C {<source>} {<'scripts/bootstrap/bootstrap.sh'>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$DO_COMPILE')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<new_step>} {(SQ <'Building Bazel with Bazel'>)}) (C {<display>} {(DQ <.>)}) (C {<log>} {(DQ <'Building output/bazel'>)}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<bazel_build>} {(DQ <'src:bazel'> (${ Id.VSub_Name EXE_EXT))}) (C {<fail>} {(DQ <'Could not build Bazel'>)}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:bazel_bin_path) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<get_bazel_bin_path>}) ) <'/src/bazel'> (${ Id.VSub_Name EXE_EXT) ) } spids: [712] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<-e>} {(DQ ($ Id.VSub_DollarName '$bazel_bin_path'))} {<Id.Lit_RBracket ']'>} ) (C {<fail>} { (DQ <'Could not find freshly built Bazel binary at \''> ($ Id.VSub_DollarName '$bazel_bin_path') <'\''> ) } ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<cp>} {<-f>} {(DQ ($ Id.VSub_DollarName '$bazel_bin_path'))} {(DQ <'output/bazel'> (${ Id.VSub_Name EXE_EXT))} ) (C {<fail>} { (DQ <'Could not copy \''> ($ Id.VSub_DollarName '$bazel_bin_path') <'\' to \'output/bazel'> (${ Id.VSub_Name EXE_EXT) <'\''> ) } ) ] ) (C {<chmod>} {<0755>} {(DQ <'output/bazel'> (${ Id.VSub_Name EXE_EXT))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BAZEL) op: assign_op.Equal rhs: { (DQ (command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<pwd>})) <'/output/bazel'> (${ Id.VSub_Name EXE_EXT) ) } spids: [791] ) ] ) ] spids: [659 668] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$DO_CHECKSUM')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<new_step>} {(DQ <'Determinism test'>)}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} { (braced_var_sub token: <Id.VSub_Name BAZEL_SUM> suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {<x>} ) ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BAZEL_SUM) op: assign_op.Equal rhs: {<'bazel-out/bazel_checksum'>} spids: [856] ) ] ) (C {<log>} {(DQ <'First build'>)}) (C {<bootstrap_test>} {(${ Id.VSub_Name BAZEL)} {(${ Id.VSub_Name BAZEL_SUM)}) ] spids: [836 853] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BOOTSTRAP) op: assign_op.Equal rhs: {(${ Id.VSub_Name BAZEL)} spids: [881] ) ] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name BAZEL_SUM))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name OUTPUT_DIR) <'/bazel_checksum'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<cp>} {(${ Id.VSub_Name BAZEL_SUM)} {(${ Id.VSub_Name OUTPUT_DIR) <'/bazel_checksum'>} ) ] spids: [890 913] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$DO_FULL_CHECKSUM')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<log>} {(DQ <'Second build'>)}) (C {<bootstrap_test>} {(${ Id.VSub_Name BOOTSTRAP)} {<'bazel-out/bazel_checksum'>}) (C {<log>} {(DQ <'Comparing output'>)}) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Subshell child: (command.Simple words: [ {<diff>} {<-U>} {<0>} {(${ Id.VSub_Name OUTPUT_DIR) <'/bazel_checksum'>} {<'bazel-out/bazel_checksum'>} ] redirects: [ (redir op: <Id.Redir_GreatAnd '>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) ) (C {<fail>} {(DQ <'Differences detected in outputs!'>)}) ] ) ] spids: [931 940] ) ] ) ] spids: [817 826] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$DO_SRCS_TEST')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<new_step>} {(DQ <'Checking that //:srcs contains all the sources'>)}) (C {<log>} {(DQ <'Querying //:srcs'>)}) (command.Pipeline children: [ (command.Simple words: [ {(${ Id.VSub_Name BAZEL)} {<query>} {(SQ <'kind("source file", deps(//:srcs))'>)} ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<grep>} {<-v>} {(SQ <'^@'>)}) (C {<sed>} {<-e>} {(SQ <'s|^//||'>)}) (C {<sed>} {(SQ <'s|^:||'>)}) (C {<sed>} {(SQ <'s|:|/|'>)}) (command.Simple words: [{<sort>} {<-u>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ (${ Id.VSub_Name OUTPUT_DIR) <'/srcs-query'>)} ) ] do_fork: T ) ] negated: F ) (C {<log>} {(DQ <'Finding all files'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SRCS_EXCLUDES) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name SRCS_EXCLUDES> suffix_op: (suffix_op.Unary op_id: Id.VTest_Hyphen arg_word: {<XXXXXXXXXXXXXX1268778dfsdf4>} ) ) } spids: [1121] ) ] ) (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 (${ Id.VSub_Name SRCS_EXCLUDES))}) (C {<grep>} {<-v>} {(SQ <'^tools/defaults/BUILD'>)}) (command.Simple words: [{<sort>} {<-u>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ (${ Id.VSub_Name OUTPUT_DIR) <'/srcs-find'>)} ) ] do_fork: T ) ] negated: F ) (C {<log>} {(DQ <Diffing>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:res) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Pipeline children: [ (C {<diff>} {<-U>} {<0>} {(DQ (${ Id.VSub_Name OUTPUT_DIR) <'/srcs-find'>)} {(DQ (${ Id.VSub_Name OUTPUT_DIR) <'/srcs-query'>)} ) (C {<sed>} {(SQ <'s|^-||'>)}) (C {<grep>} {<-Ev>} {(SQ <'^(@@|\\+\\+|--)'>)}) ] negated: F ) (C {<true>}) ] ) ) ) } spids: [1258] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name res))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<fail>} { (DQ <'//:srcs filegroup do not contains all the sources, missing:\n'> (${ Id.VSub_Name res) ) } ) ] spids: [1307 1322] ) ] ) ] spids: [1009 1018] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$DO_TESTS')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<new_step>} {(DQ <'Running tests'>)}) (C {<display>} {(DQ <.>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ndk_target) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<get_bind_target>} {<'//external'> <Id.Lit_Colon ':'> <android_ndk_for_testing>} ) ) ) } spids: [1376] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sdk_target) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<get_bind_target>} {<'//external'> <Id.Lit_Colon ':'> <android_sdk_for_testing>} ) ) ) } spids: [1388] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$ndk_target'))} {<Id.Lit_Equals '='>} {(DQ <'//:dummy'>)} {<-o>} {(DQ ($ Id.VSub_DollarName '$sdk_target'))} {<Id.Lit_Equals '='>} {(DQ <'//:dummy'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<display>} { (DQ ($ Id.VSub_DollarName '$WARNING') < ' Android SDK or NDK are not set in the WORKSPACE file. Android tests will not be run.' > ) } ) ] spids: [1400 1429] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$JAVAC_VERSION'))} {<Id.Lit_RBracket ']'>} ) (C {<get_java_version>}) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalNot child: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: { (DQ (braced_var_sub token: <Id.VSub_Name BAZEL_TEST_FILTERS> suffix_op: (suffix_op.Unary op_id:Id.VTest_Hyphen arg_word:(word.Empty)) ) ) } right: {(DQ <-jdk8>)} ) ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {(DQ <8>)} {<-gt>} { (braced_var_sub token: <Id.VSub_Name JAVAC_VERSION> suffix_op: (suffix_op.Unary op_id: Id.VOp1_Pound arg_word: {<'*.'>} ) ) } {<Id.Lit_RBracket ']'>} ) (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name JAVA_VERSION))} {<Id.Lit_Equals '='>} {(DQ <1.7>)} {<Id.Lit_RBracket ']'>} ) ] ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<display>} { (DQ ($ Id.VSub_DollarName '$WARNING') <' Your version of Java is lower than 1.8!'> ) } ) (C {<display>} { (DQ ($ Id.VSub_DollarName '$WARNING') <' Deactivating Java 8 tests, please use a JDK 8 to fully'> ) } ) (C {<display>} {(DQ ($ Id.VSub_DollarName '$WARNING') <' test Bazel.'>)}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} { (DQ (braced_var_sub token: <Id.VSub_Name BAZEL_TEST_FILTERS> suffix_op: (suffix_op.Unary op_id: Id.VTest_Hyphen arg_word: (word.Empty) ) ) ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BAZEL_TEST_FILTERS) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name BAZEL_TEST_FILTERS) <',-jdk8'>)} spids: [1567] ) ] ) ] spids: [1548 1564] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BAZEL_TEST_FILTERS) op: assign_op.Equal rhs: {(DQ <-jdk8>)} spids: [1579] ) ] ) ] ) ] spids: [1484 1521] ) ] ) ] spids: [1459 1481] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {($ Id.VSub_DollarName '$BAZEL')} {<--bazelrc> <Id.Lit_Equals '='> (${ Id.VSub_Name BAZELRC)} {<--nomaster_bazelrc>} {(${ Id.VSub_Name BAZEL_DIR_STARTUP_OPTIONS)} {<test>} {<--test_tag_filters> <Id.Lit_Equals '='> (DQ (braced_var_sub token: <Id.VSub_Name BAZEL_TEST_FILTERS> suffix_op: (suffix_op.Unary op_id:Id.VTest_Hyphen arg_word:(word.Empty)) ) ) } {<--build_tests_only>} {<--nolegacy_bazel_java_test>} {<--define>} {<Id.Lit_VarLike 'JAVA_VERSION='> (${ Id.VSub_Name JAVA_VERSION)} {(${ Id.VSub_Name EXTRA_BAZEL_ARGS)} {<-k>} {<--test_output> <Id.Lit_Equals '='> <errors>} {<'//src/...'>} {<'//third_party/ijar/...'>} {<'//scripts/...'>} ) (C {<fail>} {(DQ <'Tests failed'>)}) ] ) ] spids: [1349 1358] ) ] ) (C {<clear_log>}) (C {<display>} {(DQ <'Build successful! Binary is here: '> (${ Id.VSub_Name BAZEL))}) ] )