[DRE-commits] [schleuder] 01/02: debian/ruby-tests.rake: Fix and call cleanup task

Georg Faerber georg-alioth-guest at moszumanska.debian.org
Sun Jan 15 12:55:11 UTC 2017


This is an automated email from the git hooks/post-receive script.

georg-alioth-guest pushed a commit to branch master
in repository schleuder.

commit 361b5cc301eed06db34cba5e5a500617114546eb
Author: Georg Faerber <georg at riseup.net>
Date:   Sat Jan 14 19:17:59 2017 +0100

    debian/ruby-tests.rake: Fix and call cleanup task
---
 debian/ruby-tests.rake | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/debian/ruby-tests.rake b/debian/ruby-tests.rake
index b581d88..4fd302f 100644
--- a/debian/ruby-tests.rake
+++ b/debian/ruby-tests.rake
@@ -17,9 +17,11 @@ task :run_tests do
 end
 
 task :cleanup do
-  # Remove database to make the build reproducible
-  `rm db/test.sqlite3 >/dev/null 2>&1 || true`
-  `rm /usr/lib/ruby/vendor_ruby/schleuder/db/test.sqlite3 >/dev/null 2>&1 || true`
+  at_exit {
+    # Remove database to make the build reproducible
+    `rm db/test.sqlite3 >/dev/null 2>&1 || true`
+    `rm /usr/lib/ruby/vendor_ruby/schleuder/db/test.sqlite3 >/dev/null 2>&1 || true`
+  }
 end
 
-task :default => [:setup, :run_tests]
+task :default => [:setup, :run_tests, :cleanup]

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/schleuder.git



More information about the Pkg-ruby-extras-commits mailing list