Skip to content

Commit 575d2ff

Browse files
authored
Merge pull request #66 from attogram/fix/test-pipeline
Fix test pipeline errors
2 parents d9fd5d0 + 0038fb7 commit 575d2ff

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

jury/render-the-verdict.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
55
# Run the setup script.
66
"${SCRIPT_DIR}/assemble-the-jury.sh"
77

8-
# cd into the jury directory to run the tests.
9-
cd "${SCRIPT_DIR}" || exit 1
8+
# Set the TERM variable for tput.
9+
export TERM=xterm
1010

1111
# Run the bats tests with pretty output.
12-
"test_libs/bats-core-1.12.0/bin/bats" --pretty . > "verdict.txt"
12+
"${SCRIPT_DIR}/test_libs/bats-core-1.12.0/bin/bats" --pretty "${SCRIPT_DIR}" > "${SCRIPT_DIR}/verdict.txt"
1313

1414
# Run the bats tests with TAP output.
15-
"test_libs/bats-core-1.12.0/bin/bats" --tap . > "verdict.tap"
15+
"${SCRIPT_DIR}/test_libs/bats-core-1.12.0/bin/bats" --tap "${SCRIPT_DIR}" > "${SCRIPT_DIR}/verdict.tap"

spotlight/tour-the-gallery.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,14 @@ main() {
9898
create_title_card "$name" "$temp_dir/$(printf "%02d" $i)_${name}_title.cast"
9999
all_casts+=("$temp_dir/$(printf "%02d" $i)_${name}_title.cast")
100100

101-
# Record a snippet from the middle
102-
local snippet_cast="$temp_dir/$(printf "%02d" $i)_${name}_snippet.cast"
103-
asciinema rec --command="bash -c 'sleep 3; timeout 3s env SHELL=/bin/bash $run_script'" --overwrite "$snippet_cast"
104-
validate_cast "$snippet_cast"
105-
all_casts+=("$snippet_cast")
101+
# Add the existing cast file
102+
local cast_file="${screensaver_dir}${name}.cast"
103+
if [[ -f "$cast_file" ]]; then
104+
validate_cast "$cast_file"
105+
all_casts+=("$cast_file")
106+
else
107+
echo "Warning: Cast file not found for $name, skipping."
108+
fi
106109

107110
i=$((i+1))
108111
fi

0 commit comments

Comments
 (0)