Moved acceptance tests into tests/acceptance

This commit is contained in:
Alex Young
2012-07-03 10:59:31 +01:00
parent c0c9c6f076
commit 988b2ec014
20 changed files with 3 additions and 5 deletions

View File

@@ -11,9 +11,7 @@ ALL_SOURCES =FileList['src/*']
SOURCES = ALL_SOURCES.select { |c| c =~ /\.c$/ } SOURCES = ALL_SOURCES.select { |c| c =~ /\.c$/ }
OBJECTS = SOURCES.pathmap( "%{^src,build}X.o" ) OBJECTS = SOURCES.pathmap( "%{^src,build}X.o" )
TEST_SOURCES = FileList['tests/unit/*.c'] TEST_SOURCES = FileList['tests/unit/*.c']
p TEST_SOURCES
TEST_OBJECTS = TEST_SOURCES.pathmap( "%{^tests/unit,build/tests}X.o" ) TEST_OBJECTS = TEST_SOURCES.pathmap( "%{^tests/unit,build/tests}X.o" )
p TEST_OBJECTS
LIBS = %w( pthread ) LIBS = %w( pthread )
CCFLAGS = %w( CCFLAGS = %w(
@@ -68,7 +66,7 @@ namespace "test" do
desc "Run NBD test scenarios" desc "Run NBD test scenarios"
task 'scenarios' => 'flexnbd' do task 'scenarios' => 'flexnbd' do
sh "cd tests; ruby nbd_scenarios" sh "cd tests/acceptance; ruby nbd_scenarios"
end end
end end

View File

@@ -16,8 +16,8 @@ class Environment
@available_ports = [*40000..41000] - listening_ports @available_ports = [*40000..41000] - listening_ports
@port1 = @available_ports.shift @port1 = @available_ports.shift
@port2 = @available_ports.shift @port2 = @available_ports.shift
@nbd1 = FlexNBD.new("../build/flexnbd", @ip, @port1) @nbd1 = FlexNBD.new("../../build/flexnbd", @ip, @port1)
@nbd2 = FlexNBD.new("../build/flexnbd", @ip, @port2) @nbd2 = FlexNBD.new("../../build/flexnbd", @ip, @port2)
@fake_pid = nil @fake_pid = nil
end end