#!/usr/bin/env bash set -e echo "" > coverage.txt for d in [$[go list ./... | grep -v vendor]] { echo -e "TESTS FOR: for \033[0;35m$(d)\033[0m" go test -race -v -coverprofile=profile.coverage.out -covermode=atomic $d if test -f profile.coverage.out { cat profile.coverage.out >> coverage.txt rm profile.coverage.out } echo "" } (CommandList children: [ (C {(set)} {(-e)}) (SimpleCommand words: [{(echo)} {(DQ )}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(coverage.txt)} spids:[13])] ) (ForEach iter_name: d iter_words: [ { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [(C {(go)} {(list)} {(./...)}) (C {(grep)} {(-v)} {(vendor)})] negated: False ) ] ) left_token: spids: [24 38] ) } ] do_arg_iter: False body: (DoGroup children: [ (C {(echo)} {(-e)} { (DQ ("TESTS FOR: for ") (EscapedLiteralPart token:) ("33[0;35m") (${ VSub_Name d) (EscapedLiteralPart token:) ("33[0m") ) } ) (C {(go)} {(test)} {(-race)} {(-v)} {(-coverprofile) (Lit_Other "=") (profile.coverage.out)} {(-covermode) (Lit_Other "=") (atomic)} {($ VSub_Name "$d")} ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-f)} {(profile.coverage.out)} {(Lit_Other "]")}) terminator: ) ] action: [ (SimpleCommand words: [{(cat)} {(profile.coverage.out)}] redirects: [ (Redir op_id: Redir_DGreat fd: -1 arg_word: {(coverage.txt)} spids: [97] ) ] ) (C {(rm)} {(profile.coverage.out)}) ] spids: [-1 90] ) ] spids: [-1 107] ) (C {(echo)} {(DQ )}) ] spids: [41 115] ) spids: [23 39] ) ] )