Skip to content

Commit 57e78cc

Browse files
committed
Merge pull request #159 from elixir-lang/refine-travis-setup
run emacs-snapshot in --no-win mode
2 parents ce7af6f + df53498 commit 57e78cc

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ language: erlang
22
otp_release:
33
- 17.1
44
env:
5-
- EMACS=emacs24 EMACS_REPO=cassou/emacs
6-
- EMACS=emacs-snapshot EMACS_REPO=ubuntu-elisp/ppa
5+
- EMACS=emacs24 EMACS_REPO=cassou/emacs TEST_RUN="rake test"
6+
- EMACS=emacs-snapshot EMACS_REPO=ubuntu-elisp/ppa TEST_RUN="rake test-no-gui"
77
before_install:
88
- sudo add-apt-repository -y ppa:$EMACS_REPO
99
- sudo apt-get update
@@ -16,4 +16,4 @@ before_install:
1616
- curl -fsSkL https://raw.github.com/cask/cask/master/go | python
1717
- export PATH="/home/travis/.cask/bin:$PATH"
1818
script:
19-
- rake test
19+
- $TEST_RUN

Rakefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,22 @@ task "test" do
4545
exit_when_failed!("Test suite failed!\n")
4646
end
4747

48+
desc "Run test suite with Emacs without GUI window"
49+
task "test-no-gui" do
50+
process_info "Install package dependencies"
51+
say ""
52+
say "#{indent(3)}Command: ", :yellow, false
53+
sh "cask install"
54+
say ""
55+
56+
process_info "Run test suite with --no-win"
57+
say ""
58+
system "#{CASK} exec ert-runner --no-win"
59+
60+
print_when_success("Test suite success\n")
61+
exit_when_failed!("Test suite failed!\n")
62+
end
63+
4864
namespace :testing do
4965
desc "Run indentation test suite"
5066
task "indentation" do
@@ -95,6 +111,12 @@ def exit_when_failed!(message)
95111
end
96112
end
97113

114+
def print_when_success(message)
115+
if $?.exitstatus == 0
116+
info(message)
117+
end
118+
end
119+
98120
def ansi
99121
{
100122
green: "\e[32m",

0 commit comments

Comments
 (0)