{"id":13995502,"url":"https://github.com/swiftlang/swift-stress-tester","last_synced_at":"2025-05-16T19:00:31.490Z","repository":{"id":38551355,"uuid":"124606805","full_name":"swiftlang/swift-stress-tester","owner":"swiftlang","description":"Stress testing utilities for Swift's tooling","archived":false,"fork":false,"pushed_at":"2025-04-22T09:37:14.000Z","size":895,"stargazers_count":214,"open_issues_count":1,"forks_count":40,"subscribers_count":108,"default_branch":"main","last_synced_at":"2025-04-22T10:58:25.310Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://swift.org","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swiftlang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-03-10T00:15:38.000Z","updated_at":"2025-04-22T09:37:07.000Z","dependencies_parsed_at":"2022-07-14T22:30:42.123Z","dependency_job_id":"2f8610b3-8ad4-4fd6-85fa-e7731d25832b","html_url":"https://github.com/swiftlang/swift-stress-tester","commit_stats":null,"previous_names":["swiftlang/swift-stress-tester","apple/swift-stress-tester"],"tags_count":1719,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fswift-stress-tester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fswift-stress-tester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fswift-stress-tester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiftlang%2Fswift-stress-tester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swiftlang","download_url":"https://codeload.github.com/swiftlang/swift-stress-tester/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254592367,"owners_count":22097010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-09T14:03:26.957Z","updated_at":"2025-05-16T19:00:31.429Z","avatar_url":"https://github.com/swiftlang.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"\u003cimg src=\"https://swift.org/assets/images/swift.svg\" alt=\"Swift logo\" height=\"70\" \u003e\n\n# Swift Stress Tester\n\nThis project aims to provide stress testing utilities to help find reproducible crashes and other failures in tools that process Swift source code, such as the Swift compiler and SourceKit. These utilities will ideally be written in Swift and make use the SwiftSyntax and/or SwiftLang libraries to parse, generate and modify Swift source inputs.\n\n## Current tools\n\n| Tool      | Description | build-script Flag | Package Name |\n| --------- | ----------- | ----------------- | ----------------- |\n[sk\u0026#8209;stress\u0026#8209;test](SourceKitStressTester/README.md) | a utility for exercising a range of SourceKit functionality, such as code completion and local refactorings, at all applicable locations in a set of Swift source files. | `--skstresstester` | SourceKitStressTester |\n[swift\u0026#8209;evolve](SwiftEvolve/README.md) | a utility to randomly modify Swift source files in ways libraries are permitted to evolve without breaking ABI compatibility. | `--swiftevolve` | SwiftEvolve |\n\n## Building\n\nThe tools in this repository can be built in several different ways:\n\n### Using Swift's build-script\n\nIf you want to build the tools to use a locally built sourcekitd and SwiftLang, use the Swift repository's build-script to build and test the stress tester by passing `--skstresstester`, its dependencies and the desired tools' flags as extra options. To build and run tests, for example, you would run:\n\n```\n$ ./swift/utils/build-script --test --skip-build-benchmark --skip-test-cmark --skip-test-swift --install-swift --llbuild --install-llbuild --skip-test-llbuild --swiftpm --install-swiftpm --skip-test-swiftpm --skstresstester --swiftevolve --release\n```\n\n### For local development\n\nFor local development, you'll first need to download and install a recent [swift.org development snapshot](https://swift.org/download/#snapshots) toolchain that matches the latest commit on main in the [SwiftSyntax](https://github.com/swiftlang/swift-syntax). This is because the Stress Tester depends on the latest version of SwiftSyntax and SwiftSyntax integrates into the latest version of the compiler.\n\nThe toolchain is installed into `/Library/Developer/Toolchains/` if installed for all users. Note that the `$TOOLCHAIN_DIR` variables below should include `/usr` at the end of their path, eg. `TOOLCHAIN_DIR=/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-\u003c...\u003e.xctoolchain/usr`.\n\n#### Via Xcode\n\nTo generate an Xcode project that's set up correctly, run `build-script-helper.py`, passing the path to the downloaded toolchain via the `--toolchain` option, the tool's package name in the `--package-dir` option, and the `generate-xcodeproj` action:\n```\n$ ./build-script-helper.py --package-dir SourceKitStressTester --toolchain $TOOLCHAIN_DIR generate-xcodeproj --no-local-deps\n```\nIf you have the [SwiftSyntax](https://github.com/swiftlang/swift-syntax) and [SwiftPM](https://github.com/swiftlang/swift-package-manager) repositories already checked out next to the stress tester's repository, you can omit the `--no-local-deps` option to use the existing checkouts instead of fetching the dependencies using SwiftPM.\n\nThis will generate `SourceKitStressTester/SourceKitStressTester.xcodeproj`. Open it and select the toolchain you installed from the Xcode \u003e Toolchains menu, before building the `SourceKitStressTester-Package` scheme.\n\n#### Via command line\n\nTo build, run `build-script-helper.py`, passing the path to the downloaded toolchain via the `--toolchain` option and the tool's package name in the `--package-dir` option.\n```\n$ ./build-script-helper.py --package-dir SourceKitStressTester --toolchain $TOOLCHAIN_DIR\n```\nIf you have the [SwiftSyntax](https://github.com/swiftlang/swift-syntax) and [SwiftPM](https://github.com/swiftlang/swift-package-manager) repositories already checked out next to the stress tester's repository, you can omit the `--no-local-deps` option to use the existing checkouts instead of fetching the dependencies using SwiftPM.\n\nTo run the tests, repeat the above command, but additionally, pass the `test` action:\n```\n$ ./Utilities/build-script-helper.py test --package-dir SourceKitStressTester --toolchain $TOOLCHAIN_DIR\n```\n\n## Running\n\nBuilding will create either one or two executables, depending on the package you build. These will be in the package directory's `.build/debug` subdirectory if building on the command line or via the Swift repo's build-script, and under `Products/Debug` in the Xcode project's `DerivedData` directory if building there. They are also available in the `usr/bin` directory of the recent trunk and swift 5.0 development toolchains from swift.org, if you're just interested in running them, rather than building them locally.\n\nSee the individual packages' README files for information about how to run and use their executables.\n\n## License\n\nSee [http://swift.org/LICENSE.txt](http://swift.org/LICENSE.txt) for license information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftlang%2Fswift-stress-tester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswiftlang%2Fswift-stress-tester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswiftlang%2Fswift-stress-tester/lists"}