#!/bin/bash source sources/utility_functions.sh || exit 1 # Test all architctures to see whether or not they can compile and run # the included "hello world" program. echo "Architecture,Smoketest,Control Image,Build Stage" for i in [$[ls sources/targets | sed 's@.*/@@]] { test ! -f "sources/targets/$i" && continue echo -n "$i," grep -q 'Hello world!' build/logs/smoketest-$i.txt !2 >/dev/null && echo -n "PASS," || echo -n "FAIL," test -e "build/dropbearmulti-$i" && echo -n "PASS," || echo -n "FAIL," echo $[ sed -n 's/^=== \([^(]*\)([^ ]* \(.*\))/\2 \1/p' \ build/logs/build-$i.txt | tail -n 1] } (CommandList children: [ (AndOr children: [(C {(.)} {(sources/utility_functions.sh)}) (C {(exit)} {(1)})] op_id: Op_DPipe ) (C {(echo)} {(DQ ("Architecture,Smoketest,Control Image,Build Stage"))}) (ForEach iter_name: i iter_words: [ { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(ls)} {(sources/targets)}) (C {(sed)} {(SQ <"s@.*/@@">)})] negated: False ) ] ) left_token: spids: [35 47] ) } ] do_arg_iter: False body: (DoGroup children: [ (AndOr children: [ (C {(Lit_Other "[")} {(KW_Bang "!")} {(-f)} {(DQ (sources/targets/) ($ VSub_Name "$i"))} {(Lit_Other "]")} ) (ControlFlow token:) ] op_id: Op_DAmp ) (C {(echo)} {(-n)} {(DQ ($ VSub_Name "$i") (","))}) (AndOr children: [ (SimpleCommand words: [ {(grep)} {(-q)} {(SQ <"Hello world!">)} {(build/logs/smoketest-) ($ VSub_Name "$i") (.txt)} ] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[94])] ) (AndOr children: [(C {(echo)} {(-n)} {(DQ ("PASS,"))}) (C {(echo)} {(-n)} {(DQ ("FAIL,"))})] op_id: Op_DPipe ) ] op_id: Op_DAmp ) (AndOr children: [ (C {(Lit_Other "[")} {(-e)} {(DQ (build/dropbearmulti-) ($ VSub_Name "$i"))} {(Lit_Other "]")} ) (AndOr children: [(C {(echo)} {(-n)} {(DQ ("PASS,"))}) (C {(echo)} {(-n)} {(DQ ("FAIL,"))})] op_id: Op_DPipe ) ] op_id: Op_DAmp ) (C {(echo)} { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(sed)} {(-n)} {(SQ <"s/^=== \\([^(]*\\)([^ ]* \\(.*\\))/\\2 \\1/p">)} {(build/logs/build-) ($ VSub_Name "$i") (.txt)} ) (C {(tail)} {(-n)} {(1)}) ] negated: False ) ] ) left_token: spids: [156 181] ) } ) ] spids: [49 183] ) spids: [34 -1] ) ] )