build-tool 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +27 -0
- data/KNOWN_PROBLEMS +0 -3
- data/Manifest.txt +0 -16
- data/Rakefile +3 -2
- data/lib/build-tool.rb +1 -1
- data/lib/build-tool/build-system/autoconf.rb +2 -2
- data/lib/build-tool/build-system/base.rb +1 -29
- data/lib/build-tool/build-system/make.rb +2 -0
- data/lib/build-tool/command_actions.rb +7 -4
- data/lib/build-tool/commands.rb +70 -25
- data/lib/build-tool/commands/build.rb +7 -2
- data/lib/build-tool/commands/configure.rb +6 -2
- data/lib/build-tool/commands/fetch.rb +1 -1
- data/lib/build-tool/commands/history.rb +3 -3
- data/lib/build-tool/commands/rebase.rb +9 -6
- data/lib/build-tool/commands/recipes/info.rb +1 -3
- data/lib/build-tool/module.rb +19 -4
- data/lib/build-tool/recipe.rb +15 -2
- data/lib/build-tool/vcs/archive.rb +1 -1
- data/lib/build-tool/vcs/base.rb +10 -2
- data/lib/build-tool/vcs/git-svn.rb +9 -1
- data/lib/build-tool/vcs/git.rb +16 -4
- data/lib/build-tool/vcs/svn.rb +2 -2
- data/lib/mj/logging.rb +34 -0
- metadata +122 -185
- data.tar.gz.sig +0 -3
- data/.gemtest +0 -0
- data/tasks/rspec.rake +0 -22
- data/test/commands/test_build.rb +0 -29
- data/test/test_build_system.rb +0 -98
- data/test/test_cli.rb +0 -61
- data/test/test_command.rb +0 -175
- data/test/test_configuration_parser.rb +0 -597
- data/test/test_environment.rb +0 -82
- data/test/test_feature.rb +0 -34
- data/test/test_helper.rb +0 -46
- data/test/test_history.rb +0 -149
- data/test/test_module.rb +0 -158
- data/test/test_repository.rb +0 -75
- data/test/test_singleton.rb +0 -51
- data/test/test_ssh_key.rb +0 -14
- data/test/test_svn_parser.rb +0 -28
- data/test/test_vcs.rb +0 -33
- metadata.gz.sig +0 -2
data/test/test_repository.rb
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
require 'pathname'
|
2
|
-
require Pathname.new( File.dirname(__FILE__)).join( 'test_helper' ).cleanpath
|
3
|
-
|
4
|
-
require 'build-tool/repository'
|
5
|
-
require 'build-tool/server'
|
6
|
-
require 'build-tool/sshkey'
|
7
|
-
|
8
|
-
class TestRepository < Test::Unit::TestCase
|
9
|
-
|
10
|
-
# Test a simple default created object
|
11
|
-
def test_simple_creation
|
12
|
-
repo = BuildTool::Repository.new('anonsvn.kde.org')
|
13
|
-
# Check that all available properties are initialized correctly
|
14
|
-
assert_nil repo.server
|
15
|
-
assert_nil repo.path
|
16
|
-
assert_equal repo.name, 'anonsvn.kde.org'
|
17
|
-
|
18
|
-
assert_raise StandardError do
|
19
|
-
BuildTool::Repository.new(nil)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
# Test all properties for required behaviour
|
24
|
-
def test_properties
|
25
|
-
repo = BuildTool::Repository.new('kde.org')
|
26
|
-
server = BuildTool::Server.new('anonsvn.kde.org')
|
27
|
-
|
28
|
-
# It's not allowed to change the name
|
29
|
-
assert !repo.respond_to?( 'name=' )
|
30
|
-
|
31
|
-
server.protocol = "http"
|
32
|
-
assert_equal server.protocol, "http"
|
33
|
-
|
34
|
-
repo.server = server
|
35
|
-
assert_equal repo.server, server
|
36
|
-
|
37
|
-
repo.path = "home/kde"
|
38
|
-
assert_equal repo.path, "home/kde"
|
39
|
-
|
40
|
-
sshkey = BuildTool::SshKey.new( "user@example.com", "~/.ssh/id_dsa" )
|
41
|
-
assert_nil repo.sshkey
|
42
|
-
repo.sshkey = sshkey
|
43
|
-
assert_equal repo.sshkey, sshkey
|
44
|
-
end
|
45
|
-
|
46
|
-
def test_url
|
47
|
-
repo = BuildTool::Repository.new "kde"
|
48
|
-
server = BuildTool::Server.new('anonsvn.kde.org')
|
49
|
-
|
50
|
-
assert_raises BuildTool::ConfigurationError do
|
51
|
-
repo.url
|
52
|
-
end
|
53
|
-
|
54
|
-
repo.server = server
|
55
|
-
assert_raises BuildTool::ConfigurationError do
|
56
|
-
repo.url
|
57
|
-
end
|
58
|
-
server.host = "anonsvn.kde.org"
|
59
|
-
assert_equal "anonsvn.kde.org", repo.url
|
60
|
-
|
61
|
-
repo.user = "mjansen"
|
62
|
-
assert_equal "mjansen@anonsvn.kde.org", repo.url
|
63
|
-
|
64
|
-
server.protocol = "http"
|
65
|
-
assert_equal "http://mjansen@anonsvn.kde.org", repo.url
|
66
|
-
|
67
|
-
repo.user = nil
|
68
|
-
assert_equal "http://anonsvn.kde.org", repo.url
|
69
|
-
|
70
|
-
repo.path = "home/kde"
|
71
|
-
assert_equal "http://anonsvn.kde.org/home/kde", repo.url
|
72
|
-
end
|
73
|
-
|
74
|
-
|
75
|
-
end
|
data/test/test_singleton.rb
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
require 'pathname'
|
2
|
-
require Pathname.new( File.dirname(__FILE__)).join( 'test_helper' ).cleanpath
|
3
|
-
|
4
|
-
require 'build-tool/singleton'
|
5
|
-
|
6
|
-
class TestSingleton < Test::Unit::TestCase
|
7
|
-
|
8
|
-
class Child1 < BuildTool::Singleton
|
9
|
-
end
|
10
|
-
|
11
|
-
class GrandChild1 < Child1
|
12
|
-
end
|
13
|
-
|
14
|
-
class Child2 < BuildTool::Singleton
|
15
|
-
end
|
16
|
-
|
17
|
-
class GrandChild2 < Child2
|
18
|
-
end
|
19
|
-
def test_singletion
|
20
|
-
|
21
|
-
|
22
|
-
c1 = Child1.new
|
23
|
-
c1.instance
|
24
|
-
assert_equal c1.instance, Child1.instance
|
25
|
-
|
26
|
-
assert_raise StandardError do
|
27
|
-
Child1.new
|
28
|
-
end
|
29
|
-
|
30
|
-
assert_raise StandardError do
|
31
|
-
gc = GrandChild1.new
|
32
|
-
end
|
33
|
-
|
34
|
-
|
35
|
-
gc2 = GrandChild2.new
|
36
|
-
assert_equal gc2.instance, Child2.instance
|
37
|
-
assert_equal gc2.instance, GrandChild2.instance
|
38
|
-
|
39
|
-
assert_not_equal Child1.instance, GrandChild2.instance
|
40
|
-
|
41
|
-
gc2.destroy
|
42
|
-
assert_nil gc2.instance
|
43
|
-
assert_nil Child2.instance
|
44
|
-
assert_nil GrandChild2.instance
|
45
|
-
|
46
|
-
gc2_new = GrandChild2.new
|
47
|
-
assert_equal gc2_new.instance, Child2.instance
|
48
|
-
assert_equal gc2_new.instance, GrandChild2.instance
|
49
|
-
end
|
50
|
-
|
51
|
-
end
|
data/test/test_ssh_key.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'pathname'
|
2
|
-
require Pathname.new( File.dirname(__FILE__)).join( 'test_helper' ).cleanpath
|
3
|
-
|
4
|
-
require 'build-tool/sshkey'
|
5
|
-
|
6
|
-
class TestSshKey < Test::Unit::TestCase
|
7
|
-
|
8
|
-
def test_initialization
|
9
|
-
sshkey = BuildTool::SshKey.new( "user@domain", "~/.ssh/id_dsa" )
|
10
|
-
assert_equal "user@domain", sshkey.name
|
11
|
-
assert_equal "~/.ssh/id_dsa", sshkey.file
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
data/test/test_svn_parser.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
require 'pathname'
|
2
|
-
require Pathname.new( File.dirname(__FILE__)).join( 'test_helper' ).cleanpath
|
3
|
-
|
4
|
-
# require 'build-tool/cfg/svn_parser'
|
5
|
-
|
6
|
-
class TestSvnParser < Test::Unit::TestCase
|
7
|
-
|
8
|
-
@@test_config_1 = <<-EOS
|
9
|
-
vcs svn
|
10
|
-
repository kde
|
11
|
-
server "anonsvn.kde.org"
|
12
|
-
protocol "svn"
|
13
|
-
host "anonsvn.kde.org"
|
14
|
-
end
|
15
|
-
path "home/kde/trunk"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
EOS
|
19
|
-
|
20
|
-
|
21
|
-
def test_configuration
|
22
|
-
# parser = BuildTool::Cfg::SvnParser.new
|
23
|
-
# # puts parser.methods.sort
|
24
|
-
# parser.parse_string( @@test_config_1, "test_config_1" )
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|
28
|
-
|
data/test/test_vcs.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
require 'pathname'
|
2
|
-
require Pathname.new( File.dirname(__FILE__)).join( 'test_helper' ).cleanpath
|
3
|
-
|
4
|
-
require 'build-tool/repository'
|
5
|
-
require 'build-tool/module'
|
6
|
-
require 'build-tool/server'
|
7
|
-
require 'build-tool/vcs/git-svn'
|
8
|
-
|
9
|
-
class TestVcs < Test::Unit::TestCase
|
10
|
-
|
11
|
-
def initialize( *args )
|
12
|
-
super
|
13
|
-
@server = BuildTool::Server.new( "anonsvn.kde.org" )
|
14
|
-
@server.protocol = "svn+ssh"
|
15
|
-
@server.path = "/home/kde"
|
16
|
-
|
17
|
-
@repo = BuildTool::Repository.new( 'kde' )
|
18
|
-
@repo.server = @server
|
19
|
-
@repo.user = "mjansen"
|
20
|
-
end
|
21
|
-
|
22
|
-
# *TODO* More tests
|
23
|
-
def test_git_svn
|
24
|
-
mod = BuildTool::Module.new( "test" )
|
25
|
-
mod.repository= @repo
|
26
|
-
mod.build_prefix = "~/build"
|
27
|
-
config = BuildTool::VCS::GitSvnConfiguration.new( mod )
|
28
|
-
config.add_external( "kwin/client/nitrogen", "http://some.svn.server/ddjdjd" )
|
29
|
-
gitsvn = BuildTool::VCS::GitSvn.new( config )
|
30
|
-
assert( !gitsvn.checkedout? )
|
31
|
-
end
|
32
|
-
|
33
|
-
end
|
metadata.gz.sig
DELETED