From 3832439759a2f6b68eac3b0e533fdac090d12473 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Tue, 21 Mar 2017 01:32:38 +0100 Subject: Assume "yes" on installation of ZSH on travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ad4eb8c6..8a549510 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ before_script: install: - "sudo apt-get update -qq" - - "sudo apt-get install zsh" + - "sudo apt-get install -y zsh" - "sudo chsh -s $(which zsh)" script: -- cgit v1.2.3 From 454798a2c439aae4f179083f3758f0b2b0f8c145 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Tue, 21 Mar 2017 01:33:54 +0100 Subject: Fix a little problem in BSD On BSD ZSH is installed on a different location than on linux. So we link it there to make sure our later scripts will work. --- test-bsd-vm/bootstrap.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test-bsd-vm/bootstrap.sh b/test-bsd-vm/bootstrap.sh index f78b3078..a28935ea 100644 --- a/test-bsd-vm/bootstrap.sh +++ b/test-bsd-vm/bootstrap.sh @@ -3,6 +3,7 @@ # Install ZSH sudo pkg install -y zsh sudo chsh -s `which zsh` vagrant +sudo ln -s /usr/local/bin/zsh /usr/bin/zsh # Install git sudo pkg install -y git \ No newline at end of file -- cgit v1.2.3 From 3704b42a547a3324db2d7bfafbf8ba2bccd48750 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Tue, 21 Mar 2017 01:40:31 +0100 Subject: Fix a problem with redirection in plain.zsh provider --- test-vm-providers/plain.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-vm-providers/plain.sh b/test-vm-providers/plain.sh index a87220f8..5bd76168 100644 --- a/test-vm-providers/plain.sh +++ b/test-vm-providers/plain.sh @@ -1,4 +1,4 @@ #!/usr/bin/zsh -echo 'LANG=en_US.UTF-8' !> ~/.zshrc +echo 'LANG=en_US.UTF-8' >! ~/.zshrc echo 'source /vagrant_data/powerlevel9k.zsh-theme' >> ~/.zshrc \ No newline at end of file -- cgit v1.2.3 From b2342f90e9131f61064a9c08f33d78903a157193 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Tue, 21 Mar 2017 01:41:47 +0100 Subject: Install more dependencies in VMs --- test-bsd-vm/bootstrap.sh | 6 +++++- test-vm/bootstrap.sh | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/test-bsd-vm/bootstrap.sh b/test-bsd-vm/bootstrap.sh index a28935ea..ba27ffb3 100644 --- a/test-bsd-vm/bootstrap.sh +++ b/test-bsd-vm/bootstrap.sh @@ -6,4 +6,8 @@ sudo chsh -s `which zsh` vagrant sudo ln -s /usr/local/bin/zsh /usr/bin/zsh # Install git -sudo pkg install -y git \ No newline at end of file +sudo pkg install -y git +# Install mercurial +sudo pkg install -y mercurial +# Install subversion +sudo pkg install -y subversion \ No newline at end of file diff --git a/test-vm/bootstrap.sh b/test-vm/bootstrap.sh index 9651c4eb..f680d4b8 100644 --- a/test-vm/bootstrap.sh +++ b/test-vm/bootstrap.sh @@ -7,3 +7,13 @@ sudo apt-get install -y git sudo apt-get install -y zsh sudo chsh -s $(which zsh) vagrant + +# Install mercurial +sudo apt-get install -y mercurial +# Install Subversion +sudo apt-get install -y subversion +# install golang +echo 'golang-go golang-go/dashboard boolean false' | sudo debconf-set-selections +sudo apt-get install -y golang +# Install dependencies for tests +sudo apt-get install -y jq node ruby python python-virtualenv \ No newline at end of file -- cgit v1.2.3 From 4331ed2dd14564543e912fd1675daf86b8e4afa1 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Tue, 21 Mar 2017 01:42:13 +0100 Subject: Install more dependencies on travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 8a549510..1b2f6d02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ install: - "sudo apt-get update -qq" - "sudo apt-get install -y zsh" - "sudo chsh -s $(which zsh)" + - "sudo apt-get install -y git mercurial subversion jq node golang ruby python python-virtualenv" script: - test/powerlevel9k.spec -- cgit v1.2.3 From a4a8afb203c9c4bdebc1b24a2e811ddaad6dad95 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Tue, 21 Mar 2017 01:43:24 +0100 Subject: Setup some test folders/repos in the VMs for easier testing --- test-vm-providers/plain.sh | 5 +++- test-vm-providers/setup-environment.sh | 44 ++++++++++++++++++++++++++++++++++ test-vm/antigen.sh | 3 +++ test-vm/omz.sh | 2 ++ test-vm/prezto.sh | 3 +++ 5 files changed, 56 insertions(+), 1 deletion(-) create mode 100755 test-vm-providers/setup-environment.sh diff --git a/test-vm-providers/plain.sh b/test-vm-providers/plain.sh index 5bd76168..3dc0e5a5 100644 --- a/test-vm-providers/plain.sh +++ b/test-vm-providers/plain.sh @@ -1,4 +1,7 @@ #!/usr/bin/zsh echo 'LANG=en_US.UTF-8' >! ~/.zshrc -echo 'source /vagrant_data/powerlevel9k.zsh-theme' >> ~/.zshrc \ No newline at end of file +echo 'source /vagrant_data/powerlevel9k.zsh-theme' >> ~/.zshrc + +# setup environment +/vagrant_data/test-vm-providers/setup-environment.sh \ No newline at end of file diff --git a/test-vm-providers/setup-environment.sh b/test-vm-providers/setup-environment.sh new file mode 100755 index 00000000..0e8beb6d --- /dev/null +++ b/test-vm-providers/setup-environment.sh @@ -0,0 +1,44 @@ +#!/usr/bin/zsh + +OLDPWD="$(pwd)" +cd $HOME + +TESTFOLDER="${HOME}/p9k" +mkdir -p $TESTFOLDER +cd $TESTFOLDER + +# Make a deep test folder +mkdir -p deep-folder/1/12/123/1234/12345/123456/1234567/123455678/123456789 + +# Make a git repo +mkdir git-repo +cd git-repo +git config --global user.email "test@powerlevel9k.theme" +git config --global user.name "Testing Tester" +git init +echo "TEST" >> testfile +git add testfile +git commit -m "Initial commit" +cd $TESTFOLDER + +# Make a Mercurial repo +mkdir hg-repo +cd hg-repo +export HGUSER="Test bot " +hg init +echo "TEST" >> testfile +hg add testfile +hg ci -m "Initial commit" +cd $TESTFOLDER + +# Setup a SVN folder +svnadmin create ~/.svn-repo +mkdir svn-repo +svn checkout "file://${HOME}/.svn-repo" "svn-repo" +cd svn-repo +echo "TEST" >> testfile +svn add testfile +svn commit -m "Initial commit" +cd $TESTFOLDER + +cd $OLDPWD \ No newline at end of file diff --git a/test-vm/antigen.sh b/test-vm/antigen.sh index 0f44c6ca..2c563322 100644 --- a/test-vm/antigen.sh +++ b/test-vm/antigen.sh @@ -24,4 +24,7 @@ antigen apply mkdir ~/antigen curl -qL https://raw.githubusercontent.com/zsh-users/antigen/master/antigen.zsh > ~/antigen/antigen.zsh source ~/antigen/antigen.zsh + + # setup environment + /vagrant_data/test-vm-providers/setup-environment.sh ) diff --git a/test-vm/omz.sh b/test-vm/omz.sh index 953f5c8f..73b659f3 100644 --- a/test-vm/omz.sh +++ b/test-vm/omz.sh @@ -28,4 +28,6 @@ plugins=(git rake ruby) source $ZSH/oh-my-zsh.sh ' > $HOME/.zshrc + # setup environment + /vagrant_data/test-vm-providers/setup-environment.sh ) diff --git a/test-vm/prezto.sh b/test-vm/prezto.sh index af4e7454..3ac38503 100644 --- a/test-vm/prezto.sh +++ b/test-vm/prezto.sh @@ -23,4 +23,7 @@ chmod 440 /etc/sudoers.d/$NEW_USER ln -s /vagrant_data/powerlevel9k.zsh-theme ~/.zprezto/modules/prompt/functions/prompt_powerlevel9k_setup sed -i "s/theme\ 'sorin'/theme\ 'powerlevel9k'/g" ~/.zpreztorc + + # setup environment + /vagrant_data/test-vm-providers/setup-environment.sh ) -- cgit v1.2.3 From 3ef7fb35f818a44c029eea7e8196f75a6b0e6eba Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Tue, 21 Mar 2017 02:09:14 +0100 Subject: Add a hint for the p9k test folder inside the VMs --- test-vm-providers/plain.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test-vm-providers/plain.sh b/test-vm-providers/plain.sh index 3dc0e5a5..b827a0c4 100644 --- a/test-vm-providers/plain.sh +++ b/test-vm-providers/plain.sh @@ -3,5 +3,7 @@ echo 'LANG=en_US.UTF-8' >! ~/.zshrc echo 'source /vagrant_data/powerlevel9k.zsh-theme' >> ~/.zshrc +echo 'echo "Have a look at the ~/p9k folder for prepared test setups."' >> ~/.zshrc + # setup environment /vagrant_data/test-vm-providers/setup-environment.sh \ No newline at end of file -- cgit v1.2.3