[tools] Reorganize tools before merging into fuchsia.git.

Bug: 10321
Change-Id: I319fecd4a8c37d574e82e3d370aa45f4bfad7a63
diff --git a/botanist/boot.go b/botanist/boot.go
index 8526cd5..22f01e4 100644
--- a/botanist/boot.go
+++ b/botanist/boot.go
@@ -17,10 +17,10 @@
 	"strings"
 	"time"
 
-	"go.fuchsia.dev/tools/build"
-	"go.fuchsia.dev/tools/netboot"
-	"go.fuchsia.dev/tools/retry"
-	"go.fuchsia.dev/tools/tftp"
+	"go.fuchsia.dev/tools/build/api"
+	"go.fuchsia.dev/tools/lib/retry"
+	"go.fuchsia.dev/tools/net/netboot"
+	"go.fuchsia.dev/tools/net/tftp"
 	"golang.org/x/crypto/ssh"
 )
 
diff --git a/botanist/cmd/main.go b/botanist/cmd/main.go
index c2fc2d5..e749d42 100644
--- a/botanist/cmd/main.go
+++ b/botanist/cmd/main.go
@@ -11,9 +11,9 @@
 
 	"github.com/google/subcommands"
 
-	"go.fuchsia.dev/tools/color"
-	"go.fuchsia.dev/tools/command"
-	"go.fuchsia.dev/tools/logger"
+	"go.fuchsia.dev/tools/lib/color"
+	"go.fuchsia.dev/tools/lib/command"
+	"go.fuchsia.dev/tools/lib/logger"
 )
 
 var (
diff --git a/botanist/cmd/qemu.go b/botanist/cmd/qemu.go
index 320fcdf..9ef6850 100644
--- a/botanist/cmd/qemu.go
+++ b/botanist/cmd/qemu.go
@@ -11,8 +11,8 @@
 
 	"github.com/google/subcommands"
 	"go.fuchsia.dev/tools/botanist/target"
-	"go.fuchsia.dev/tools/build"
-	"go.fuchsia.dev/tools/logger"
+	"go.fuchsia.dev/tools/build/api"
+	"go.fuchsia.dev/tools/lib/logger"
 )
 
 // QEMUBinPrefix is the prefix of the QEMU binary name, which is of the form
diff --git a/botanist/cmd/run.go b/botanist/cmd/run.go
index 3845982..7337f5b 100644
--- a/botanist/cmd/run.go
+++ b/botanist/cmd/run.go
@@ -18,11 +18,11 @@
 
 	"go.fuchsia.dev/tools/botanist"
 	"go.fuchsia.dev/tools/botanist/target"
-	"go.fuchsia.dev/tools/build"
-	"go.fuchsia.dev/tools/command"
-	"go.fuchsia.dev/tools/logger"
-	"go.fuchsia.dev/tools/runner"
-	"go.fuchsia.dev/tools/sshutil"
+	"go.fuchsia.dev/tools/build/api"
+	"go.fuchsia.dev/tools/lib/command"
+	"go.fuchsia.dev/tools/lib/logger"
+	"go.fuchsia.dev/tools/lib/runner"
+	"go.fuchsia.dev/tools/net/sshutil"
 
 	"github.com/google/subcommands"
 )
diff --git a/botanist/cmd/zedboot.go b/botanist/cmd/zedboot.go
index a8f6799..2a8bcee 100644
--- a/botanist/cmd/zedboot.go
+++ b/botanist/cmd/zedboot.go
@@ -13,11 +13,11 @@
 	"time"
 
 	"go.fuchsia.dev/tools/botanist/target"
-	"go.fuchsia.dev/tools/build"
-	"go.fuchsia.dev/tools/command"
-	"go.fuchsia.dev/tools/logger"
-	"go.fuchsia.dev/tools/netutil"
-	"go.fuchsia.dev/tools/runtests"
+	"go.fuchsia.dev/tools/build/api"
+	"go.fuchsia.dev/tools/lib/command"
+	"go.fuchsia.dev/tools/lib/logger"
+	"go.fuchsia.dev/tools/net/netutil"
+	"go.fuchsia.dev/tools/testing/runtests"
 
 	"github.com/google/subcommands"
 )
diff --git a/botanist/fileutil.go b/botanist/fileutil.go
index 77d9011..4950d4c 100644
--- a/botanist/fileutil.go
+++ b/botanist/fileutil.go
@@ -9,7 +9,7 @@
 	"fmt"
 	"net"
 
-	"go.fuchsia.dev/tools/tftp"
+	"go.fuchsia.dev/tools/net/tftp"
 )
 
 // FetchAndArchiveFile fetches a remote file via TFTP from a given node, and
diff --git a/botanist/ip.go b/botanist/ip.go
index 17aa44b..30fcd46 100644
--- a/botanist/ip.go
+++ b/botanist/ip.go
@@ -10,9 +10,9 @@
 	"net"
 	"time"
 
-	"go.fuchsia.dev/tools/logger"
-	"go.fuchsia.dev/tools/mdns"
-	"go.fuchsia.dev/tools/retry"
+	"go.fuchsia.dev/tools/lib/logger"
+	"go.fuchsia.dev/tools/lib/retry"
+	"go.fuchsia.dev/tools/net/mdns"
 )
 
 // Interval at which ResolveIP will wait for a response to a question packet.
diff --git a/botanist/power/amt/amt.go b/botanist/power/amt/amt.go
index 016fe2f..fb20b5e 100644
--- a/botanist/power/amt/amt.go
+++ b/botanist/power/amt/amt.go
@@ -12,7 +12,7 @@
 	"strings"
 
 	"github.com/google/uuid"
-	"go.fuchsia.dev/tools/digest"
+	"go.fuchsia.dev/tools/net/digest"
 )
 
 const (
diff --git a/botanist/power/power.go b/botanist/power/power.go
index 2f2fc89..a8aa3bc 100644
--- a/botanist/power/power.go
+++ b/botanist/power/power.go
@@ -10,8 +10,8 @@
 
 	"go.fuchsia.dev/tools/botanist/power/amt"
 	"go.fuchsia.dev/tools/botanist/power/wol"
-	"go.fuchsia.dev/tools/logger"
-	"go.fuchsia.dev/tools/sshutil"
+	"go.fuchsia.dev/tools/lib/logger"
+	"go.fuchsia.dev/tools/net/sshutil"
 
 	"golang.org/x/crypto/ssh"
 )
diff --git a/botanist/syslog.go b/botanist/syslog.go
index 482bc1d..35916fe 100644
--- a/botanist/syslog.go
+++ b/botanist/syslog.go
@@ -10,7 +10,7 @@
 
 	"golang.org/x/crypto/ssh"
 
-	"go.fuchsia.dev/tools/runner"
+	"go.fuchsia.dev/tools/lib/runner"
 )
 
 // The program on fuchsia used to stream system logs through a shell, not to be confused
diff --git a/botanist/target/device.go b/botanist/target/device.go
index 2246503..58a71d2 100644
--- a/botanist/target/device.go
+++ b/botanist/target/device.go
@@ -16,11 +16,11 @@
 
 	"go.fuchsia.dev/tools/botanist"
 	"go.fuchsia.dev/tools/botanist/power"
-	"go.fuchsia.dev/tools/build"
-	"go.fuchsia.dev/tools/logger"
-	"go.fuchsia.dev/tools/netboot"
-	"go.fuchsia.dev/tools/netutil"
-	"go.fuchsia.dev/tools/serial"
+	"go.fuchsia.dev/tools/build/api"
+	"go.fuchsia.dev/tools/lib/logger"
+	"go.fuchsia.dev/tools/net/netboot"
+	"go.fuchsia.dev/tools/net/netutil"
+	"go.fuchsia.dev/tools/net/serial"
 
 	"golang.org/x/crypto/ssh"
 )
diff --git a/botanist/target/qemu.go b/botanist/target/qemu.go
index f4ddaad..9a650df 100644
--- a/botanist/target/qemu.go
+++ b/botanist/target/qemu.go
@@ -15,7 +15,7 @@
 	"os/exec"
 	"path/filepath"
 
-	"go.fuchsia.dev/tools/build"
+	"go.fuchsia.dev/tools/build/api"
 	"go.fuchsia.dev/tools/qemu"
 )
 
diff --git a/build/build.go b/build/api/build.go
similarity index 100%
rename from build/build.go
rename to build/api/build.go
diff --git a/build/images.go b/build/api/images.go
similarity index 100%
rename from build/images.go
rename to build/api/images.go
diff --git a/gndoc/argmap.go b/build/gndoc/argmap.go
similarity index 100%
rename from gndoc/argmap.go
rename to build/gndoc/argmap.go
diff --git a/gndoc/argmap_test.go b/build/gndoc/argmap_test.go
similarity index 100%
rename from gndoc/argmap_test.go
rename to build/gndoc/argmap_test.go
diff --git a/gndoc/argparser.go b/build/gndoc/argparser.go
similarity index 100%
rename from gndoc/argparser.go
rename to build/gndoc/argparser.go
diff --git a/gndoc/cmd/main.go b/build/gndoc/cmd/main.go
similarity index 97%
rename from gndoc/cmd/main.go
rename to build/gndoc/cmd/main.go
index 37add2e..06aedc1 100644
--- a/gndoc/cmd/main.go
+++ b/build/gndoc/cmd/main.go
@@ -13,7 +13,7 @@
 	"path/filepath"
 	"strings"
 
-	"go.fuchsia.dev/tools/gndoc"
+	"go.fuchsia.dev/tools/build/gndoc"
 )
 
 type stringsFlag []string
diff --git a/gndoc/formatter.go b/build/gndoc/formatter.go
similarity index 100%
rename from gndoc/formatter.go
rename to build/gndoc/formatter.go
diff --git a/gndoc/formatter_test.go b/build/gndoc/formatter_test.go
similarity index 100%
rename from gndoc/formatter_test.go
rename to build/gndoc/formatter_test.go
diff --git a/gndoc/sourceparser.go b/build/gndoc/sourceparser.go
similarity index 100%
rename from gndoc/sourceparser.go
rename to build/gndoc/sourceparser.go
diff --git a/gndoc/sourceparser_test.go b/build/gndoc/sourceparser_test.go
similarity index 100%
rename from gndoc/sourceparser_test.go
rename to build/gndoc/sourceparser_test.go
diff --git a/godepfile/cmd/godepfile.go b/build/godepfile/cmd/godepfile.go
similarity index 100%
rename from godepfile/cmd/godepfile.go
rename to build/godepfile/cmd/godepfile.go
diff --git a/ninjalog/doc.go b/build/ninjalog/doc.go
similarity index 100%
rename from ninjalog/doc.go
rename to build/ninjalog/doc.go
diff --git a/ninjalog/ninjalog.go b/build/ninjalog/ninjalog.go
similarity index 100%
rename from ninjalog/ninjalog.go
rename to build/ninjalog/ninjalog.go
diff --git a/ninjalog/ninjalog_test.go b/build/ninjalog/ninjalog_test.go
similarity index 100%
rename from ninjalog/ninjalog_test.go
rename to build/ninjalog/ninjalog_test.go
diff --git a/ninjalog/testdata/ninja_log b/build/ninjalog/testdata/ninja_log
similarity index 100%
rename from ninjalog/testdata/ninja_log
rename to build/ninjalog/testdata/ninja_log
diff --git a/ninjalog/trace.go b/build/ninjalog/trace.go
similarity index 100%
rename from ninjalog/trace.go
rename to build/ninjalog/trace.go
diff --git a/ninjalog/trace_test.go b/build/ninjalog/trace_test.go
similarity index 100%
rename from ninjalog/trace_test.go
rename to build/ninjalog/trace_test.go
diff --git a/ninjatrace/cmd/ninjatrace.go b/build/ninjatrace/cmd/ninjatrace.go
similarity index 97%
rename from ninjatrace/cmd/ninjatrace.go
rename to build/ninjatrace/cmd/ninjatrace.go
index 54409c4..633d44a 100644
--- a/ninjatrace/cmd/ninjatrace.go
+++ b/build/ninjatrace/cmd/ninjatrace.go
@@ -20,7 +20,7 @@
 	"path/filepath"
 	"runtime/pprof"
 
-	"go.fuchsia.dev/tools/ninjalog"
+	"go.fuchsia.dev/tools/build/ninjalog"
 )
 
 var (
diff --git a/bloatalyzer/cmd/main.go b/debug/bloatalyzer/cmd/main.go
similarity index 96%
rename from bloatalyzer/cmd/main.go
rename to debug/bloatalyzer/cmd/main.go
index a573c25..fb161e8 100644
--- a/bloatalyzer/cmd/main.go
+++ b/debug/bloatalyzer/cmd/main.go
@@ -14,8 +14,8 @@
 	"runtime"
 	"strings"
 
-	"go.fuchsia.dev/tools/bloaty"
-	"go.fuchsia.dev/tools/logger"
+	"go.fuchsia.dev/tools/debug/bloaty"
+	"go.fuchsia.dev/tools/lib/logger"
 )
 
 type Format int
diff --git a/bloaty/bloaty.go b/debug/bloaty/bloaty.go
similarity index 100%
rename from bloaty/bloaty.go
rename to debug/bloaty/bloaty.go
diff --git a/bloaty/bloaty_test.go b/debug/bloaty/bloaty_test.go
similarity index 100%
rename from bloaty/bloaty_test.go
rename to debug/bloaty/bloaty_test.go
diff --git a/bloaty/chart.go b/debug/bloaty/chart.go
similarity index 100%
rename from bloaty/chart.go
rename to debug/bloaty/chart.go
diff --git a/bloaty/chart_test.go b/debug/bloaty/chart_test.go
similarity index 100%
rename from bloaty/chart_test.go
rename to debug/bloaty/chart_test.go
diff --git a/bloaty/symbols.go b/debug/bloaty/symbols.go
similarity index 100%
rename from bloaty/symbols.go
rename to debug/bloaty/symbols.go
diff --git a/bloaty/symbols_test.go b/debug/bloaty/symbols_test.go
similarity index 100%
rename from bloaty/symbols_test.go
rename to debug/bloaty/symbols_test.go
diff --git a/breakpad/generator/generator.go b/debug/breakpad/generator/generator.go
similarity index 98%
rename from breakpad/generator/generator.go
rename to debug/breakpad/generator/generator.go
index f3705d4..84f9b44 100644
--- a/breakpad/generator/generator.go
+++ b/debug/breakpad/generator/generator.go
@@ -14,8 +14,8 @@
 	"path/filepath"
 	"sync"
 
-	"go.fuchsia.dev/tools/breakpad"
-	"go.fuchsia.dev/tools/elflib"
+	"go.fuchsia.dev/tools/debug/breakpad"
+	"go.fuchsia.dev/tools/debug/elflib"
 )
 
 // The default module name for modules that don't have a soname, e.g., executables and
diff --git a/breakpad/symbol_file.go b/debug/breakpad/symbol_file.go
similarity index 100%
rename from breakpad/symbol_file.go
rename to debug/breakpad/symbol_file.go
diff --git a/breakpad/symbol_file_test.go b/debug/breakpad/symbol_file_test.go
similarity index 100%
rename from breakpad/symbol_file_test.go
rename to debug/breakpad/symbol_file_test.go
diff --git a/buildidtool/cmd/main.go b/debug/buildidtool/cmd/main.go
similarity index 97%
rename from buildidtool/cmd/main.go
rename to debug/buildidtool/cmd/main.go
index d3991d9..fbb5584 100644
--- a/buildidtool/cmd/main.go
+++ b/debug/buildidtool/cmd/main.go
@@ -14,9 +14,9 @@
 	"path/filepath"
 	"strings"
 
-	"go.fuchsia.dev/tools/color"
-	"go.fuchsia.dev/tools/elflib"
-	"go.fuchsia.dev/tools/logger"
+	"go.fuchsia.dev/tools/debug/elflib"
+	"go.fuchsia.dev/tools/lib/color"
+	"go.fuchsia.dev/tools/lib/logger"
 )
 
 type entry struct {
diff --git a/covargs/cmd/main.go b/debug/covargs/cmd/main.go
similarity index 97%
rename from covargs/cmd/main.go
rename to debug/covargs/cmd/main.go
index 8fd1a4d..d0ef2f2 100644
--- a/covargs/cmd/main.go
+++ b/debug/covargs/cmd/main.go
@@ -16,12 +16,12 @@
 	"os/exec"
 	"path/filepath"
 
-	"go.fuchsia.dev/tools/color"
-	"go.fuchsia.dev/tools/command"
-	"go.fuchsia.dev/tools/elflib"
-	"go.fuchsia.dev/tools/logger"
-	"go.fuchsia.dev/tools/runtests"
+	"go.fuchsia.dev/tools/debug/elflib"
+	"go.fuchsia.dev/tools/lib/color"
+	"go.fuchsia.dev/tools/lib/command"
+	"go.fuchsia.dev/tools/lib/logger"
 	"go.fuchsia.dev/tools/symbolize"
+	"go.fuchsia.dev/tools/testing/runtests"
 )
 
 var (
diff --git a/covargs/cmd/testdata/build/dl.c b/debug/covargs/cmd/testdata/build/dl.c
similarity index 100%
rename from covargs/cmd/testdata/build/dl.c
rename to debug/covargs/cmd/testdata/build/dl.c
diff --git a/covargs/cmd/testdata/build/dl.profraw b/debug/covargs/cmd/testdata/build/dl.profraw
similarity index 100%
rename from covargs/cmd/testdata/build/dl.profraw
rename to debug/covargs/cmd/testdata/build/dl.profraw
Binary files differ
diff --git a/covargs/cmd/testdata/build/fbl.c b/debug/covargs/cmd/testdata/build/fbl.c
similarity index 100%
rename from covargs/cmd/testdata/build/fbl.c
rename to debug/covargs/cmd/testdata/build/fbl.c
diff --git a/covargs/cmd/testdata/build/fbl.profraw b/debug/covargs/cmd/testdata/build/fbl.profraw
similarity index 100%
rename from covargs/cmd/testdata/build/fbl.profraw
rename to debug/covargs/cmd/testdata/build/fbl.profraw
Binary files differ
diff --git a/covargs/cmd/testdata/build/foo.c b/debug/covargs/cmd/testdata/build/foo.c
similarity index 100%
rename from covargs/cmd/testdata/build/foo.c
rename to debug/covargs/cmd/testdata/build/foo.c
diff --git a/covargs/cmd/testdata/build/foo.profraw b/debug/covargs/cmd/testdata/build/foo.profraw
similarity index 100%
rename from covargs/cmd/testdata/build/foo.profraw
rename to debug/covargs/cmd/testdata/build/foo.profraw
Binary files differ
diff --git a/covargs/cmd/testdata/build/libc.c b/debug/covargs/cmd/testdata/build/libc.c
similarity index 100%
rename from covargs/cmd/testdata/build/libc.c
rename to debug/covargs/cmd/testdata/build/libc.c
diff --git a/covargs/cmd/testdata/build/libc.profraw b/debug/covargs/cmd/testdata/build/libc.profraw
similarity index 100%
rename from covargs/cmd/testdata/build/libc.profraw
rename to debug/covargs/cmd/testdata/build/libc.profraw
Binary files differ
diff --git a/covargs/cmd/testdata/dump.json b/debug/covargs/cmd/testdata/dump.json
similarity index 100%
rename from covargs/cmd/testdata/dump.json
rename to debug/covargs/cmd/testdata/dump.json
diff --git a/covargs/cmd/testdata/ids.txt b/debug/covargs/cmd/testdata/ids.txt
similarity index 100%
rename from covargs/cmd/testdata/ids.txt
rename to debug/covargs/cmd/testdata/ids.txt
diff --git a/covargs/cmd/testdata/summary.json b/debug/covargs/cmd/testdata/summary.json
similarity index 100%
rename from covargs/cmd/testdata/summary.json
rename to debug/covargs/cmd/testdata/summary.json
diff --git a/dump_breakpad_symbols/cmd/depfile.go b/debug/dump_breakpad_symbols/cmd/depfile.go
similarity index 100%
rename from dump_breakpad_symbols/cmd/depfile.go
rename to debug/dump_breakpad_symbols/cmd/depfile.go
diff --git a/dump_breakpad_symbols/cmd/depfile_test.go b/debug/dump_breakpad_symbols/cmd/depfile_test.go
similarity index 100%
rename from dump_breakpad_symbols/cmd/depfile_test.go
rename to debug/dump_breakpad_symbols/cmd/depfile_test.go
diff --git a/dump_breakpad_symbols/cmd/main.go b/debug/dump_breakpad_symbols/cmd/main.go
similarity index 97%
rename from dump_breakpad_symbols/cmd/main.go
rename to debug/dump_breakpad_symbols/cmd/main.go
index 0c9716b..1ed0a42 100755
--- a/dump_breakpad_symbols/cmd/main.go
+++ b/debug/dump_breakpad_symbols/cmd/main.go
@@ -14,9 +14,9 @@
 	"log"
 	"os"
 
-	"go.fuchsia.dev/tools/breakpad/generator"
-	"go.fuchsia.dev/tools/elflib"
-	"go.fuchsia.dev/tools/tarutil"
+	"go.fuchsia.dev/tools/debug/breakpad/generator"
+	"go.fuchsia.dev/tools/debug/elflib"
+	"go.fuchsia.dev/tools/lib/tarutil"
 )
 
 const usage = `usage: dump_breakpad_symbols [options] paths...
diff --git a/elflib/elflib.go b/debug/elflib/elflib.go
similarity index 100%
rename from elflib/elflib.go
rename to debug/elflib/elflib.go
diff --git a/elflib/elflib_test.go b/debug/elflib/elflib_test.go
similarity index 100%
rename from elflib/elflib_test.go
rename to debug/elflib/elflib_test.go
diff --git a/elflib/testdata/libc.elf.section-only b/debug/elflib/testdata/libc.elf.section-only
similarity index 100%
rename from elflib/testdata/libc.elf.section-only
rename to debug/elflib/testdata/libc.elf.section-only
Binary files differ
diff --git a/elflib/testdata/libc.elf.stripped b/debug/elflib/testdata/libc.elf.stripped
similarity index 100%
rename from elflib/testdata/libc.elf.stripped
rename to debug/elflib/testdata/libc.elf.stripped
Binary files differ
diff --git a/elflib/testdata/libc.yaml b/debug/elflib/testdata/libc.yaml
similarity index 100%
rename from elflib/testdata/libc.yaml
rename to debug/elflib/testdata/libc.yaml
diff --git a/elflib/testdata/libc.yaml.section-only b/debug/elflib/testdata/libc.yaml.section-only
similarity index 100%
rename from elflib/testdata/libc.yaml.section-only
rename to debug/elflib/testdata/libc.yaml.section-only
diff --git a/upload_debug_symbols/cmd/gcs_bucket.go b/debug/upload_debug_symbols/cmd/gcs_bucket.go
similarity index 100%
rename from upload_debug_symbols/cmd/gcs_bucket.go
rename to debug/upload_debug_symbols/cmd/gcs_bucket.go
diff --git a/upload_debug_symbols/cmd/job.go b/debug/upload_debug_symbols/cmd/job.go
similarity index 97%
rename from upload_debug_symbols/cmd/job.go
rename to debug/upload_debug_symbols/cmd/job.go
index 4656d6d..7886c35 100644
--- a/upload_debug_symbols/cmd/job.go
+++ b/debug/upload_debug_symbols/cmd/job.go
@@ -9,7 +9,7 @@
 	"fmt"
 	"os"
 
-	"go.fuchsia.dev/tools/elflib"
+	"go.fuchsia.dev/tools/debug/elflib"
 )
 
 // job is a description of some BinaryFileRef to upload to GCS. The object's name in GCS
diff --git a/upload_debug_symbols/cmd/main.go b/debug/upload_debug_symbols/cmd/main.go
similarity index 99%
rename from upload_debug_symbols/cmd/main.go
rename to debug/upload_debug_symbols/cmd/main.go
index a3cc342..51cff0d 100644
--- a/upload_debug_symbols/cmd/main.go
+++ b/debug/upload_debug_symbols/cmd/main.go
@@ -21,7 +21,7 @@
 	"strings"
 	"sync"
 
-	"go.fuchsia.dev/tools/elflib"
+	"go.fuchsia.dev/tools/debug/elflib"
 )
 
 const (
diff --git a/go.mod b/go.mod
index 537d9af..d3ea3ed 100644
--- a/go.mod
+++ b/go.mod
@@ -10,3 +10,5 @@
 	golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
 	gopkg.in/yaml.v2 v2.2.2
 )
+
+go 1.13
diff --git a/testsharder/cmd/main.go b/integration/testsharder/cmd/main.go
similarity index 96%
rename from testsharder/cmd/main.go
rename to integration/testsharder/cmd/main.go
index 81a7cda..092718c 100644
--- a/testsharder/cmd/main.go
+++ b/integration/testsharder/cmd/main.go
@@ -10,8 +10,8 @@
 	"log"
 	"os"
 
-	"go.fuchsia.dev/tools/command"
-	"go.fuchsia.dev/tools/testsharder"
+	"go.fuchsia.dev/tools/integration/testsharder"
+	"go.fuchsia.dev/tools/lib/command"
 )
 
 var (
diff --git a/testsharder/doc.go b/integration/testsharder/doc.go
similarity index 100%
rename from testsharder/doc.go
rename to integration/testsharder/doc.go
diff --git a/testsharder/environment.go b/integration/testsharder/environment.go
similarity index 98%
rename from testsharder/environment.go
rename to integration/testsharder/environment.go
index bc87aa0..8b8b6b1 100644
--- a/testsharder/environment.go
+++ b/integration/testsharder/environment.go
@@ -10,7 +10,7 @@
 	"path/filepath"
 	"strings"
 
-	"go.fuchsia.dev/tools/build"
+	"go.fuchsia.dev/tools/build/api"
 )
 
 // Environment describes the full environment a test requires.
diff --git a/testsharder/mode.go b/integration/testsharder/mode.go
similarity index 100%
rename from testsharder/mode.go
rename to integration/testsharder/mode.go
diff --git a/testsharder/shard.go b/integration/testsharder/shard.go
similarity index 100%
rename from testsharder/shard.go
rename to integration/testsharder/shard.go
diff --git a/testsharder/shard_test.go b/integration/testsharder/shard_test.go
similarity index 100%
rename from testsharder/shard_test.go
rename to integration/testsharder/shard_test.go
diff --git a/testsharder/test_modifier.go b/integration/testsharder/test_modifier.go
similarity index 100%
rename from testsharder/test_modifier.go
rename to integration/testsharder/test_modifier.go
diff --git a/testsharder/test_modifier_test.go b/integration/testsharder/test_modifier_test.go
similarity index 100%
rename from testsharder/test_modifier_test.go
rename to integration/testsharder/test_modifier_test.go
diff --git a/testsharder/test_spec.go b/integration/testsharder/test_spec.go
similarity index 98%
rename from testsharder/test_spec.go
rename to integration/testsharder/test_spec.go
index 1848b0a..e05a35c 100644
--- a/testsharder/test_spec.go
+++ b/integration/testsharder/test_spec.go
@@ -11,7 +11,7 @@
 	"os"
 	"path/filepath"
 
-	"go.fuchsia.dev/tools/build"
+	"go.fuchsia.dev/tools/build/api"
 )
 
 // OS is an operating system that a test may run in.
diff --git a/testsharder/test_spec_test.go b/integration/testsharder/test_spec_test.go
similarity index 98%
rename from testsharder/test_spec_test.go
rename to integration/testsharder/test_spec_test.go
index 98b16c3..3d38a0b 100644
--- a/testsharder/test_spec_test.go
+++ b/integration/testsharder/test_spec_test.go
@@ -13,7 +13,7 @@
 	"sort"
 	"testing"
 
-	"go.fuchsia.dev/tools/build"
+	"go.fuchsia.dev/tools/build/api"
 )
 
 var qemuPlatform = DimensionSet{
diff --git a/cache/cache.go b/lib/cache/cache.go
similarity index 100%
rename from cache/cache.go
rename to lib/cache/cache.go
diff --git a/cache/cache_test.go b/lib/cache/cache_test.go
similarity index 100%
rename from cache/cache_test.go
rename to lib/cache/cache_test.go
diff --git a/color/color.go b/lib/color/color.go
similarity index 98%
rename from color/color.go
rename to lib/color/color.go
index 4726ea3..4a5558e 100644
--- a/color/color.go
+++ b/lib/color/color.go
@@ -9,7 +9,7 @@
 	"fmt"
 	"os"
 
-	"go.fuchsia.dev/tools/isatty"
+	"go.fuchsia.dev/tools/lib/isatty"
 )
 
 // Colorfn is a function type that takes a formatted string and returns it in a certain color.
diff --git a/color/color_test.go b/lib/color/color_test.go
similarity index 100%
rename from color/color_test.go
rename to lib/color/color_test.go
diff --git a/command/cancelable.go b/lib/command/cancelable.go
similarity index 100%
rename from command/cancelable.go
rename to lib/command/cancelable.go
diff --git a/command/cancelable_test.go b/lib/command/cancelable_test.go
similarity index 98%
rename from command/cancelable_test.go
rename to lib/command/cancelable_test.go
index 5a155c3..22b14c7 100644
--- a/command/cancelable_test.go
+++ b/lib/command/cancelable_test.go
@@ -11,7 +11,7 @@
 	"time"
 
 	"github.com/google/subcommands"
-	"go.fuchsia.dev/tools/command"
+	"go.fuchsia.dev/tools/lib/command"
 )
 
 func TestCancelableExecute(t *testing.T) {
diff --git a/command/doc.go b/lib/command/doc.go
similarity index 100%
rename from command/doc.go
rename to lib/command/doc.go
diff --git a/command/flags.go b/lib/command/flags.go
similarity index 100%
rename from command/flags.go
rename to lib/command/flags.go
diff --git a/command/signals.go b/lib/command/signals.go
similarity index 100%
rename from command/signals.go
rename to lib/command/signals.go
diff --git a/isatty/isatty.go b/lib/isatty/isatty.go
similarity index 100%
rename from isatty/isatty.go
rename to lib/isatty/isatty.go
diff --git a/isatty/isatty_darwin.go b/lib/isatty/isatty_darwin.go
similarity index 100%
rename from isatty/isatty_darwin.go
rename to lib/isatty/isatty_darwin.go
diff --git a/isatty/isatty_linux.go b/lib/isatty/isatty_linux.go
similarity index 100%
rename from isatty/isatty_linux.go
rename to lib/isatty/isatty_linux.go
diff --git a/logger/logger.go b/lib/logger/logger.go
similarity index 99%
rename from logger/logger.go
rename to lib/logger/logger.go
index b764df2..e7ada50 100644
--- a/logger/logger.go
+++ b/lib/logger/logger.go
@@ -12,7 +12,7 @@
 	goLog "log"
 	"os"
 
-	"go.fuchsia.dev/tools/color"
+	"go.fuchsia.dev/tools/lib/color"
 )
 
 type globalLoggerKeyType struct{}
diff --git a/logger/logger_test.go b/lib/logger/logger_test.go
similarity index 97%
rename from logger/logger_test.go
rename to lib/logger/logger_test.go
index e7d348b..60ac5a8 100644
--- a/logger/logger_test.go
+++ b/lib/logger/logger_test.go
@@ -10,7 +10,7 @@
 	"os"
 	"testing"
 
-	"go.fuchsia.dev/tools/color"
+	"go.fuchsia.dev/tools/lib/color"
 )
 
 func TestWithContext(t *testing.T) {
diff --git a/retry/backoff.go b/lib/retry/backoff.go
similarity index 100%
rename from retry/backoff.go
rename to lib/retry/backoff.go
diff --git a/retry/backoff_test.go b/lib/retry/backoff_test.go
similarity index 100%
rename from retry/backoff_test.go
rename to lib/retry/backoff_test.go
diff --git a/retry/clock.go b/lib/retry/clock.go
similarity index 100%
rename from retry/clock.go
rename to lib/retry/clock.go
diff --git a/retry/retry.go b/lib/retry/retry.go
similarity index 100%
rename from retry/retry.go
rename to lib/retry/retry.go
diff --git a/retry/retry_test.go b/lib/retry/retry_test.go
similarity index 100%
rename from retry/retry_test.go
rename to lib/retry/retry_test.go
diff --git a/runner/ssh_runner.go b/lib/runner/ssh_runner.go
similarity index 100%
rename from runner/ssh_runner.go
rename to lib/runner/ssh_runner.go
diff --git a/runner/subprocess_runner.go b/lib/runner/subprocess_runner.go
similarity index 97%
rename from runner/subprocess_runner.go
rename to lib/runner/subprocess_runner.go
index ae7f398..4bc991c 100644
--- a/runner/subprocess_runner.go
+++ b/lib/runner/subprocess_runner.go
@@ -11,7 +11,7 @@
 	"os/exec"
 	"syscall"
 
-	"go.fuchsia.dev/tools/logger"
+	"go.fuchsia.dev/tools/lib/logger"
 )
 
 // SubprocessRunner is a Runner that runs commands as local subprocesses.
diff --git a/runner/subprocess_runner_test.go b/lib/runner/subprocess_runner_test.go
similarity index 100%
rename from runner/subprocess_runner_test.go
rename to lib/runner/subprocess_runner_test.go
diff --git a/tarutil/tar.go b/lib/tarutil/tar.go
similarity index 100%
rename from tarutil/tar.go
rename to lib/tarutil/tar.go
diff --git a/tarutil/tar_test.go b/lib/tarutil/tar_test.go
similarity index 98%
rename from tarutil/tar_test.go
rename to lib/tarutil/tar_test.go
index 7c828f4..5e2b5d0 100644
--- a/tarutil/tar_test.go
+++ b/lib/tarutil/tar_test.go
@@ -12,7 +12,7 @@
 	"reflect"
 	"testing"
 
-	"go.fuchsia.dev/tools/tarutil"
+	"go.fuchsia.dev/tools/lib/tarutil"
 )
 
 func TestTarBuffer(t *testing.T) {
diff --git a/dev_finder/cmd/.gitignore b/net/dev_finder/cmd/.gitignore
similarity index 100%
rename from dev_finder/cmd/.gitignore
rename to net/dev_finder/cmd/.gitignore
diff --git a/dev_finder/cmd/common.go b/net/dev_finder/cmd/common.go
similarity index 99%
rename from dev_finder/cmd/common.go
rename to net/dev_finder/cmd/common.go
index abe36cb..29f66ec 100644
--- a/dev_finder/cmd/common.go
+++ b/net/dev_finder/cmd/common.go
@@ -18,7 +18,7 @@
 	"strings"
 	"time"
 
-	"go.fuchsia.dev/tools/mdns"
+	"go.fuchsia.dev/tools/net/mdns"
 )
 
 type mDNSResponse struct {
diff --git a/dev_finder/cmd/dev_finder_test.go b/net/dev_finder/cmd/dev_finder_test.go
similarity index 99%
rename from dev_finder/cmd/dev_finder_test.go
rename to net/dev_finder/cmd/dev_finder_test.go
index e1bf42c..944d6f9 100644
--- a/dev_finder/cmd/dev_finder_test.go
+++ b/net/dev_finder/cmd/dev_finder_test.go
@@ -14,7 +14,7 @@
 
 	"github.com/google/go-cmp/cmp"
 
-	"go.fuchsia.dev/tools/mdns"
+	"go.fuchsia.dev/tools/net/mdns"
 )
 
 // fakeMDNS is a fake implementation of MDNS for testing.
diff --git a/dev_finder/cmd/list.go b/net/dev_finder/cmd/list.go
similarity index 98%
rename from dev_finder/cmd/list.go
rename to net/dev_finder/cmd/list.go
index 3ce62f5..4a5e749 100644
--- a/dev_finder/cmd/list.go
+++ b/net/dev_finder/cmd/list.go
@@ -13,7 +13,7 @@
 
 	"github.com/google/subcommands"
 
-	"go.fuchsia.dev/tools/mdns"
+	"go.fuchsia.dev/tools/net/mdns"
 )
 
 const (
diff --git a/dev_finder/cmd/main.go b/net/dev_finder/cmd/main.go
similarity index 100%
rename from dev_finder/cmd/main.go
rename to net/dev_finder/cmd/main.go
diff --git a/dev_finder/cmd/resolve.go b/net/dev_finder/cmd/resolve.go
similarity index 98%
rename from dev_finder/cmd/resolve.go
rename to net/dev_finder/cmd/resolve.go
index d37470e..691c697 100644
--- a/dev_finder/cmd/resolve.go
+++ b/net/dev_finder/cmd/resolve.go
@@ -13,7 +13,7 @@
 
 	"github.com/google/subcommands"
 
-	"go.fuchsia.dev/tools/mdns"
+	"go.fuchsia.dev/tools/net/mdns"
 )
 
 const (
diff --git a/digest/digest.go b/net/digest/digest.go
similarity index 100%
rename from digest/digest.go
rename to net/digest/digest.go
diff --git a/digest/digest_test.go b/net/digest/digest_test.go
similarity index 100%
rename from digest/digest_test.go
rename to net/digest/digest_test.go
diff --git a/mdns/BUILD.gn b/net/mdns/BUILD.gn
similarity index 100%
rename from mdns/BUILD.gn
rename to net/mdns/BUILD.gn
diff --git a/mdns/mdns.go b/net/mdns/mdns.go
similarity index 100%
rename from mdns/mdns.go
rename to net/mdns/mdns.go
diff --git a/mdns/mdns_test.go b/net/mdns/mdns_test.go
similarity index 100%
rename from mdns/mdns_test.go
rename to net/mdns/mdns_test.go
diff --git a/mdnstool/cmd/main.go b/net/mdnstool/cmd/main.go
similarity index 99%
rename from mdnstool/cmd/main.go
rename to net/mdnstool/cmd/main.go
index 67048c1..12a35be 100644
--- a/mdnstool/cmd/main.go
+++ b/net/mdnstool/cmd/main.go
@@ -13,7 +13,7 @@
 	"os"
 	"time"
 
-	"go.fuchsia.dev/tools/mdns"
+	"go.fuchsia.dev/tools/net/mdns"
 )
 
 // TODO(jakehehrlich): This doesn't retry or anything, it just times out. It would
diff --git a/netboot/loglistener.go b/net/netboot/loglistener.go
similarity index 100%
rename from netboot/loglistener.go
rename to net/netboot/loglistener.go
diff --git a/netboot/netboot.go b/net/netboot/netboot.go
similarity index 100%
rename from netboot/netboot.go
rename to net/netboot/netboot.go
diff --git a/netutil/netutil.go b/net/netutil/netutil.go
similarity index 92%
rename from netutil/netutil.go
rename to net/netutil/netutil.go
index 2d60996..7d3c840 100644
--- a/netutil/netutil.go
+++ b/net/netutil/netutil.go
@@ -10,8 +10,8 @@
 	"net"
 	"time"
 
-	"go.fuchsia.dev/tools/netboot"
-	"go.fuchsia.dev/tools/retry"
+	"go.fuchsia.dev/tools/lib/retry"
+	"go.fuchsia.dev/tools/net/netboot"
 )
 
 // GetNodeAddress returns the UDP address corresponding to a given node, specifically
diff --git a/serial/serial.go b/net/serial/serial.go
similarity index 100%
rename from serial/serial.go
rename to net/serial/serial.go
diff --git a/serial/serial_darwin.go b/net/serial/serial_darwin.go
similarity index 100%
rename from serial/serial_darwin.go
rename to net/serial/serial_darwin.go
diff --git a/serial/serial_linux.go b/net/serial/serial_linux.go
similarity index 100%
rename from serial/serial_linux.go
rename to net/serial/serial_linux.go
diff --git a/sshutil/sshutil.go b/net/sshutil/sshutil.go
similarity index 98%
rename from sshutil/sshutil.go
rename to net/sshutil/sshutil.go
index bbbbc7f..49dbc50 100644
--- a/sshutil/sshutil.go
+++ b/net/sshutil/sshutil.go
@@ -14,8 +14,8 @@
 	"net"
 	"time"
 
-	"go.fuchsia.dev/tools/netutil"
-	"go.fuchsia.dev/tools/retry"
+	"go.fuchsia.dev/tools/lib/retry"
+	"go.fuchsia.dev/tools/net/netutil"
 
 	"golang.org/x/crypto/ssh"
 )
diff --git a/sshutil/sshutil_test.go b/net/sshutil/sshutil_test.go
similarity index 100%
rename from sshutil/sshutil_test.go
rename to net/sshutil/sshutil_test.go
diff --git a/tftp/tftp.go b/net/tftp/tftp.go
similarity index 100%
rename from tftp/tftp.go
rename to net/tftp/tftp.go
diff --git a/symbolize/cmd/main.go b/symbolize/cmd/main.go
index 8ae98a7..34bf3c8 100644
--- a/symbolize/cmd/main.go
+++ b/symbolize/cmd/main.go
@@ -12,8 +12,8 @@
 	"io"
 	"os"
 
-	"go.fuchsia.dev/tools/color"
-	"go.fuchsia.dev/tools/logger"
+	"go.fuchsia.dev/tools/lib/color"
+	"go.fuchsia.dev/tools/lib/logger"
 	"go.fuchsia.dev/tools/symbolize"
 )
 
diff --git a/symbolize/demuxer.go b/symbolize/demuxer.go
index 73625da..81c8c51 100644
--- a/symbolize/demuxer.go
+++ b/symbolize/demuxer.go
@@ -8,7 +8,7 @@
 	"context"
 	"fmt"
 
-	"go.fuchsia.dev/tools/logger"
+	"go.fuchsia.dev/tools/lib/logger"
 )
 
 // TODO (jakehehrlich): Make as much of this private as possible.
diff --git a/symbolize/filter.go b/symbolize/filter.go
index b1f1cf5..07918df 100644
--- a/symbolize/filter.go
+++ b/symbolize/filter.go
@@ -8,7 +8,7 @@
 	"context"
 	"fmt"
 
-	"go.fuchsia.dev/tools/logger"
+	"go.fuchsia.dev/tools/lib/logger"
 )
 
 // TODO (jakehehrlich): LineSource is now a part of the public interface. This is needed to
diff --git a/symbolize/mock_elf.go b/symbolize/mock_elf.go
index 9b8c9e2..0cb7975 100644
--- a/symbolize/mock_elf.go
+++ b/symbolize/mock_elf.go
@@ -7,7 +7,7 @@
 import (
 	"fmt"
 
-	"go.fuchsia.dev/tools/elflib"
+	"go.fuchsia.dev/tools/debug/elflib"
 )
 
 type mockSource []elflib.BinaryFileRef
diff --git a/symbolize/repo.go b/symbolize/repo.go
index 6a38b1c..1f5fcc4 100644
--- a/symbolize/repo.go
+++ b/symbolize/repo.go
@@ -10,7 +10,7 @@
 	"path/filepath"
 	"sync"
 
-	"go.fuchsia.dev/tools/elflib"
+	"go.fuchsia.dev/tools/debug/elflib"
 )
 
 // idsSource is a BinaryFileSource parsed from ids.txt
diff --git a/symbolize/repo_test.go b/symbolize/repo_test.go
index 8bf9a79..5a45f2a 100644
--- a/symbolize/repo_test.go
+++ b/symbolize/repo_test.go
@@ -10,7 +10,7 @@
 	"os"
 	"testing"
 
-	"go.fuchsia.dev/tools/elflib"
+	"go.fuchsia.dev/tools/debug/elflib"
 )
 
 func hexEqual(a []byte, b string) bool {
diff --git a/symbolize/symbolizer.go b/symbolize/symbolizer.go
index ab5e2d7..3bcff11 100644
--- a/symbolize/symbolizer.go
+++ b/symbolize/symbolizer.go
@@ -13,8 +13,8 @@
 	"strconv"
 	"strings"
 
-	"go.fuchsia.dev/tools/cache"
-	"go.fuchsia.dev/tools/elflib"
+	"go.fuchsia.dev/tools/debug/elflib"
+	"go.fuchsia.dev/tools/lib/cache"
 )
 
 // Symbolizer is an interface to an object that maps addresses in a bianry to source locations
diff --git a/runtests/poll.go b/testing/runtests/poll.go
similarity index 95%
rename from runtests/poll.go
rename to testing/runtests/poll.go
index af9e534..0fbb21b 100644
--- a/runtests/poll.go
+++ b/testing/runtests/poll.go
@@ -17,10 +17,10 @@
 	"time"
 
 	"go.fuchsia.dev/tools/botanist"
-	"go.fuchsia.dev/tools/logger"
-	"go.fuchsia.dev/tools/retry"
-	"go.fuchsia.dev/tools/tarutil"
-	"go.fuchsia.dev/tools/tftp"
+	"go.fuchsia.dev/tools/lib/logger"
+	"go.fuchsia.dev/tools/lib/retry"
+	"go.fuchsia.dev/tools/lib/tarutil"
+	"go.fuchsia.dev/tools/net/tftp"
 )
 
 // PollForSummary polls a node waiting for a summary.json to be written; this relies on
diff --git a/runtests/runtests.go b/testing/runtests/runtests.go
similarity index 100%
rename from runtests/runtests.go
rename to testing/runtests/runtests.go
diff --git a/seriallistener/cmd/main.go b/testing/seriallistener/cmd/main.go
similarity index 96%
rename from seriallistener/cmd/main.go
rename to testing/seriallistener/cmd/main.go
index 9f57056..d61ef89 100644
--- a/seriallistener/cmd/main.go
+++ b/testing/seriallistener/cmd/main.go
@@ -31,9 +31,9 @@
 	"strings"
 	"time"
 
-	"go.fuchsia.dev/tools/color"
-	"go.fuchsia.dev/tools/logger"
-	"go.fuchsia.dev/tools/retry"
+	"go.fuchsia.dev/tools/lib/color"
+	"go.fuchsia.dev/tools/lib/logger"
+	"go.fuchsia.dev/tools/lib/retry"
 )
 
 var (
diff --git a/tap/parser.go b/testing/tap/parser.go
similarity index 98%
rename from tap/parser.go
rename to testing/tap/parser.go
index 043de40..3bbdc01 100644
--- a/tap/parser.go
+++ b/testing/tap/parser.go
@@ -11,7 +11,7 @@
 	"strconv"
 	"strings"
 
-	"go.fuchsia.dev/tools/tap/tokenizer"
+	"go.fuchsia.dev/tools/testing/tap/tokenizer"
 )
 
 // Parse parses the given input string into a Document. The input is allowed to contain
diff --git a/tap/parser_test.go b/testing/tap/parser_test.go
similarity index 100%
rename from tap/parser_test.go
rename to testing/tap/parser_test.go
diff --git a/tap/producer.go b/testing/tap/producer.go
similarity index 100%
rename from tap/producer.go
rename to testing/tap/producer.go
diff --git a/tap/producer_test.go b/testing/tap/producer_test.go
similarity index 97%
rename from tap/producer_test.go
rename to testing/tap/producer_test.go
index 8ea3137..86819f3 100644
--- a/tap/producer_test.go
+++ b/testing/tap/producer_test.go
@@ -8,7 +8,7 @@
 	"os"
 	"time"
 
-	"go.fuchsia.dev/tools/tap"
+	"go.fuchsia.dev/tools/testing/tap"
 	"gopkg.in/yaml.v2"
 )
 
diff --git a/tap/tap.go b/testing/tap/tap.go
similarity index 100%
rename from tap/tap.go
rename to testing/tap/tap.go
diff --git a/tap/tokenizer/iterator.go b/testing/tap/tokenizer/iterator.go
similarity index 100%
rename from tap/tokenizer/iterator.go
rename to testing/tap/tokenizer/iterator.go
diff --git a/tap/tokenizer/lexer.go b/testing/tap/tokenizer/lexer.go
similarity index 100%
rename from tap/tokenizer/lexer.go
rename to testing/tap/tokenizer/lexer.go
diff --git a/tap/tokenizer/stream.go b/testing/tap/tokenizer/stream.go
similarity index 100%
rename from tap/tokenizer/stream.go
rename to testing/tap/tokenizer/stream.go
diff --git a/testrunner/cmd/main.go b/testing/testrunner/cmd/main.go
similarity index 97%
rename from testrunner/cmd/main.go
rename to testing/testrunner/cmd/main.go
index f700077..157fd1e 100644
--- a/testrunner/cmd/main.go
+++ b/testing/testrunner/cmd/main.go
@@ -15,9 +15,9 @@
 	"os"
 	"time"
 
-	"go.fuchsia.dev/tools/runtests"
-	"go.fuchsia.dev/tools/testrunner"
-	"go.fuchsia.dev/tools/testsharder"
+	"go.fuchsia.dev/tools/integration/testsharder"
+	"go.fuchsia.dev/tools/testing/runtests"
+	"go.fuchsia.dev/tools/testing/testrunner"
 )
 
 const (
diff --git a/testrunner/cmd/output.go b/testing/testrunner/cmd/output.go
similarity index 92%
rename from testrunner/cmd/output.go
rename to testing/testrunner/cmd/output.go
index 688e556..bad9f72 100644
--- a/testrunner/cmd/output.go
+++ b/testing/testrunner/cmd/output.go
@@ -10,9 +10,9 @@
 	"io"
 	"os"
 
-	"go.fuchsia.dev/tools/runtests"
-	"go.fuchsia.dev/tools/testrunner"
-	"go.fuchsia.dev/tools/testrunner/cmd/outputs"
+	"go.fuchsia.dev/tools/testing/runtests"
+	"go.fuchsia.dev/tools/testing/testrunner"
+	"go.fuchsia.dev/tools/testing/testrunner/cmd/outputs"
 )
 
 // Output manages the test runner's output drivers. Upon completion, if tar output is
diff --git a/testrunner/cmd/outputs/summary.go b/testing/testrunner/cmd/outputs/summary.go
similarity index 93%
rename from testrunner/cmd/outputs/summary.go
rename to testing/testrunner/cmd/outputs/summary.go
index 3b24c98..db60a4d 100644
--- a/testrunner/cmd/outputs/summary.go
+++ b/testing/testrunner/cmd/outputs/summary.go
@@ -8,8 +8,8 @@
 	"path"
 	"strings"
 
-	"go.fuchsia.dev/tools/runtests"
-	"go.fuchsia.dev/tools/testrunner"
+	"go.fuchsia.dev/tools/testing/runtests"
+	"go.fuchsia.dev/tools/testing/testrunner"
 )
 
 // SummaryOutput records test results in a TestSummary object.
diff --git a/testrunner/cmd/outputs/summary_test.go b/testing/testrunner/cmd/outputs/summary_test.go
similarity index 89%
rename from testrunner/cmd/outputs/summary_test.go
rename to testing/testrunner/cmd/outputs/summary_test.go
index 23e9938..2bb6327 100644
--- a/testrunner/cmd/outputs/summary_test.go
+++ b/testing/testrunner/cmd/outputs/summary_test.go
@@ -9,9 +9,9 @@
 	"testing"
 	"time"
 
-	"go.fuchsia.dev/tools/runtests"
-	"go.fuchsia.dev/tools/testrunner"
-	"go.fuchsia.dev/tools/testrunner/cmd/outputs"
+	"go.fuchsia.dev/tools/testing/runtests"
+	"go.fuchsia.dev/tools/testing/testrunner"
+	"go.fuchsia.dev/tools/testing/testrunner/cmd/outputs"
 )
 
 func TestSummaryOutput(t *testing.T) {
diff --git a/testrunner/cmd/outputs/tap.go b/testing/testrunner/cmd/outputs/tap.go
similarity index 87%
rename from testrunner/cmd/outputs/tap.go
rename to testing/testrunner/cmd/outputs/tap.go
index 08e3f4a..aad89ef 100644
--- a/testrunner/cmd/outputs/tap.go
+++ b/testing/testrunner/cmd/outputs/tap.go
@@ -8,9 +8,9 @@
 	"fmt"
 	"io"
 
-	"go.fuchsia.dev/tools/runtests"
-	"go.fuchsia.dev/tools/tap"
-	"go.fuchsia.dev/tools/testrunner"
+	"go.fuchsia.dev/tools/testing/runtests"
+	"go.fuchsia.dev/tools/testing/tap"
+	"go.fuchsia.dev/tools/testing/testrunner"
 )
 
 // TAPOutput records test results as a TAP output stream.
diff --git a/testrunner/cmd/outputs/tap_test.go b/testing/testrunner/cmd/outputs/tap_test.go
similarity index 87%
rename from testrunner/cmd/outputs/tap_test.go
rename to testing/testrunner/cmd/outputs/tap_test.go
index bf2e03f..620994e 100644
--- a/testrunner/cmd/outputs/tap_test.go
+++ b/testing/testrunner/cmd/outputs/tap_test.go
@@ -10,9 +10,9 @@
 	"testing"
 	"time"
 
-	"go.fuchsia.dev/tools/runtests"
-	"go.fuchsia.dev/tools/testrunner"
-	"go.fuchsia.dev/tools/testrunner/cmd/outputs"
+	"go.fuchsia.dev/tools/testing/runtests"
+	"go.fuchsia.dev/tools/testing/testrunner"
+	"go.fuchsia.dev/tools/testing/testrunner/cmd/outputs"
 )
 
 func TestTapOutput(t *testing.T) {
diff --git a/testrunner/cmd/outputs/tar.go b/testing/testrunner/cmd/outputs/tar.go
similarity index 90%
rename from testrunner/cmd/outputs/tar.go
rename to testing/testrunner/cmd/outputs/tar.go
index 4535ae4..fe9ce2c 100644
--- a/testrunner/cmd/outputs/tar.go
+++ b/testing/testrunner/cmd/outputs/tar.go
@@ -10,9 +10,9 @@
 	"io"
 	"path"
 
-	"go.fuchsia.dev/tools/runtests"
-	"go.fuchsia.dev/tools/tarutil"
-	"go.fuchsia.dev/tools/testrunner"
+	"go.fuchsia.dev/tools/lib/tarutil"
+	"go.fuchsia.dev/tools/testing/runtests"
+	"go.fuchsia.dev/tools/testing/testrunner"
 )
 
 // TarOutput records test stdout and stderr streams in a TAR archive.
diff --git a/testrunner/cmd/outputs/tar_test.go b/testing/testrunner/cmd/outputs/tar_test.go
similarity index 94%
rename from testrunner/cmd/outputs/tar_test.go
rename to testing/testrunner/cmd/outputs/tar_test.go
index e6d6c6f..7f7bd04 100644
--- a/testrunner/cmd/outputs/tar_test.go
+++ b/testing/testrunner/cmd/outputs/tar_test.go
@@ -10,9 +10,9 @@
 	"io"
 	"testing"
 
-	"go.fuchsia.dev/tools/runtests"
-	"go.fuchsia.dev/tools/testrunner"
-	"go.fuchsia.dev/tools/testrunner/cmd/outputs"
+	"go.fuchsia.dev/tools/testing/runtests"
+	"go.fuchsia.dev/tools/testing/testrunner"
+	"go.fuchsia.dev/tools/testing/testrunner/cmd/outputs"
 )
 
 func TestTarOutput(t *testing.T) {
diff --git a/testrunner/cmd/tester.go b/testing/testrunner/cmd/tester.go
similarity index 96%
rename from testrunner/cmd/tester.go
rename to testing/testrunner/cmd/tester.go
index 95024ca..f79c1f3 100644
--- a/testrunner/cmd/tester.go
+++ b/testing/testrunner/cmd/tester.go
@@ -10,10 +10,10 @@
 	"io"
 	"path"
 
-	"go.fuchsia.dev/tools/logger"
-	"go.fuchsia.dev/tools/runner"
-	"go.fuchsia.dev/tools/sshutil"
-	"go.fuchsia.dev/tools/testsharder"
+	"go.fuchsia.dev/tools/integration/testsharder"
+	"go.fuchsia.dev/tools/lib/logger"
+	"go.fuchsia.dev/tools/lib/runner"
+	"go.fuchsia.dev/tools/net/sshutil"
 	"golang.org/x/crypto/ssh"
 )
 
diff --git a/testrunner/cmd/tester_test.go b/testing/testrunner/cmd/tester_test.go
similarity index 97%
rename from testrunner/cmd/tester_test.go
rename to testing/testrunner/cmd/tester_test.go
index 19cdb27..b6d49b1 100644
--- a/testrunner/cmd/tester_test.go
+++ b/testing/testrunner/cmd/tester_test.go
@@ -13,8 +13,8 @@
 	"strings"
 	"testing"
 
-	"go.fuchsia.dev/tools/sshutil"
-	"go.fuchsia.dev/tools/testsharder"
+	"go.fuchsia.dev/tools/integration/testsharder"
+	"go.fuchsia.dev/tools/net/sshutil"
 
 	"golang.org/x/crypto/ssh"
 )
diff --git a/testrunner/result.go b/testing/testrunner/result.go
similarity index 93%
rename from testrunner/result.go
rename to testing/testrunner/result.go
index 5cdc53e..e252c2c 100644
--- a/testrunner/result.go
+++ b/testing/testrunner/result.go
@@ -8,7 +8,7 @@
 import (
 	"time"
 
-	"go.fuchsia.dev/tools/runtests"
+	"go.fuchsia.dev/tools/testing/runtests"
 )
 
 // TestResult is the result of executing a test.