testing: Cli Tests Are Now Integrated
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
@@ -56,25 +56,4 @@ jobs:
|
|||||||
- run: tree-sitter generate
|
- run: tree-sitter generate
|
||||||
working-directory: ./tree-sitter-p4
|
working-directory: ./tree-sitter-p4
|
||||||
- run: ./ci/format.sh
|
- run: ./ci/format.sh
|
||||||
cli-tests:
|
|
||||||
name: Cli Tests
|
|
||||||
runs-on: ubuntu-build
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
- uses: tree-sitter/setup-action@v2
|
|
||||||
with:
|
|
||||||
tree-sitter-ref: "master"
|
|
||||||
- uses: swift-actions/setup-swift@v3
|
|
||||||
with:
|
|
||||||
swift-version: "main-snapshot"
|
|
||||||
skip-verify-signature: true
|
|
||||||
# Because our tree-sitter code is in a subdirectory,
|
|
||||||
# and working-directory does not apply to uses, we
|
|
||||||
# are forced to specify calls to the CI ourselves.
|
|
||||||
# See https://github.com/orgs/community/discussions/25742
|
|
||||||
- run: tree-sitter generate
|
|
||||||
working-directory: ./tree-sitter-p4
|
|
||||||
- run: swift build
|
|
||||||
- run: ./ci/tests/test.sh
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
actual_output=`swift run p4ce --plain compile simple.p4 -I TestData/Sources/`
|
|
||||||
expected_output=`cat TestData/Cli/simple.golden`
|
|
||||||
if [ "${expected_output}" != "${actual_output}" ]; then
|
|
||||||
echo "Expected: ${expected_output}"
|
|
||||||
echo "Actual: ${actual_output}"
|
|
||||||
echo "Cli Tests: Error"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Cli Tests: Success"
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user