File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,12 +11,22 @@ load 'tasks/rubocop.rake'
1111desc 'Default: run unit tests.'
1212task :default => :test
1313
14+
15+ # Collect all test files, excluding those specified in the SKIP_TEST_FILES environment variable
16+ all_test_files = FileList [ 'test/**/*_test.rb' ]
17+ skip_tests = ENV [ 'SKIP_TEST_FILES' ] ? ENV [ 'SKIP_TEST_FILES' ] . split ( ',' ) : [ ]
18+
19+ # remove all tests which start with test/#{skip_test}
20+ test_files = all_test_files . reject do |file |
21+ skip_tests . any? { |skip_test | file . start_with? ( "test/#{ skip_test } " ) }
22+ end
23+
1424desc 'Test the Foreman Proxy plugin.'
1525Rake ::TestTask . new ( :test ) do |t |
1626 t . libs << '.'
1727 t . libs << 'lib'
1828 t . libs << 'test'
19- t . test_files = FileList [ 'test/**/*_test.rb' ]
29+ t . test_files = test_files
2030 t . verbose = true
2131 t . ruby_opts = [ "-W1" ]
2232end
Original file line number Diff line number Diff line change 22 gem 'rkerberos' , '>= 0.1.1'
33 gem 'gssapi'
44end
5+
6+ tests = %w[ dns realm ]
7+ ENV [ 'SKIP_TEST_FILES' ] = ( ( ENV [ 'SKIP_TEST_FILES' ] || "" ) . split ( "," ) + tests ) . uniq . join ( "," )
Original file line number Diff line number Diff line change 11group :libvirt do
22 gem 'ruby-libvirt' , '>= 0.6.0'
33end
4+
5+ tests = %w[ dhcp_libvirt dns_libvirt migrations/libvirt_migration_test.rb ]
6+ ENV [ 'SKIP_TEST_FILES' ] = ( ( ENV [ 'SKIP_TEST_FILES' ] || "" ) . split ( "," ) + tests ) . uniq . join ( "," )
You can’t perform that action at this time.
0 commit comments