Added test with assert in test

Signed-off-by: Alejandro Saucedo <axsauze@gmail.com>
This commit is contained in:
Alejandro Saucedo 2022-11-26 16:29:23 +00:00
parent a434e0a791
commit bc1149a421
No known key found for this signature in database
GPG key ID: 99EBB7E98B99695F
2 changed files with 5 additions and 11 deletions

View file

@ -30,14 +30,4 @@ jobs:
configure-options: -DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=ON KOMPUTE_OPT_FROM_SOURCE=ON
build-options: --parallel # Given we don't build too many resources we can leverage parallel
- name: Run tests
run: |
# Check that the expected output is printed
TEST_STDOUT=$(./examples/array_multiplication/build/src/kompute_array_mult)
echo "$TEST_STDOUT"
TEST_CODE=$?
echo "Exit value for test run: $TEST_CODE"
echo $TEST_STDOUT | grep -q "Output: { 0 4 12 }"
TEST_MATCH=$?
echo "Exit value for text match: $TEST_MATCH"
exit $(($TEST_CODE + $TEST_MATCH))
run: ./examples/array_multiplication/build/src/kompute_array_mult