Changeset 6139
- Timestamp:
- 11/27/06 21:18:57
- Files:
-
- trunk/lib/jerbil/hibernate_task.rb (modified) (2 diffs)
- trunk/lib/jerbil/testng_task.rb (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jerbil/hibernate_task.rb
r6138 r6139 9 9 # Generates a SQL schema from EJB3/Hibernate-annotated classes using Hibernate's 10 10 # SchemaExport tool. Typically Jerbil::AptTask is used to compile source files and 11 # gather a list of entities which then gets serialized to a YAML file.12 # ExportSchemaTask then reads this file and uses Hibernate's schema exporter to13 # generate SQL11 # gather a list of entities which then gets serialized to a YAML file. 12 # ExportSchemaTask then reads this file and uses Hibernate's schema exporter to 13 # generate SQL 14 14 # 15 15 # == Example … … 23 23 attr_accessor :name 24 24 25 # SQL schema destination file (default: schema.sql)25 # SQL schema destination file (default: schema.sql) 26 26 attr_accessor :schemafile 27 27 28 # A file containing a list of entities (<em>javax.persitence.Entity</em>),29 # serialized as a list of strings (YAML format).28 # A file containing a list of entities (<em>javax.persitence.Entity</em>), 29 # serialized as a list of strings (YAML format). 30 30 attr_accessor :entities_yml 31 31 32 # Classname implementing the db dialect, defaults to33 # <em>org.hibernate.dialect.MySQL5Dialect</em>32 # Classname implementing the db dialect, defaults to 33 # <em>org.hibernate.dialect.MySQL5Dialect</em> 34 34 attr_accessor :dialect 35 35 36 # SQL statements to be executed before generated sql.36 # SQL statements to be executed before generated sql. 37 37 attr_accessor :preamble 38 38 39 # FQN of a package containing package-info.java to be used by40 # hibernate.39 # FQN of a package containing package-info.java to be used by 40 # hibernate. 41 41 attr_accessor :package 42 42 trunk/lib/jerbil/testng_task.rb
r6138 r6139 24 24 attr_accessor :name 25 25 26 # A JavaFileList specifing tests to run. TestNGTask will use27 # +to_classes+ to obtain the class files from the list.26 # A JavaFileList specifing tests to run. TestNGTask will use 27 # +to_classes+ to obtain the class files from the list. 28 28 attr_accessor :tests 29 29 30 # Where the testng output should go. Default "test-output".30 # Where the testng output should go. Default "test-output". 31 31 attr_accessor :outputdir 32 32 33 # Whether to generate HTML reports. Defaults to +true+.33 # Whether to generate HTML reports. Defaults to +true+. 34 34 attr_accessor :report 35 35 36 # A list of locations of testng suite.xml files.36 # A list of locations of testng suite.xml files. 37 37 attr_accessor :suites 38 38 … … 40 40 attr_accessor :workingdir 41 41 42 # A list of test listeners to use. Defaults to DefaultTestListener43 # if empty.42 # A list of test listeners to use. Defaults to DefaultTestListener 43 # if empty. 44 44 attr_accessor :listeners 45 45 … … 62 62 task name => dependencies do |t| 63 63 testng = Rjb::import('org.testng.TestNG').new_with_sig 'Z', false 64 64 65 65 listeners << DefaultTestListener.new if listeners.empty? 66 66 67 sl = SuiteListener.new68 69 67 #need to use _invoke because addListener has 3 different method signatures 70 68 #using same name and return type 71 #testng.addListener(Rjb::bind(tl, 'org.testng.ITestListener')) 72 listeners.each do |tl| 69 listeners.each do |tl| 73 70 testng._invoke('addListener', 'Lorg.testng.ITestListener;', Rjb::bind(tl, 'org.testng.ITestListener')) 74 71 end 75 72 76 #testng.addListener(Rjb::bind(sl, 'org.testng.ISuiteListener')) 73 sl = SuiteListener.new 77 74 testng._invoke('addListener', 'Lorg.testng.ISuiteListener;', Rjb::bind(sl, 'org.testng.ISuiteListener')) 78 75 … … 99 96 end 100 97 101 message = "some tests failed"102 if listeners.first.kind_of?(DefaultTestListener)103 message += ": #{listeners.first.failed_to_s}"104 end98 message = "some tests failed" 99 if listeners.first.kind_of?(DefaultTestListener) 100 message += ": #{listeners.first.failed_to_s}" 101 end 105 102 raise message unless testng.getStatus == 0 106 103 end 107 directory workingdir unless workingdir.nil?104 directory workingdir if workingdir 108 105 directory outputdir 109 106 end … … 114 111 include JavaHelper 115 112 113 # A list of all classes with failed tests. 116 114 attr_reader :failed_classes 117 115 def initialize # :nodoc:
