         return pathComponent.lowercased() == "tests"
     }
 
-    /// Private function that creates and returns a list of non-test Modules defined by a package.
-    private func constructModules() throws -> [Target] {
+    /// Private function that creates and returns a list of targets defined by a package.
+    private func constructTargets() throws -> [Target] {
 
         // Check for a modulemap file, which indicates a system target.
         let moduleMapPath = packagePath.appending(component: "module.modulemap")

            }) ?? []

            // Create the target.
            let target = try createModule(
                potentialModule: potentialModule, moduleDependencies: deps, productDeps: productDeps)
            // Add the created target to the map or print no sources warning.
            if let createdModule = target {
                targets[createdModule.name] = createdModule
            } else {
                emptyModules.insert(potentialModule.name)
                diagnostics.emit(data: PackageBuilderDiagnostics.NoSources(package: manifest.name, target: potentialModule.name))

        }
    }

    /// Private function that constructs a single Target object for the potential target.
    private func createTarget(
        potentialModule: PotentialModule,
        moduleDependencies: [Target],
        productDeps: [(name: String, package: String?)]
