Skip to content

[5.7] Fix SwiftDocC integration test #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions test-swift-docc/DocCTest/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,9 @@ import PackageDescription
let package = Package(
name: "DocCTest",
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "DocCTest",
targets: ["DocCTest"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.library(name: "DocCTest", targets: ["DocCTest"]),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "DocCTest",
dependencies: []),
.testTarget(
name: "DocCTestTests",
dependencies: ["DocCTest"]),
.target(name: "DocCTest"),
]
)
11 changes: 0 additions & 11 deletions test-swift-docc/DocCTest/Tests/DocCTestTests/DocCTestTests.swift

This file was deleted.

21 changes: 17 additions & 4 deletions test-swift-docc/test-swift-docc.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
// Check Swift-DocC can compile and preview documentation.
// Check that Swift-DocC can compile documentation.
//
// RNU: rm -rf %S/Output
// RUN: %{docc} convert %S/DocCTest/Sources/DocCTest/DocCTest.docc --output-path %S/Output
// RUN: ls %S/Output
// Clear any existing state:
// RUN: rm -rf %t.dir
// RUN: mkdir -p %t.dir
//
// Build symbol graphs for the test package:
// RUN: mkdir %t.dir/symbol-graph-directory
// RUN: mkdir %t.dir/swiftpm-build-directory
// RUN: %{swift} build --target DocCTest --package-path %S/DocCTest --build-path %t.dir/swiftpm-build-directory -Xswiftc -emit-symbol-graph -Xswiftc -emit-symbol-graph-dir -Xswiftc %t.dir/symbol-graph-directory
//
// Convert the documentation
// RUN: %{docc} convert %S/DocCTest/Sources/DocCTest/DocCTest.docc --output-path %t.dir/DocCTest.doccarchive --additional-symbol-graph-dir %t.dir/symbol-graph-directory
//
// Assert that the produced documentation archive has a 'data' subdirectory as expected
// RUN: ls %t.dir/DocCTest.doccarchive/data
// RUN: ls %t.dir/DocCTest.doccarchive/data/documentation/docctest
// RUN: ls %t.dir/DocCTest.doccarchive/data/documentation/docctest/docctest/variable.json