Skip to content

Commit

Permalink
Add unittests to confirm resource compilation worked.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexhuszagh committed Sep 8, 2024
1 parent a02a681 commit 27e341a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions scripts/headless.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,20 @@ for script in example/*.py; do
fi
for framework in "${frameworks[@]}"; do
echo "Running '${script}' for framework '${framework}'."
xvfb-run -a "${PYTHON}" "${script}" --qt-framework "${framework}"
xvfb-run -a "${PYTHON}" "${script}" --qt-framework "${framework}" --stylesheet dark
done
done

# ensure that our styles compressed properly
# if they didn't, Qt could segfault on initialization
# if a style doesn't exist, it simply won't be read
# which is fine
export QT_QPA_PLATFORM=offscreen
styles=("dark-red" "dark-blue" "dark-purple" "dark-green" "light-red" "light-blue" "light-purple" "light-green")
for framework in "${frameworks[@]}"; do
for style in "${styles[@]}"; do
echo "Running widgets test for framework '${framework}' an style '${style}'."
xvfb-run -a "${PYTHON}" "example/widgets.py" --qt-framework "${framework}" --stylesheet "${style}"
done
done

Expand All @@ -64,6 +77,6 @@ widgets=$(${PYTHON} -c "import os; os.chdir('test'); import ui; print(' '.join([
for widget in ${widgets[@]}; do
for framework in "${frameworks[@]}"; do
echo "Running test for widget '${widget}' for framework '${framework}'."
xvfb-run -a "${PYTHON}" test/ui.py --widget "${widget}" --qt-framework "${framework}"
xvfb-run -a "${PYTHON}" test/ui.py --widget "${widget}" --qt-framework "${framework}" --stylesheet dark
done
done

0 comments on commit 27e341a

Please sign in to comment.