This is an automated email from the ASF dual-hosted git repository. rzo1 pushed a commit to branch OPENNLP-1688 in repository https://gitbox.apache.org/repos/asf/opennlp.git
The following commit(s) were added to refs/heads/OPENNLP-1688 by this push: new ce1b3230 x ce1b3230 is described below commit ce1b3230d8d30b17fea00c342a8ff3e044156b4f Author: Richard Zowalla <r...@apache.org> AuthorDate: Fri Jan 17 12:47:23 2025 +0100 x --- .github/workflows/shell-tests.yml | 19 +++++++++++++++++-- opennlp-distr/src/test/sh/test_opennlp.bats | 12 +++++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/shell-tests.yml b/.github/workflows/shell-tests.yml index 88baf31d..dccce581 100644 --- a/.github/workflows/shell-tests.yml +++ b/.github/workflows/shell-tests.yml @@ -1,4 +1,19 @@ -name: Test Shell Script with Bats +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Shell Bats CI on: push: @@ -41,7 +56,7 @@ jobs: fi # Extract the tar.gz file - tar -xzvf "$TAR_FILE" -C $HOME + tar -xzf "$TAR_FILE" -C $HOME # Get the directory name of the extracted content EXTRACTED_DIR=$(tar -tf "$TAR_FILE" | head -n 1 | cut -f1 -d"/") diff --git a/opennlp-distr/src/test/sh/test_opennlp.bats b/opennlp-distr/src/test/sh/test_opennlp.bats index b181858d..a47fefc0 100644 --- a/opennlp-distr/src/test/sh/test_opennlp.bats +++ b/opennlp-distr/src/test/sh/test_opennlp.bats @@ -20,9 +20,15 @@ setup() { # Run the command and capture output run echo "$input" | opennlp SimpleTokenizer - # Validate the output - [ "$status" -eq 0 ] - [ "${output}" = "$expected_output" ] + # Debugging: Log the status and output + echo "Status: $status" + echo "Output: $output" + + # Validate the command executed successfully + [ "$status" -eq 0 ] || echo "Error: opennlp SimpleTokenizer failed" + + # Validate the output matches the expected result + [ "${output}" = "$expected_output" ] || echo "Unexpected output: ${output}" } # Teardown the environment after running the tests