First few external tests with test/unit, some minor tidying of internal data
structures.
This commit is contained in:
11
Rakefile
11
Rakefile
@@ -17,13 +17,20 @@ end
|
||||
rule 'default' => 'flexnbd'
|
||||
|
||||
namespace "test" do
|
||||
task 'run' => ["unit", "scenarios"]
|
||||
|
||||
task 'build' => TEST_MODULES.map { |n| "tests/check_#{n}" }
|
||||
task 'run' => 'build' do
|
||||
|
||||
task 'unit' => 'build' do
|
||||
TEST_MODULES.each do |n|
|
||||
ENV['EF_DISABLE_BANNER'] = '1'
|
||||
sh "./tests/check_#{n}"
|
||||
end
|
||||
end
|
||||
|
||||
task 'scenarios' do
|
||||
sh "cd tests; ruby nbd_scenarios"
|
||||
end
|
||||
end
|
||||
|
||||
def gcc_link(target, objects)
|
||||
@@ -46,7 +53,7 @@ rule '.o' => '.c' do |t|
|
||||
end
|
||||
|
||||
rule 'clean' do
|
||||
sh "rm -f flexnbd " + (
|
||||
sh "rm -f *~ flexnbd " + (
|
||||
OBJECTS +
|
||||
TEST_MODULES.map { |n| ["tests/check_#{n}", "tests/check_#{n}.o"] }.flatten
|
||||
).
|
||||
|
Reference in New Issue
Block a user