<commit_before>############################################################################
## 
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 
## All rights reserved. 
## Contact: N<NAME> (<EMAIL>) 
## 
## This file is part of Testability Driver Qt Agent
## 
## If you have questions regarding the use of this file, please contact 
## Nokia at <EMAIL> . 
## 
## This library is free software; you can redistribute it and/or 
## modify it under the terms of the GNU Lesser General Public 
## License version 2.1 as published by the Free Software Foundation 
## and appearing in the file LICENSE.LGPL included in the packaging 
## of this file. 
## 
############################################################################


desc "Task for testing visualizer"
task :test do
   begin
     Dir.chdir("test")
     result=system( "cucumber features -f TDriverReport::CucumberReporter" )
     raise "Feature tests failed" if (result != true) or ($? != 0) 
   ensure    
     Dir.chdir("..")	 
	if ENV['CC_BUILD_ARTIFACTS']    
    #Copy results to build artifacts
	  Dir.foreach("#{Dir.pwd}/test/tdriver_reports") do |entry|
	    if entry.include?('test_run')
	      FileUtils.cp_r "#{Dir.pwd}/test/tdriver_reports/#{entry}", "#{ENV['CC_BUILD_ARTIFACTS']}/#{entry}"
          FileUtils::remove_entry_secure("#{Dir.pwd}/test/tdriver_reports/#{entry}", :force => true)
	    end
	  end
    end
   end
   exit(0)
   
end

desc "Task for cruise control"
task :cruise => ['build_visualizer'] do
	exit(0)
end

desc "Task for building the example QT application(s)"
task :build_visualizer do
<commit_msg>Added tests to rake task<commit_after>############################################################################
## 
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 
## All rights reserved. 
## Contact: N<NAME> (<EMAIL>) 
## 
## This file is part of Testability Driver Qt Agent
## 
## If you have questions regarding the use of this file, please contact 
## Nokia at <EMAIL> . 
## 
## This library is free software; you can redistribute it and/or 
## modify it under the terms of the GNU Lesser General Public 
## License version 2.1 as published by the Free Software Foundation 
## and appearing in the file LICENSE.LGPL included in the packaging 
## of this file. 
## 
############################################################################


desc "Task for testing visualizer"
task :test do
   begin
     Dir.chdir("test")
     result=system( "cucumber features -f TDriverReport::CucumberReporter" )
     raise "Feature tests failed" if (result != true) or ($? != 0) 
   ensure    
     Dir.chdir("..")	 
	if ENV['CC_BUILD_ARTIFACTS']    
    #Copy results to build artifacts
	  Dir.foreach("#{Dir.pwd}/test/tdriver_reports") do |entry|
	    if entry.include?('test_run')
	      FileUtils.cp_r "#{Dir.pwd}/test/tdriver_reports/#{entry}", "#{ENV['CC_BUILD_ARTIFACTS']}/#{entry}"
          FileUtils::remove_entry_secure("#{Dir.pwd}/test/tdriver_reports/#{entry}", :force => true)
	    end
	  end
    end
   end
   exit(0)
   
end

desc "Task for cruise control"
task :cruise => ['build_visualizer', 'test'] do
	exit(0)
end

desc "Task for building the example QT application(s)"
task :build_visualizer do

{'fraction_non_alphanumeric': 0.20701322669947708, 'fraction_numerical': 0.005536757920639803, 'mean_word_length': 4.08125, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6736004', 'n_tokens_mistral': 1017, 'n_tokens_neox': 946, 'n_words': 315}