go/src/cmd/compile/internal/gc
Kirill Smelkov e2948f7efe cmd/compile: Show arch/os when something in TestAssembly fails
It is not always obvious from the first glance when looking at
TestAssembly failure in which context the code was generated. For
example x86 and x86-64 are similar, and those of us who do not work with
assembly every day can even take s390x version as something similar to x86.

So when something fails lets print the whole test context - this
includes os and arch which were previously missing. An example failure:

before:

--- FAIL: TestAssembly (40.48s)
        asm_test.go:46: expected:       MOVWZ   \(.*\),
                go:
                import "encoding/binary"
                func f(b []byte) uint32 {
                        return binary.LittleEndian.Uint32(b)
                }

                asm:"".f t=1 size=160 args=0x20 locals=0x0
		...

after:

--- FAIL: TestAssembly (40.43s)
        asm_test.go:46: linux/s390x: expected:  MOVWZ   \(.*\),
                go:
                import "encoding/binary"
                func f(b []byte) uint32 {
                        return binary.LittleEndian.Uint32(b)
                }

                asm:"".f t=1 size=160 args=0x20 locals=0x0

Motivated-by: #18946#issuecomment-279491071

Change-Id: I61089ceec05da7a165718a7d69dec4227dd0e993
Reviewed-on: https://go-review.googlesource.com/36881
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-02-13 20:30:31 +00:00
..
builtin cmd/compile: optimize non-empty-interface type conversions 2017-02-13 18:16:31 +00:00
testdata all: make spelling consistent 2016-12-08 23:22:37 +00:00
alg.go cmd/compile/internal/gc: unexport or remove global functions 2017-02-10 17:57:38 +00:00
align.go all: merge dev.inline into master 2017-02-01 09:47:23 -05:00
asm_test.go cmd/compile: Show arch/os when something in TestAssembly fails 2017-02-13 20:30:31 +00:00
bexport.go cmd/compile: eliminate OASWB 2017-02-10 22:31:58 +00:00
bimport.go cmd/compile: include linknames in export data 2017-02-08 20:59:45 +00:00
builtin.go cmd/compile: optimize non-empty-interface type conversions 2017-02-13 18:16:31 +00:00
builtin_test.go all: use testing.GoToolPath instead of "go" 2016-08-30 22:49:11 +00:00
bv.go cmd/compile: make liveness more efficient 2017-02-03 19:41:44 +00:00
closure.go cmd/compile: move Heapaddr field from Name to Param 2017-02-04 01:20:18 +00:00
const.go cmd/compile: never report "truncated to real" for toint calls 2017-02-01 21:22:50 +00:00
constFold_test.go cmd/compile: fix bad generated format strings in test 2016-08-16 14:14:51 +00:00
dcl.go cmd/compile/internal/gc: inline typedcl0 and typedcl1 2017-02-01 22:52:32 +00:00
esc.go cmd/compile: eliminate OASWB 2017-02-10 22:31:58 +00:00
export.go cmd/compile: skip reexporting types in reexportdep 2017-02-02 04:25:40 +00:00
fixedbugs_test.go cmd/compile: inline convT2{I,E} when result doesn't escape 2016-09-19 02:37:08 +00:00
float_test.go cmd/compile: fix uint<->float conversion on 386 2016-08-16 17:20:11 +00:00
fmt.go cmd/compile: cull some dead arch-specific Ops 2017-02-13 18:19:24 +00:00
gen.go cmd/compile/internal/gc: remove more backend Sym uses 2017-02-06 23:25:44 +00:00
global_test.go all: use testing.GoToolPath instead of "go" 2016-08-30 22:49:11 +00:00
go.go cmd/compile: optimize non-empty-interface type conversions 2017-02-13 18:16:31 +00:00
gsubr.go cmd/internal/obj: remove ATYPE 2017-02-07 22:38:18 +00:00
iface_test.go cmd/compile: inline convT2{I,E} when result doesn't escape 2016-09-19 02:37:08 +00:00
init.go cmd/compile: eliminate OASWB 2017-02-10 22:31:58 +00:00
inl.go cmd/compile: allow inlining of functions with intrinsics in them 2017-02-02 17:46:09 +00:00
lex.go cmd/compile/internal/gc: unexport or remove global functions 2017-02-10 17:57:38 +00:00
lex_test.go cmd/compile: provide line number for cgo directive error (fix a TODO) 2017-02-02 21:24:50 +00:00
logic_test.go cmd/compile: add tests for logical simplification rewrite rules 2016-05-26 22:16:52 +00:00
magic.go cmd/compile/internal/gc: unexport helper functions 2016-09-15 05:43:41 +00:00
main.go cmd/compile: eliminate iota_ 2017-02-01 20:19:06 +00:00
mkbuiltin.go cmd/compile: rework mkbuiltin.go to generate code 2016-10-19 19:58:00 +00:00
mpfloat.go cmd/dist: copy needed packages from standard library during bootstrap 2016-10-17 15:22:11 +00:00
mpint.go cmd/dist: copy needed packages from standard library during bootstrap 2016-10-17 15:22:11 +00:00
noder.go cmd/compile/internal/gc: unexport or remove global functions 2017-02-10 17:57:38 +00:00
obj.go [dev.typealias] cmd/compile: change Func.Shortname to *Sym 2017-01-24 01:34:14 +00:00
opnames.go cmd/compile: cull some dead arch-specific Ops 2017-02-13 18:19:24 +00:00
order.go cmd/compile: Ensure left-to-right assignment 2017-02-11 21:46:21 +00:00
pgen.go cmd/compile: optimize non-empty-interface type conversions 2017-02-13 18:16:31 +00:00
pgen_test.go cmd/compile: shrink gc.Type in half 2016-04-06 19:10:10 +00:00
phi.go cmd/compile: speed up hot phi insertion code 2017-02-03 05:36:22 +00:00
plive.go cmd/internal/obj: remove ATYPE 2017-02-07 22:38:18 +00:00
racewalk.go cmd/compile: cull some dead arch-specific Ops 2017-02-13 18:19:24 +00:00
range.go cmd/compile: lower slice clears to memclrHasPointers 2016-10-28 19:13:13 +00:00
reflect.go cmd/compile: optimize non-empty-interface type conversions 2017-02-13 18:16:31 +00:00
reflect_test.go cmd/compile/internal/gc: use sort.Interface for reflect methods 2015-09-21 22:27:53 +00:00
select.go cmd/compile: fix misaligned comments 2016-09-27 14:00:39 +00:00
shift_test.go cmd/compile: test non-constant shifts 2016-06-01 00:06:00 +00:00
sinit.go cmd/compile: eliminate OASWB 2017-02-10 22:31:58 +00:00
sizeof_test.go cmd/compile: move Heapaddr field from Name to Param 2017-02-04 01:20:18 +00:00
ssa.go cmd/compile: optimize non-empty-interface type conversions 2017-02-13 18:16:31 +00:00
ssa_test.go cmd/compile/internal/gc: make tests run faster 2016-11-03 01:07:08 +00:00
subr.go cmd/compile: make panicwrap argument-free 2017-02-11 23:27:35 +00:00
swt.go cmd/compile: optimize non-empty-interface type conversions 2017-02-13 18:16:31 +00:00
swt_test.go cmd/dist: copy needed packages from standard library during bootstrap 2016-10-17 15:22:11 +00:00
syntax.go cmd/compile: cull some dead arch-specific Ops 2017-02-13 18:19:24 +00:00
timings.go cmd/compile: add compiler phase timing 2016-08-17 17:27:04 +00:00
trace.go cmd/compile/internal/gc: add runtime/trace support 2016-10-12 13:57:26 +00:00
type.go all: merge dev.inline into master 2017-02-01 09:47:23 -05:00
typecheck.go cmd/compile/internal/gc: unexport or remove global functions 2017-02-10 17:57:38 +00:00
universe.go [dev.typealias] cmd/compile: a few better comments related to alias types 2017-01-12 23:25:54 +00:00
unsafe.go cmd/compile: handle unsafe builtins like universal builtins 2016-10-18 22:34:44 +00:00
util.go cmd/compile: disable memory profiling when not in use 2017-02-01 20:20:16 +00:00
walk.go cmd/compile: eliminate OASWB 2017-02-10 22:31:58 +00:00