tasks/test.rake in webroar-0.2.2 vs tasks/test.rake in webroar-0.2.3
- old
+ new
@@ -1,7 +1,7 @@
# WebROaR - Ruby Application Server - http://webroar.in/
-# Copyright (C) 2009 WebROaR
+# Copyright (C) 2009 Goonj LLC
#
# This file is part of WebROaR.
#
# WebROaR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -136,11 +136,11 @@
desc "Executes Admin-panel test"
task :admin_panel_test do
puts "Executing Admin-panel tests ..."
Dir.chdir(File.join(WEBROAR_ROOT,'src','admin_panel'))
- system("rake test RAILS_ENV=test >test.log 2>test.log")
+ system("rake test RAILS_ENV=test >test.log 2>error.log")
result = File.read('test.log')
p_f = result.scan(/(\d+)\s+tests,\s+\d+\s+assertions,\s+(\d+)\s+failures,\s+(\d+)\s+errors/)
total = 0
failed = 0
error = 0
@@ -329,10 +329,11 @@
check_and_copy(File.join(UNIT_TEST_DIR, 'testcases.log'), File.join(report_dir, 'unit-testcase.log'))
check_and_copy(File.join(UNIT_TEST_DIR, 'test.log'), File.join(report_dir, 'unit-test.log'))
# copy admin-panel tests related files
check_and_copy(File.join(WEBROAR_ROOT,'src', 'admin_panel', 'test.log'), File.join(report_dir, 'admin-panel-test.log'))
+ check_and_copy(File.join(WEBROAR_ROOT,'src', 'admin_panel', 'error.log'), File.join(report_dir, 'admin-panel-error.log'))
check_and_copy(File.join(WEBROAR_ROOT,'src', 'admin_panel', 'test_summary'), File.join(report_dir, 'admin-panel-test-summary'))
# copy functional tests related files
check_and_copy(File.join(SPEC_DIR, 'test.log'), File.join(report_dir, 'spec-test.log'))
check_and_copy(File.join(SPEC_DIR, 'test_summary'), File.join(report_dir, 'spec-test-summary'))
@@ -344,9 +345,12 @@
check_and_copy(File.join(TEST_DIR, 'load_test_result_fix'), File.join(report_dir, 'load-test-result-fix'))
check_and_copy(File.join(TEST_DIR, 'load_test_result_random'), File.join(report_dir, 'load-test-result-random'))
# copy exception.log
check_and_copy(File.join(TEST_DIR, 'exception.log'), File.join(report_dir, 'exception.log.1'))
+
+ #copy database file
+ check_and_copy(File.join(WEBROAR_ROOT, 'src', 'admin_panel', 'db', 'webroar_test.sqlite3'), report_dir)
# copy debug_log files
if ENV["debug_build"] == "yes"
dest_debug_log_dir = File.join(report_dir, 'debug_log')
unless File.exists?(dest_debug_log_dir)