author | Jon Chatten |
Fri, 09 Apr 2010 09:21:38 +0100 | |
changeset 429 | d13352a0173e |
parent 421 | 7db5250b5d4c |
permissions | -rw-r--r-- |
3 | 1 |
# |
429
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
2 |
# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 | 3 |
# All rights reserved. |
4 |
# This component and the accompanying materials are made available |
|
5 |
# under the terms of the License "Eclipse Public License v1.0" |
|
6 |
# which accompanies this distribution, and is available |
|
7 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
# |
|
9 |
# Initial Contributors: |
|
10 |
# Nokia Corporation - initial contribution. |
|
11 |
# |
|
12 |
# Contributors: |
|
13 |
# |
|
14 |
# Description: |
|
15 |
# |
|
16 |
||
17 |
from raptor_tests import SmokeTest, AntiTargetSmokeTest |
|
18 |
import os |
|
19 |
||
20 |
def run(): |
|
21 |
||
22 |
# This .inf file is created for clean_simple_export and |
|
14 | 23 |
# reallyclean_simple_export tests to use so that we can put the |
24 |
# username into the output filenames - which helps a lot when |
|
25 |
# several people run tests on the same computer (e.g. linux machines) |
|
3 | 26 |
bld = open('smoke_suite/test_resources/simple_export/expbld.inf', 'w') |
429
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
27 |
user = os.environ['USER'] |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
28 |
bld.write(""" |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
29 |
|
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
30 |
PRJ_PLATFORMS |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
31 |
ARMV5 WINSCW |
3 | 32 |
|
429
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
33 |
PRJ_MMPFILES |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
34 |
simple.mmp |
3 | 35 |
|
429
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
36 |
PRJ_EXPORTS |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
37 |
#if !defined( WINSCW ) |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
38 |
// Exports conditional on build configuration macros aren't actually supported, |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
39 |
// but we confirm that we preprocess in the context of an armv5 build when both |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
40 |
// winscw and armv5 configurations are (implicitly, as there's no "-c" argument) |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
41 |
// used. This is in order to work around assumptions currently made in the |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
42 |
// source base. |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
43 |
simple_exp1.h exported_1.h |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
44 |
#endif |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
45 |
simple_exp2.h exported_2.h |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
46 |
simple_exp3.h exported_3.h |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
47 |
executable_file executable_file |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
48 |
"file with a space.doc" "exportedfilewithspacesremoved.doc" |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
49 |
"file with a space.doc" "exported file with a space.doc" |
3 | 50 |
|
429
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
51 |
simple_exp1.h /tmp/%s/ // |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
52 |
simple_exp2.h \\tmp\\%s/ // |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
53 |
simple_exp3.h /tmp/%s/simple_exp3.h |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
54 |
simple_exp4.h // |
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
55 |
|
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
56 |
""" % (user, user, user)) |
3 | 57 |
bld.close() |
58 |
||
59 |
||
60 |
t = SmokeTest() |
|
61 |
t.id = "0023a" |
|
62 |
t.name = "export" |
|
429
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
63 |
t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf export" |
3 | 64 |
t.targets = [ |
65 |
"$(EPOCROOT)/epoc32/include/exported_1.h", |
|
66 |
"$(EPOCROOT)/epoc32/include/exported_2.h", |
|
67 |
"$(EPOCROOT)/epoc32/include/exported_3.h", |
|
68 |
"$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc", |
|
69 |
"$(EPOCROOT)/epoc32/include/exported file with a space.doc", |
|
70 |
"/tmp/$(USER)/simple_exp1.h", |
|
71 |
"/tmp/$(USER)/simple_exp2.h", |
|
72 |
"/tmp/$(USER)/simple_exp3.h", |
|
278
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
73 |
"$(EPOCROOT)/epoc32/include/executable_file", |
3 | 74 |
"$(EPOCROOT)/epoc32/include/simple_exp4.h" |
75 |
] |
|
76 |
t.run() |
|
429
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
77 |
|
3 | 78 |
|
278
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
79 |
t = SmokeTest() |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
80 |
t.id = "0023a1" |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
81 |
t.name = "export" |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
82 |
t.usebash = True |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
83 |
t.command = "ls -l ${EPOCROOT}/epoc32/include/executable_file" |
421
7db5250b5d4c
fixed permissions check for executable files exported on systems where 'ls' reports alternative access characters
Jon Chatten
parents:
289
diff
changeset
|
84 |
t.mustmatch = [ "^.rwxrwxr.x[\.\+]? .*executable_file.*$" ] |
278
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
85 |
t.targets = [] |
289
91bbfbf8c43e
Don't run executable file mode preservation test on windows since it doesn't have the concept.
timothy.murphy@nokia.com
parents:
278
diff
changeset
|
86 |
t.run("linux") |
278
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
87 |
t.usebash = False |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
88 |
|
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
89 |
|
3 | 90 |
# Testing if clean deletes any exports which it is not supposed to |
91 |
t.id = "0023b" |
|
92 |
t.name = "export_clean" |
|
429
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
93 |
t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf clean" |
278
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
94 |
t.mustmatch = [] |
3 | 95 |
t.targets = [ |
96 |
"$(EPOCROOT)/epoc32/include/exported_1.h", |
|
97 |
"$(EPOCROOT)/epoc32/include/exported_2.h", |
|
98 |
"$(EPOCROOT)/epoc32/include/exported_3.h", |
|
278
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
99 |
"$(EPOCROOT)/epoc32/include/executable_file", |
3 | 100 |
"$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc", |
101 |
"$(EPOCROOT)/epoc32/include/exported file with a space.doc", |
|
102 |
"/tmp/$(USER)/simple_exp1.h", |
|
103 |
"/tmp/$(USER)/simple_exp2.h", |
|
104 |
"/tmp/$(USER)/simple_exp3.h" |
|
105 |
] |
|
106 |
t.run() |
|
107 |
||
108 |
||
109 |
t = AntiTargetSmokeTest() |
|
110 |
t.id = "0023c" |
|
111 |
t.name = "export_reallyclean" |
|
429
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
112 |
t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf reallyclean" |
14 | 113 |
t.antitargets = [ |
114 |
'$(EPOCROOT)/epoc32/include/exported_1.h', |
|
115 |
'$(EPOCROOT)/epoc32/include/exported_2.h', |
|
116 |
'$(EPOCROOT)/epoc32/include/exported_3.h', |
|
278
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
117 |
"$(EPOCROOT)/epoc32/include/executable_file", |
14 | 118 |
'$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc', |
119 |
'$(EPOCROOT)/epoc32/include/exported file with a space.doc', |
|
120 |
'/tmp/$(USER)/simple_exp1.h', |
|
121 |
'/tmp/$(USER)/simple_exp2.h', |
|
122 |
'/tmp/$(USER)/simple_exp3.h', |
|
123 |
'$(EPOCROOT)/epoc32/include/simple_exp4.h' |
|
124 |
] |
|
125 |
t.run() |
|
126 |
||
127 |
# Check that the --noexport feature really does prevent exports from happening |
|
128 |
t = AntiTargetSmokeTest() |
|
129 |
t.id = "0023d" |
|
130 |
t.name = "export_noexport" |
|
429
d13352a0173e
Fix : sort build configurations by name for metadata preprocessing
Jon Chatten
parents:
421
diff
changeset
|
131 |
t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf --noexport -n" |
3 | 132 |
t.antitargets = [ |
133 |
'$(EPOCROOT)/epoc32/include/exported_1.h', |
|
134 |
'$(EPOCROOT)/epoc32/include/exported_2.h', |
|
135 |
'$(EPOCROOT)/epoc32/include/exported_3.h', |
|
278
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
136 |
"$(EPOCROOT)/epoc32/include/executable_file", |
3 | 137 |
'$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc', |
138 |
'$(EPOCROOT)/epoc32/include/exported file with a space.doc', |
|
139 |
'/tmp/$(USER)/simple_exp1.h', |
|
140 |
'/tmp/$(USER)/simple_exp2.h', |
|
141 |
'/tmp/$(USER)/simple_exp3.h', |
|
142 |
'$(EPOCROOT)/epoc32/include/simple_exp4.h' |
|
143 |
] |
|
144 |
t.run() |
|
145 |
||
146 |
t.id = "23" |
|
147 |
t.name = "export" |
|
148 |
t.print_result() |
|
149 |
return t |