Update ref for Scilab 6
[scilab.git] / scilab / modules / atoms / tests / unit_tests / atomsInstall.tst
1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2009 - DIGITEO - Pierre MARECHAL <pierre.marechal@scilab.org>
4 //
5 //  This file is distributed under the same license as the Scilab package.
6 // =============================================================================
7
8 // <-- ENGLISH IMPOSED -->
9 // <-- CLI SHELL MODE -->
10
11 load("SCI/modules/atoms/macros/atoms_internals/lib");
12
13 // If previous test did not end properly, restore, else backup config file
14 atomsRestoreConfig(%T);
15 atomsSaveConfig();
16
17 // Do not use the autoload system
18 atomsSetConfig("autoloadAddAfterInstall","False");
19 atomsSetConfig("Verbose" ,"False");
20
21 // Load the 1st scenario : See scene10.test.atoms.scilab.org.txt
22 atomsRepositorySetOfl("http://scene10.test.atoms.scilab.org");
23
24 // Install the toolbox 5
25 // =============================================================================
26
27 atomsInstall("toolbox_5");
28
29 // Check if the module is really installed
30 if ~atomsIsInstalled("toolbox_5")           then pause, end
31 if ~atomsIsInstalled(["toolbox_5" "1.0"])   then pause, end
32 if ~atomsIsInstalled(["toolbox_5" "1.0-1"]) then pause, end
33 if ~atomsIsInstalled("toolbox_4")           then pause, end
34 if ~atomsIsInstalled("toolbox_2")           then pause, end
35 if ~atomsIsInstalled("toolbox_1")           then pause, end
36
37 // Remove the module
38 atomsRemove("toolbox_5");
39
40 // Install the toolbox 5 (version is mentioned)
41 // =============================================================================
42
43 atomsInstall(["toolbox_5" "1.0"]);
44
45 // Check if the module is really installed
46 if ~atomsIsInstalled("toolbox_5")           then pause, end
47 if ~atomsIsInstalled(["toolbox_5" "1.0"])   then pause, end
48 if ~atomsIsInstalled(["toolbox_5" "1.0-1"]) then pause, end
49 if ~atomsIsInstalled("toolbox_4")           then pause, end
50 if ~atomsIsInstalled("toolbox_2")           then pause, end
51 if ~atomsIsInstalled("toolbox_1")           then pause, end
52
53 // Remove the module
54 atomsRemove("toolbox_5");
55
56 // Install the toolbox 5 (version + packaging version are mentioned)
57 // =============================================================================
58
59 atomsInstall(["toolbox_5" "1.0-1"]);
60
61 // Check if the module is really installed
62 if ~atomsIsInstalled("toolbox_5")           then pause, end
63 if ~atomsIsInstalled(["toolbox_5" "1.0"])   then pause, end
64 if ~atomsIsInstalled(["toolbox_5" "1.0-1"]) then pause, end
65 if ~atomsIsInstalled("toolbox_4")           then pause, end
66 if ~atomsIsInstalled("toolbox_2")           then pause, end
67 if ~atomsIsInstalled("toolbox_1")           then pause, end
68
69 // Remove the module
70 atomsRemove("toolbox_5");
71
72 // Install the toolbox 5 (user section)
73 // =============================================================================
74
75 atomsInstall("toolbox_5","user");
76
77 if ~atomsIsInstalled("toolbox_5","user") then pause, end
78 if ~atomsIsInstalled("toolbox_4","user") then pause, end
79 if ~atomsIsInstalled("toolbox_2","user") then pause, end
80 if ~atomsIsInstalled("toolbox_1","user") then pause, end
81
82 if atomsIsInstalled("toolbox_5","allusers") then pause, end
83 if atomsIsInstalled("toolbox_4","allusers") then pause, end
84 if atomsIsInstalled("toolbox_2","allusers") then pause, end
85 if atomsIsInstalled("toolbox_1","allusers") then pause, end
86
87 atomsRemove("toolbox_5","user");
88
89 if atomsIsInstalled("toolbox_5","user") then pause, end
90 if atomsIsInstalled("toolbox_4","user") then pause, end
91 if atomsIsInstalled("toolbox_2","user") then pause, end
92 if atomsIsInstalled("toolbox_1","user") then pause, end
93
94 // Install the toolbox 5 (allusers section)
95 // =============================================================================
96
97 atomsInstall("toolbox_5","allusers");
98
99 if ~atomsIsInstalled("toolbox_5","allusers") then pause, end
100 if ~atomsIsInstalled("toolbox_4","allusers") then pause, end
101 if ~atomsIsInstalled("toolbox_2","allusers") then pause, end
102 if ~atomsIsInstalled("toolbox_1","allusers") then pause, end
103
104 if atomsIsInstalled("toolbox_5","user") then pause, end
105 if atomsIsInstalled("toolbox_4","user") then pause, end
106 if atomsIsInstalled("toolbox_2","user") then pause, end
107 if atomsIsInstalled("toolbox_1","user") then pause, end
108
109 atomsRemove("toolbox_5","allusers");
110
111 if atomsIsInstalled("toolbox_5","allusers") then pause, end
112 if atomsIsInstalled("toolbox_4","allusers") then pause, end
113 if atomsIsInstalled("toolbox_2","allusers") then pause, end
114 if atomsIsInstalled("toolbox_1","allusers") then pause, end
115
116 // Install the toolbox 5 (Both section)
117 // =============================================================================
118
119 atomsInstall("toolbox_5","allusers");
120 atomsInstall("toolbox_5","user");
121
122 if ~atomsIsInstalled("toolbox_5","allusers") then pause, end
123 if ~atomsIsInstalled("toolbox_4","allusers") then pause, end
124 if ~atomsIsInstalled("toolbox_2","allusers") then pause, end
125 if ~atomsIsInstalled("toolbox_1","allusers") then pause, end
126
127 if ~atomsIsInstalled("toolbox_5","user") then pause, end
128 if ~atomsIsInstalled("toolbox_4","user") then pause, end
129 if ~atomsIsInstalled("toolbox_2","user") then pause, end
130 if ~atomsIsInstalled("toolbox_1","user") then pause, end
131
132 atomsRemove("toolbox_5","allusers");
133 if atomsIsInstalled("toolbox_5","allusers") then pause, end
134 if atomsIsInstalled("toolbox_4","allusers") then pause, end
135 if atomsIsInstalled("toolbox_2","allusers") then pause, end
136 if atomsIsInstalled("toolbox_1","allusers") then pause, end
137
138 if ~atomsIsInstalled("toolbox_5","user") then pause, end
139 if ~atomsIsInstalled("toolbox_4","user") then pause, end
140 if ~atomsIsInstalled("toolbox_2","user") then pause, end
141 if ~atomsIsInstalled("toolbox_1","user") then pause, end
142
143 atomsInstall("toolbox_5","allusers");
144 atomsRemove("toolbox_5","user");
145
146 if atomsIsInstalled("toolbox_5","user") then pause, end
147 if atomsIsInstalled("toolbox_4","user") then pause, end
148 if atomsIsInstalled("toolbox_2","user") then pause, end
149 if atomsIsInstalled("toolbox_1","user") then pause, end
150
151 if ~atomsIsInstalled("toolbox_5","allusers") then pause, end
152 if ~atomsIsInstalled("toolbox_4","allusers") then pause, end
153 if ~atomsIsInstalled("toolbox_2","allusers") then pause, end
154 if ~atomsIsInstalled("toolbox_1","allusers") then pause, end
155
156 atomsRemove("toolbox_5","allusers");
157
158 // Install the toolbox 7 (Local package)
159 // =============================================================================
160
161 atomsInstall(SCI+"/modules/atoms/tests/unit_tests/toolbox_7_1.0-1.bin.zip","allusers");
162 atomsInstall(SCI+"/modules/atoms/tests/unit_tests/toolbox_7_1.0-1.bin.zip","user");
163
164 if ~atomsIsInstalled("toolbox_7","allusers") then pause, end
165 if ~atomsIsInstalled("toolbox_7","user")     then pause, end
166
167 atomsRemove("toolbox_7","allusers");
168
169 if atomsIsInstalled("toolbox_7","allusers")  then pause, end
170 if ~atomsIsInstalled("toolbox_7","user")     then pause, end
171
172 atomsInstall(SCI+"/modules/atoms/tests/unit_tests/toolbox_7_1.0-1.bin.zip","allusers");
173 atomsRemove("toolbox_7","user");
174
175 if atomsIsInstalled("toolbox_7","user")      then pause, end
176 if ~atomsIsInstalled("toolbox_7","allusers") then pause, end
177
178 atomsRemove("toolbox_7","allusers");
179
180 // Restore original values
181 // =============================================================================
182 atomsRestoreConfig(%T);
183
184 atomsRepositorySetOfl(mgetl(SCI+"/modules/atoms/tests/unit_tests/repositories.orig"));