Skip to content

Instantly share code, notes, and snippets.

@shri-zz
Created June 22, 2009 22:41
Show Gist options
  • Save shri-zz/134232 to your computer and use it in GitHub Desktop.
Save shri-zz/134232 to your computer and use it in GitHub Desktop.
@echo off
setlocal
REM Script to run ActiveRecord tests. This executes the same command as doing "rake", but allows customization
REM This assumes that you did "git clone git://github.com/rails/rails.git" in the c:\github folder
REM This allows easily switching between IronRuby and MRI
set USE_IRON_RUBY=1
if defined USE_IRON_RUBY (
set RUBY_EXE=%MERLIN_ROOT%\bin\Debug\ir.exe
set AR_ADAPTER="c:/github/rails/activerecord/test/connections/ironruby_mssql"
) else (
set RUBY_EXE=c:\vsl\Merlin\External.LCA_RESTRICTED\languages\ruby\ruby-1.8.6p287\bin\ruby.exe -rubygems
set AR_ADAPTER="c:/github/rails/activerecord/test/connections/native_sqlite3"
)
REM This allows running either a specific test or the full test suite
set AR_TESTS="test/cases/associations_test.rb"
set AR_TESTS="test/cases/active_schema_test_mysql.rb" "test/cases/adapter_test.rb" "test/cases/aggregations_test.rb" "test/cases/ar_schema_test.rb" "test/cases/associations/belongs_to_associations_test.rb" "test/cases/associations/callbacks_test.rb" "test/cases/associations/cascaded_eager_loading_test.rb" "test/cases/associations/eager_load_includes_full_sti_class_test.rb" "test/cases/associations/eager_load_nested_include_test.rb" "test/cases/associations/eager_singularization_test.rb" "test/cases/associations/eager_test.rb" "test/cases/associations/extension_test.rb" "test/cases/associations/has_and_belongs_to_many_associations_test.rb" "test/cases/associations/has_many_associations_test.rb" "test/cases/associations/has_many_through_associations_test.rb" "test/cases/associations/has_one_associations_test.rb" "test/cases/associations/has_one_through_associations_test.rb" "test/cases/associations/inner_join_association_test.rb" "test/cases/associations/inverse_associations_test.rb" "test/cases/associations/join_model_test.rb" "test/cases/associations_test.rb" "test/cases/attribute_methods_test.rb" "test/cases/autosave_association_test.rb" "test/cases/base_test.rb" "test/cases/batches_test.rb" "test/cases/binary_test.rb" "test/cases/calculations_test.rb" "test/cases/callbacks_observers_test.rb" "test/cases/callbacks_test.rb" "test/cases/class_inheritable_attributes_test.rb" "test/cases/column_alias_test.rb" "test/cases/column_definition_test.rb" "test/cases/connection_pool_test.rb" "test/cases/connection_test_mysql.rb" "test/cases/database_statements_test.rb" "test/cases/date_time_test.rb" "test/cases/defaults_test.rb" "test/cases/deprecated_finder_test.rb" "test/cases/dirty_test.rb" "test/cases/finder_respond_to_test.rb" "test/cases/finder_test.rb" "test/cases/fixtures_test.rb" "test/cases/i18n_test.rb" "test/cases/inheritance_test.rb" "test/cases/invalid_date_test.rb" "test/cases/json_serialization_test.rb" "test/cases/lifecycle_test.rb" "test/cases/locking_test.rb" "test/cases/method_scoping_test.rb" "test/cases/migration_test.rb" "test/cases/mixin_test.rb" "test/cases/modules_test.rb" "test/cases/multiple_db_test.rb" "test/cases/named_scope_test.rb" "test/cases/nested_attributes_test.rb" "test/cases/pk_test.rb" "test/cases/pooled_connections_test.rb" "test/cases/query_cache_test.rb" "test/cases/readonly_test.rb" "test/cases/reflection_test.rb" "test/cases/reload_models_test.rb" "test/cases/reserved_word_test_mysql.rb" "test/cases/sanitize_test.rb" "test/cases/schema_dumper_test.rb" "test/cases/serialization_test.rb" "test/cases/timestamp_test.rb" "test/cases/transactions_test.rb" "test/cases/unconnected_test.rb" "test/cases/validations/association_validation_test.rb" "test/cases/validations/i18n_generate_message_validation_test.rb" "test/cases/validations/i18n_validation_test.rb" "test/cases/validations/uniqueness_validation_test.rb" "test/cases/validations_test.rb" "test/cases/xml_serialization_test.rb"
REM This allows either using the default test loader, or a user file which can have pre-commands to monkey patch types, etc
set TEST_LOADER="c:/bugs/test_loader.rb"
set TEST_LOADER="c:/github/ironruby/Merlin/External.LCA_RESTRICTED/Languages/Ruby/ruby-1.8.6p287/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb"
REM The actual command
echo on
%RUBY_EXE% -I"c:/github/rails/activerecord/lib" -I"c:/github/rails/activerecord/test" -I%AR_ADAPTER% %TEST_LOADER% %AR_TESTS% > c:\bugs\rails\logs\ar_ir.txt 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment