testing: implement -timeout flag
Note that this PR renames the existing -timeout flag to -vol-timeout.
Should reduce the multi-hour hangs on macOS builders (#4995) to ~10 minutes.
Note that this PR renames the existing
-timeoutflag to-vol-timeout.
Is that a problem for anyone?
Should reduce the multi-hour hangs on macOS builders (#4995) to ~10 minutes.
Yes please! :smile_cat:
Just wondering do we actually need to rename the flag? Do your other changes actually require that, @eliasnaur?
Just wondering do we actually need to rename the flag? Do your other changes actually require that, @eliasnaur?
I'm not sure I understand your question. Are you suggesting to keep -timeout for volume timeouts, or to overload its meaning to depend on whether you're running tinygo flash or tinygo test?
overload its meaning to depend on whether you're running
tinygo flashortinygo test
I think that is what I meant.
overload its meaning to depend on whether you're running
tinygo flashortinygo testI think that is what I meant.
It's possible, but I don't think it's worth the confusion. Besides, "timeout" is not a great name for something as specific as "the length of time to retry locating the MSD volume to be used for flashing".
Fair point. In that case, how about renaming it to flash-timeout?
Fair point. In that case, how about renaming it to
flash-timeout?
The timeout is for waiting for the flash volume, not flashing in itself. For example, if you're flashing through a debugger -flash-timeout would be ignored.
How about -volume-timeout?
Sounds good to me!
@eliasnaur can you please rebase this branch against the latest dev? Not sure why the CI is failing.
I already did, and I'm not sure either.
For some reason, my Linux VM fails to run make tinygo-test with the following error:
$ nix develop
$ go install
$ make tinygo-test
/home/e/go/bin/tinygo test -skip='TestExtraMethods|TestParseAndBytesRoundTrip/P256/Generic' cmp compress/lzw compress/zlib container/heap container/list container/ring crypto/ecdsa crypto/elliptic crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 database/sql/driver debug/macho embed/internal/embedtest encoding encoding/ascii85 encoding/asn1 encoding/base32 encoding/base64 encoding/csv encoding/hex go/ast go/format go/scanner go/version hash hash/adler32 hash/crc64 hash/fnv html internal/itoa internal/profile math math/cmplx net/http/internal/ascii net/mail os path reflect sync testing testing/iotest text/scanner unicode unicode/utf16 unicode/utf8 unique archive/zip compress/flate crypto/aes crypto/des crypto/hmac debug/dwarf debug/plan9obj image io/ioutil mime mime/multipart mime/quotedprintable net net/mail net/textproto os/user regexp/syntax strconv text/tabwriter text/template/parse compress/bzip2 crypto/dsa index/suffixarray
package net/http/internal/ascii is not in std (/home/e/.cache/tinygo/goroot-d6ba3aaea39ea12a38e3f8b292ba2e412e6bfc30c3b3b8a879b97c4a782dc8a2/src/net/http/internal/ascii)
../../.cache/tinygo/goroot-d6ba3aaea39ea12a38e3f8b292ba2e412e6bfc30c3b3b8a879b97c4a782dc8a2/src/net/mail/message.go:27:2: package net is not in std (/home/e/.cache/tinygo/goroot-d6ba3aaea39ea12a38e3f8b292ba2e412e6bfc30c3b3b8a879b97c4a782dc8a2/src/net)
cannot resolve packages: exit status 1
make: *** [GNUmakefile:491: tinygo-test] Error 1
@eliasnaur see #5080 for a different fix for the test race, although not for the root cause itself.