[runner][runtests][serial][tarutil][testrunner][testsharder] Add documentation.
Bug: IN-1553 #comment
Change-Id: I357f4dd5433230e490817ee27860b42e55daa52e
diff --git a/runner/subprocess_runner.go b/runner/subprocess_runner.go
index deedffb..ae7f398 100644
--- a/runner/subprocess_runner.go
+++ b/runner/subprocess_runner.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Package runner provides implementations for running commands in different environments.
package runner
import (
diff --git a/runtests/runtests.go b/runtests/runtests.go
index 00e82cc..bcb426e 100644
--- a/runtests/runtests.go
+++ b/runtests/runtests.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Package runtests contains specifics related to the runtests command.
package runtests
// TestResult is the exit result of a test.
diff --git a/serial/serial.go b/serial/serial.go
index 932e7c2..da33de2 100644
--- a/serial/serial.go
+++ b/serial/serial.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Package serial provides support for serial connections.
package serial
import (
diff --git a/tarutil/tar.go b/tarutil/tar.go
index 842f8bd..3abe83b 100644
--- a/tarutil/tar.go
+++ b/tarutil/tar.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Package tarutil provides methods for creating tar packages.
package tarutil
import (
diff --git a/testrunner/result.go b/testrunner/result.go
index efb1891..5cdc53e 100644
--- a/testrunner/result.go
+++ b/testrunner/result.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Package testrunner handles specifics related to the testrunner tool.
package testrunner
import (
diff --git a/testsharder/doc.go b/testsharder/doc.go
index 9b17df5..d9a8b45 100644
--- a/testsharder/doc.go
+++ b/testsharder/doc.go
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Package testsharder creates shards based on tests and specified environments.
+//
// Test authors in the Fuchsia source will specify `environments`in GN within
// the packages they define their tests. These specifications will be printed
// to disk in JSON-form during a build.
diff --git a/testsharder/environment.go b/testsharder/environment.go
index 6d3df53..bc87aa0 100644
--- a/testsharder/environment.go
+++ b/testsharder/environment.go
@@ -49,7 +49,7 @@
return strings.Join(tokens, "-")
}
-// DimensionSet encapsulate the Swarming dimensions a test wishes to target.
+// DimensionSet encapsulates the Swarming dimensions a test wishes to target.
type DimensionSet struct {
// DeviceType represents the class of device the test should run on.
// This is a required field.
@@ -68,7 +68,7 @@
Pool string `json:"pool,omitempty"`
}
-// ResolvesTo gives a partial ordering on DimensionSets in which one resolves to
+// resolvesTo gives a partial ordering on DimensionSets in which one resolves to
// another if the former's dimensions are given the latter.
func (dims DimensionSet) resolvesTo(other DimensionSet) bool {
if dims.DeviceType != "" && dims.DeviceType != other.DeviceType {
diff --git a/testsharder/shard.go b/testsharder/shard.go
index f5f5532..3fd6a50 100644
--- a/testsharder/shard.go
+++ b/testsharder/shard.go
@@ -15,7 +15,7 @@
// Name is the identifier for the shard.
Name string `json:"name"`
- // Tests is the set of test to be executed in this shard.
+ // Tests is the set of tests to be executed in this shard.
Tests []Test `json:"tests"`
// Env is a generalized notion of the execution environment for the shard.
diff --git a/testsharder/test_spec.go b/testsharder/test_spec.go
index af133b1..1848b0a 100644
--- a/testsharder/test_spec.go
+++ b/testsharder/test_spec.go
@@ -61,7 +61,7 @@
DepsFile string `json:"deps_file,omitempty"`
// Deps is the list of paths to the test's runtime dependencies within the build
- // directory. It is read out of DepFile.
+ // directory. It is read out of DepsFile.
Deps []string `json:"deps,omitempty"`
}