Skip to content

Commit

Permalink
extracts results.html from tar.gz and debug mode (#1706)
Browse files Browse the repository at this point in the history
* extracts results.html from tar.gz and debug mode

* Addressing comment from David R.
  • Loading branch information
edcdavid authored Dec 11, 2023
1 parent 9dd9569 commit 4fd9a03
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions run-basic-batch-operators-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@ OPERATORS_UNDER_TEST=""

# OUTPUTS

# Report folder
REPORT_FOLDER_RELATIVE="report_$TIMESTAMP"
# Check if DEBUG mode
if [ -n "${DEBUG_RUN+any}" ]; then
echo "DEBUG_RUN is set. Running in debug mode"
# Debug folder
REPORT_FOLDER_RELATIVE="debug_$TIMESTAMP"
else
echo "DEBUG_RUN is not set. Running in non-debug mode"
# Report folder
REPORT_FOLDER_RELATIVE="report_$TIMESTAMP"
fi

# Report results folder
REPORT_FOLDER="$BASE_DIR"/"$REPORT_FOLDER_RELATIVE"
Expand Down Expand Up @@ -314,11 +322,14 @@ while IFS=, read -r package_name catalog; do
# merge claim.json from each operator to a single csv file
./tnf claim show csv -c "$reportDir"/claim.json -n "$package_name" -t "$CNF_TYPE" "$addHeaders" >>"$REPORT_FOLDER"/results.csv

# extract parser
tar -xvf "$reportDir"/*.tar.gz -C "$reportDir" results.html

# Add per operator links
{
# Add parser link
echo "Results for: <b>$package_name</b>, parsed details:"
echo '<a href="/results.html?claimfile=/'"$REPORT_FOLDER_RELATIVE"'/'"$package_name"'/claim.json">'"link"'</a>'
echo '<a href="/'"$REPORT_FOLDER_RELATIVE"'/'"$package_name"'/results.html?claimfile=/'"$REPORT_FOLDER_RELATIVE"'/'"$package_name"'/claim.json">'"link"'</a>'

# Add log link
echo ", log: "
Expand Down

0 comments on commit 4fd9a03

Please sign in to comment.