line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Tapper::Installer::Precondition::Simnow; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
1
|
|
|
1
|
|
58688
|
$Tapper::Installer::Precondition::Simnow::AUTHORITY = 'cpan:TAPPER'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
$Tapper::Installer::Precondition::Simnow::VERSION = '4.1.1'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
902
|
use Moose; |
|
1
|
|
|
|
|
485838
|
|
|
1
|
|
|
|
|
10
|
|
10
|
1
|
|
|
1
|
|
8358
|
use common::sense; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
5
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
608
|
use Tapper::Installer::Precondition::PRC; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use YAML; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
extends 'Tapper::Installer::Precondition'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub create_simnow_config |
21
|
|
|
|
|
|
|
{ |
22
|
|
|
|
|
|
|
my ($self, $config) = @_; |
23
|
|
|
|
|
|
|
my $simnow_script = $config->{files}{simnow_script} || 'startup.simnow'; |
24
|
|
|
|
|
|
|
$config->{files}{simnow_script} = $config->{paths}{simnow_path}."/scripts/$simnow_script"; |
25
|
|
|
|
|
|
|
return $config; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub install |
32
|
|
|
|
|
|
|
{ |
33
|
|
|
|
|
|
|
my ($self, $simnow) = @_; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my $config; |
36
|
|
|
|
|
|
|
my $prc = Tapper::Installer::Precondition::PRC->new($self->cfg); |
37
|
|
|
|
|
|
|
$config = $prc->create_common_config(); |
38
|
|
|
|
|
|
|
$config = $self->create_simnow_config($config); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
my $config_file = $self->cfg->{files}{simnow_config}; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
YAML::DumpFile($config_file, $config); |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
return 0; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |
52
|
|
|
|
|
|
|
=pod |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=encoding utf-8 |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 NAME |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Tapper::Installer::Precondition::Simnow |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 SYNOPSIS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
use Tapper::Installer::Precondition::Simnow; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 NAME |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Tapper::Installer::Precondition::Simnow - Generate configs for Simnow |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 FUNCTIONS |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 create_simnow_config |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 install |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Install the tools used to control running of programs on the test |
75
|
|
|
|
|
|
|
system. This function is implemented to fullfill the needs of kernel |
76
|
|
|
|
|
|
|
testing and is likely to change dramatically in the future due to |
77
|
|
|
|
|
|
|
limited extensibility. Furthermore, it has the name of the PRC hard |
78
|
|
|
|
|
|
|
coded which isn't a good thing either. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
@param hash ref - contains all information about the simnow instance |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
@return success - 0 |
83
|
|
|
|
|
|
|
@return error - error string |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 AUTHOR |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
AMD OSRC Tapper Team, C<< <tapper at amd64.org> >> |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 BUGS |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
None. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head1 SUPPORT |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
perldoc Tapper |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Copyright 2008-2011 AMD OSRC Tapper Team, all rights reserved. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
This program is released under the following license: freebsd |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 AUTHOR |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
AMD OSRC Tapper Team <tapper@amd64.org> |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
This software is Copyright (c) 2012 by Advanced Micro Devices, Inc.. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
This is free software, licensed under: |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
The (two-clause) FreeBSD License |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=cut |
120
|
|
|
|
|
|
|
|