Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ ut-run-tests . --file Example.sublime-syntax

The container entrypoint writes a marker in `/root/.cache/unittesting`.
With `-v unittesting-home:/root`, bootstrap/install runs once and later runs
only refresh your package files and execute tests.
only refresh your package files and execute tests. Each run removes the
session that Sublime Text saved in the previous run, so that no views from
earlier runs are open when the tests start.

## Concurrent runs and races

Expand Down
9 changes: 9 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ ensure_sublime_text_arch_matches() {
fi
}

clear_saved_session() {
# Sublime Text is killed after the tests, so the cache volume keeps the
# session that it last saved, with the views that tests had open then.
# Start without it, like a CI runner does, so that Sublime Text doesn't
# restore those views.
rm -f "${ST_PACKAGES_DIR%/*}/Local/"*.sublime_session
}

ensure_sublime_text_arch_matches
sudo sh -e /etc/init.d/xvfb start
ensure_git_identity
Expand All @@ -127,6 +135,7 @@ if [ "$SUBLIME_TEXT_VERSION" -ge 4 ]; then
else
ST_PACKAGES_DIR="$HOME/.config/sublime-text-$SUBLIME_TEXT_VERSION/Packages"
fi
clear_saved_session

if [ -d "$UNITTESTING_SOURCE/sbin" ]; then
# Ensure UnitTesting comes from the local checkout running this script,
Expand Down
Loading