First few external tests with test/unit, some minor tidying of internal data

structures.
This commit is contained in:
Matthew Bloch
2012-05-24 01:39:35 +01:00
parent d5d6e0f55d
commit 5a5041a751
8 changed files with 300 additions and 23 deletions

View File

@@ -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
).