mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-02-26 08:22:31 +00:00
Split single unit test directory into multiple ones
The goal is to enable testing of application specific files, e.g. for mkvpropedit.
This commit is contained in:
parent
315d84d3de
commit
6a2698f5ec
2
.gitignore
vendored
2
.gitignore
vendored
@ -57,7 +57,7 @@
|
||||
/src/tools/ebml_validator
|
||||
/src/tools/vc1parser
|
||||
/tests/data
|
||||
/tests/unit/all
|
||||
/tests/unit/common/common
|
||||
BROWSE
|
||||
Makefile
|
||||
TAGS
|
||||
|
@ -1,9 +1,14 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
gtest_apps = %w{common}
|
||||
gtest_libs = {
|
||||
'common' => [],
|
||||
}
|
||||
|
||||
namespace :tests do
|
||||
desc "Build and run the unit tests"
|
||||
task :unit => [ 'tests/unit/all' ] do
|
||||
run './tests/unit/all'
|
||||
task :unit => gtest_apps.collect { |app| "tests/unit/#{app}/#{app}" } do
|
||||
gtest_apps.each { |app| run "./tests/unit/#{app}/#{app}" }
|
||||
end
|
||||
end
|
||||
|
||||
@ -22,12 +27,14 @@ $build_system_modules[:gtest] = {
|
||||
sources([ 'lib/gtest/src' ], :type => :dir).
|
||||
create
|
||||
|
||||
Application.
|
||||
new('tests/unit/all').
|
||||
description("Build the unit tests executable").
|
||||
aliases('unit_tests').
|
||||
sources([ 'tests/unit' ], :type => :dir).
|
||||
libraries($common_libs, :gtest, :pthread).
|
||||
create
|
||||
gtest_apps.each do |app|
|
||||
Application.
|
||||
new("tests/unit/#{app}/#{app}").
|
||||
description("Build the unit tests executable for '#{app}'").
|
||||
aliases("unit_tests_#{app}").
|
||||
sources([ "tests/unit/#{app}" ], :type => :dir).
|
||||
libraries($common_libs, gtest_libs[app], :gtest, :pthread).
|
||||
create
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
9
tests/unit/common/Rakefile
Normal file
9
tests/unit/common/Rakefile
Normal file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
$build_unit_tests = true
|
||||
|
||||
import ['..', '../..', '../../..'].collect { |subdir| FileList[File.dirname(__FILE__) + "/#{subdir}/build-config.in"].to_a }.flatten.compact.first.gsub(/build-config.in/, 'Rakefile')
|
||||
|
||||
# Local Variables:
|
||||
# mode: ruby
|
||||
# End:
|
Loading…
Reference in New Issue
Block a user