Add debug prints

This commit is contained in:
David Dworken 2024-02-10 22:30:50 -08:00
parent f2c3aebe3a
commit c7d5ab0a43
No known key found for this signature in database
2 changed files with 5 additions and 4 deletions

View File

@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Linux Setup
@ -112,7 +112,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Download artifact

View File

@ -58,8 +58,6 @@ func TestMain(m *testing.M) {
var shellTesters []shellTester = []shellTester{bashTester{}, zshTester{}}
var shardNumberAllocator int = 0
func numTestShards() int {
numTestShardsStr := os.Getenv("NUM_TEST_SHARDS")
if numTestShardsStr == "" {
@ -89,6 +87,7 @@ func isShardedTestRun() bool {
}
func markTestForSharding(t *testing.T, testShardNumber int) {
fmt.Printf("DDWORKENDEBUG: markTestForSharding: isShardedTestRun()=%#v testShardNumber=%#v numTestShards()=%#v currentShardNumber()=%#v", isShardedTestRun(), testShardNumber, numTestShards(), currentShardNumber())
if isShardedTestRun() {
if testShardNumber%numTestShards() == currentShardNumber() {
t.Skip("Skipping sharded test")
@ -96,6 +95,8 @@ func markTestForSharding(t *testing.T, testShardNumber int) {
}
}
var shardNumberAllocator int = 0
func wrapTestForSharding(test func(t *testing.T)) func(t *testing.T) {
shardNumberAllocator += 1
return func(t *testing.T) {