Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan committed Nov 29, 2023
1 parent 0dee78f commit 4c2eeb0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions VortexEngine/tests/record_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ ARGS="$(grep "Args=" $FILE | cut -d= -f2)"
TESTNUM="$(echo $FILE | cut -d/ -f2 | cut -d_ -f1 | cut -d/ -f2)"
TESTNUM=$((10#$TESTNUM))

$QUIET || echo -e -n "\e[31mRecording $PROJECT ($TESTCOUNT/$NUMFILES) \e[33m[\e[97m$BRIEF\e[33m] \e[33m[\e[97m$ARGS\e[33m]...\e[0m"
if [ "$QUIET" -eq 0 ]; then
echo -e -n "\e[31mRecording $PROJECT ($TESTCOUNT/$NUMFILES) \e[33m[\e[97m$BRIEF\e[33m] \e[33m[\e[97m$ARGS\e[33m]...\e[0m"
fi
TEMP_FILE="tmp/${FILE}.out"
# Append the output of the $VORTEX command to the temp file
# NOTE: When recording the tests we don't use valgrind because
Expand All @@ -44,9 +46,11 @@ $VORTEX $ARGS --no-timestep --hex <<< $INPUT >> $TEMP_FILE
sed -i 's/\r//g' $TEMP_FILE
# Replace the original file with the modified temp file
mv $TEMP_FILE $FILE
$QUIET || echo -e "\e[96mOK\e[0m"
$QUIET && echo -e "."
# print out colorful if in verbose
if [ "$QUIET" -eq 0 ]; then
echo -e "\e[96mOK\e[0m"
else
echo -e "."
fi
if [ "$VALIDATE" -eq 1 ]; then
$VORTEX $ARGS --no-timestep --color <<< $INPUT
echo -e "\e[31mRecorded \e[33m[\e[97m$BRIEF\e[33m] \e[33m[\e[97m$ARGS\e[33m]\e[0m"
Expand Down
4 changes: 3 additions & 1 deletion VortexEngine/tests/recordtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ function record_tests() {
# Wait for all background jobs to finish
wait

$QUIET && echo ". Complete"
if [ "$QUIET" -eq 1]; then
echo ". Complete"
fi
echo "All tests recorded successfully!"
#rm -rf tmp/$PROJECT
}
Expand Down

0 comments on commit 4c2eeb0

Please sign in to comment.