|
@@ -65,12 +65,12 @@ We require that your commit messages match our template. The easiest way to do t
|
|
SwiftLog uses XCTest to run tests on both macOS and Linux. While the macOS version of XCTest is able to use the Objective-C runtime to discover tests at execution time, the Linux version is not.
|
|
SwiftLog uses XCTest to run tests on both macOS and Linux. While the macOS version of XCTest is able to use the Objective-C runtime to discover tests at execution time, the Linux version is not.
|
|
For this reason, whenever you add new tests **you have to run a script** that generates the hooks needed to run those tests on Linux, or our CI will complain that the tests are not all present on Linux. To do this, merely execute `ruby ./scripts/generate_linux_tests.rb` at the root of the package and check the changes it made.
|
|
For this reason, whenever you add new tests **you have to run a script** that generates the hooks needed to run those tests on Linux, or our CI will complain that the tests are not all present on Linux. To do this, merely execute `ruby ./scripts/generate_linux_tests.rb` at the root of the package and check the changes it made.
|
|
|
|
|
|
-### Run `./scripts/sanity.sh`
|
|
|
|
|
|
+### Run `./scripts/soundness.sh`
|
|
|
|
|
|
-The scripts directory contains a [sanity.sh script](https://github.com/apple/swift-log/blob/main/scripts/sanity.sh)
|
|
|
|
|
|
+The scripts directory contains a [soundness.sh script](https://github.com/apple/swift-log/blob/main/scripts/soundness.sh)
|
|
that enforces additional checks, like license headers and formatting style.
|
|
that enforces additional checks, like license headers and formatting style.
|
|
|
|
|
|
-Please make sure to `./scripts/sanity.sh` before pushing a change upstream, otherwise it is likely the PR validation will fail
|
|
|
|
|
|
+Please make sure to `./scripts/soundness.sh` before pushing a change upstream, otherwise it is likely the PR validation will fail
|
|
on minor changes such as a missing `self.` or similar formatting issues.
|
|
on minor changes such as a missing `self.` or similar formatting issues.
|
|
|
|
|
|
> The script also executes the above mentioned `generate_linux_tests.rb`.
|
|
> The script also executes the above mentioned `generate_linux_tests.rb`.
|
|
@@ -81,8 +81,8 @@ For frequent contributors, we recommend adding the script as a [git pre-push hoo
|
|
cat << EOF > .git/hooks/pre-push
|
|
cat << EOF > .git/hooks/pre-push
|
|
#!/bin/bash
|
|
#!/bin/bash
|
|
|
|
|
|
-if [[ -f "scripts/sanity.sh" ]]; then
|
|
|
|
- scripts/sanity.sh
|
|
|
|
|
|
+if [[ -f "scripts/soundness.sh" ]]; then
|
|
|
|
+ scripts/soundness.sh
|
|
fi
|
|
fi
|
|
EOF
|
|
EOF
|
|
```
|
|
```
|