Skip to content

Commit

Permalink
#95: refactor xvfb usage for ci script
Browse files Browse the repository at this point in the history
  • Loading branch information
tlamonthezie committed Aug 27, 2024
1 parent e265208 commit dd891fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ if [[ "$VT_TV_RUN_TESTS" == "ON" ]]; then
if [[ "$VT_TV_RUN_TESTS" == "ON" ]]; then
pkill Xvfb
export DISPLAY=$CURRENT_DISPLAY
rm -rf /tmp/.X11-unix/X99
fi

echo "Tests done."
Expand Down
12 changes: 1 addition & 11 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

set -ex

export DISPLAY=:99.0

# Start custom display with X virtual frame buffer
Xvfb :99 -screen 0 1024x768x24 -nolisten tcp > /dev/null 2>&1 &
sleep 1s

VT_TV_OUTPUT_DIR=/var/vt-tv/output
VT_TV_TESTS_OUTPUT_DIR=/opt/src/vt-tv/output/tests

Expand All @@ -19,6 +13,7 @@ bash -c "VTK_DIR=/opt/build/vtk \
VT_TV_COVERAGE_ENABLED=${VT_TV_COVERAGE_ENABLED:-OFF} \
VT_TV_OUTPUT_DIR=$VT_TV_OUTPUT_DIR \
VT_TV_RUN_TESTS=ON \
VT_TV_XVFB_ENABLED=ON \
/opt/src/vt-tv/build.sh"

# Add artifacts
Expand Down Expand Up @@ -54,8 +49,3 @@ popd

# list artifacts dir content
ls $VT_TV_ARTIFACTS_DIR

# Clean and restore regular display
pkill Xvfb
rm -rf /tmp/.X11-unix/X99
export DISPLAY=:0

0 comments on commit dd891fa

Please sign in to comment.