Spawn a new rake process to run tests, so that LOAD_PLUGINS gets re-checked (#5001)
This commit is contained in:
parent
68d09e8315
commit
2c6ed64ebe
|
@ -101,14 +101,20 @@ desc 'run plugin qunit tests'
|
||||||
task 'plugin:qunit', [:plugin, :timeout] do |t, args|
|
task 'plugin:qunit', [:plugin, :timeout] do |t, args|
|
||||||
args.with_defaults(plugin: "*")
|
args.with_defaults(plugin: "*")
|
||||||
|
|
||||||
ENV['LOAD_PLUGINS'] = '1'
|
rake = `which rake`.strip
|
||||||
ENV['QUNIT_SKIP_CORE'] = '1'
|
|
||||||
|
cmd = 'LOAD_PLUGINS=1 '
|
||||||
|
cmd += 'QUNIT_SKIP_CORE=1 '
|
||||||
|
|
||||||
if args[:plugin] == "*"
|
if args[:plugin] == "*"
|
||||||
puts "Running qunit tests for all plugins"
|
puts "Running qunit tests for all plugins"
|
||||||
else
|
else
|
||||||
puts "Running qunit tests for #{args[:plugin]}"
|
puts "Running qunit tests for #{args[:plugin]}"
|
||||||
ENV['QUNIT_SINGLE_PLUGIN'] = args[:plugin]
|
cmd += "QUNIT_SINGLE_PLUGIN='#{args[:plugin]}' "
|
||||||
end
|
end
|
||||||
|
|
||||||
Rake::Task["qunit:test"].invoke(args[:timeout])
|
cmd += "#{rake} qunit:test"
|
||||||
|
cmd += "[#{args[:timeout]}" if args[:timeout]
|
||||||
|
|
||||||
|
sh cmd
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue