Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Travis CI regression test support #604

Merged
merged 2 commits into from
Jul 26, 2016
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
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: perl
perl:
- "5.24"
- "5.22"
- "5.20"
- "5.18"
- "5.16"
- "5.14"
- "5.08"
install: true
script: cd bin ; ./mh -tk 0 -code_dir ../code/test
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
MisterHouse
===========

[![Build Status](https://travis-ci.org/hollie/misterhouse.svg?branch=master)](https://travis-ci.org/hollie/misterhouse)

Perl open source home automation program. It's fun, it's free, and it's entirely geeky.

* [Quickstart Guide](https://github.com/hollie/misterhouse/wiki/Getting-started)
Expand Down
4 changes: 2 additions & 2 deletions bin/mh
Original file line number Diff line number Diff line change
Expand Up @@ -3705,7 +3705,7 @@ sub exit_pgm {
$sock->close() if $sock;
}

# Use exit code 1 to mean we exited on purpose ... anything else
# Use exit code 0 to mean we exited on purpose ... anything else
# we can use in mh_loop to mean accidental exit, 'better restart'
if ($restart) {
&print_log("Restarting mh");
Expand All @@ -3717,7 +3717,7 @@ sub exit_pgm {
print "Bye Bye\n";

# exit 1;
POSIX::_exit(1); # MUCH faster ... but no DESTROY or END called.
POSIX::_exit(0); # MUCH faster ... but no DESTROY or END called.
}
}

Expand Down
2 changes: 1 addition & 1 deletion bin/mhl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ while [ 1 = 1 ]; do
rc=$?
echo mh rc=$rc

if [ $rc = 1 ]; then
if [ $rc = 0 ]; then
echo mh exited normally
exit
fi
Expand Down
15 changes: 15 additions & 0 deletions code/test/test_mh.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Category=Test

# At startup program a time to stop the test after one minute
my $shutdown_timer = new Timer; #noloop
$shutdown_timer->set(60, \&shutdown); #noloop

if ($Startup) {
$shutdown_timer->start();
print_log "Shutdown timer set";
}

sub shutdown {
print_log "Stopping self-test, exit...";
run_voice_cmd("Exit Mister House");
}