Skip to content

Commit

Permalink
Start work on next-generation test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
meatball133 committed Dec 14, 2024
1 parent 50bc68d commit d2b1e6e
Show file tree
Hide file tree
Showing 23 changed files with 224 additions and 381 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM swift:5.8-bionic AS builder
FROM swift:6.0.2 AS builder
# WORKDIR /opt/testrunner
COPY src/testrunner ./

Expand All @@ -7,7 +7,7 @@ RUN swift --version
#RUN swift package clean
RUN swift build --configuration release

FROM swift:5.8-bionic
FROM swift:6.0.2
RUN apt-get update && apt-get install -y jq
WORKDIR /opt/test-runner/
COPY bin/ bin/
Expand Down
5 changes: 2 additions & 3 deletions bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,15 @@ fi
SLUG="$1"
INPUT_DIR="${2%/}"
OUTPUT_DIR="${3%/}"
junit_file="${INPUT_DIR}/results.xml"
junit_file="${INPUT_DIR}/results-swift-testing.xml"
capture_file="${OUTPUT_DIR}/capture"
spec_file="${INPUT_DIR}/$(jq -r '.files.test[0]' ${INPUT_DIR}/.meta/config.json)"
results_file="${OUTPUT_DIR}/results.json"
BASEDIR=$(dirname "$0")

touch "${results_file}"

export RUNALL=true
swift test --package-path "${INPUT_DIR}" -v --parallel --num-workers 1 --xunit-output "${junit_file}" &> "${capture_file}"
swift test --package-path "${INPUT_DIR}" --xunit-output "${INPUT_DIR}/results.xml" &> "${capture_file}"


./bin/TestRunner "${spec_file}" "${junit_file}" "${capture_file}" "${results_file}" "${SLUG}"
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 2.0.0

- Updated to Swift 6.1
- Update swift-syntax to 600.0.0
- Use swift-testing instead of XCTest
- Brand new way of handling gathering test results, which is more robust and easier to maintain
- Depricated task_id, user output
- Uses version 2 instead of 3

# 1.1.3

- Fixed an issue making so outputs on multiple lines missed the last line
Expand Down
2 changes: 1 addition & 1 deletion src/testrunner/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/apple/swift-syntax.git", exact: "508.0.1")
.package(url: "https://github.com/apple/swift-syntax.git", exact: "600.0.1")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
Loading

0 comments on commit d2b1e6e

Please sign in to comment.