-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/christian/progressdots'
* topic/christian/progressdots: Add test to verify progress indicator behavior on TTYs Remove diff-remove-install-ticks canonifier Add InstallWorker.wait() method and switch progress-dot writers to it
- Loading branch information
Showing
8 changed files
with
77 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.12.0-13 | ||
2.12.0-17 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This test installs a package with a "slow" pseudo build command, once using a | ||
# pretend TTY, and once normally. It then verifies that we see progress dots | ||
# only in the TTY. This requires the "script" command for TTY fakery. | ||
|
||
# @TEST-REQUIRES: script --version | ||
# @TEST-EXEC: bash %INPUT | ||
|
||
# https://stackoverflow.com/questions/32910661/pretend-to-be-a-tty-in-bash-for-any-command | ||
faketty () { | ||
script -qefc "$(printf "%q " "$@")" /dev/null | ||
} | ||
|
||
# Add a build command to the package that takes at least as long as it takes zkg | ||
# to produce progress dots. | ||
( | ||
cd $(pwd)/packages/foo | ||
echo 'build_command = sleep 2' >>zkg.meta | ||
git add zkg.meta | ||
git commit -am 'build slowly' | ||
) | ||
|
||
faketty zkg install foo >output.tty | ||
zkg uninstall --force foo | ||
zkg install foo >output.notty | ||
|
||
grep 'Installing' output.tty | grep -q '\.' | ||
grep 'Installing' output.notty | grep -v -q '\.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters