author | timothy.murphy@nokia.com |
Mon, 01 Mar 2010 16:23:33 +0000 | |
branch | fix |
changeset 289 | 91bbfbf8c43e |
parent 278 | c38bfd29ee57 |
child 421 | 7db5250b5d4c |
permissions | -rw-r--r-- |
3 | 1 |
# |
2 |
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
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 |
result = SmokeTest.PASS |
|
22 |
||
23 |
# This .inf file is created for clean_simple_export and |
|
14 | 24 |
# reallyclean_simple_export tests to use so that we can put the |
25 |
# username into the output filenames - which helps a lot when |
|
26 |
# several people run tests on the same computer (e.g. linux machines) |
|
3 | 27 |
bld = open('smoke_suite/test_resources/simple_export/expbld.inf', 'w') |
28 |
bld.write("PRJ_PLATFORMS\n" |
|
29 |
"ARMV5 WINSCW\n\n" |
|
30 |
||
31 |
"PRJ_MMPFILES\n" |
|
32 |
"simple.mmp\n\n" |
|
33 |
||
34 |
"PRJ_EXPORTS\n" |
|
35 |
"simple_exp1.h exported_1.h\n" |
|
36 |
"simple_exp2.h exported_2.h\n" |
|
37 |
"simple_exp3.h exported_3.h\n" |
|
278
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
38 |
"executable_file executable_file\n" |
3 | 39 |
'"file with a space.doc" "exportedfilewithspacesremoved.doc"\n' |
40 |
'"file with a space.doc" "exported file with a space.doc"\n\n' |
|
41 |
||
42 |
"simple_exp1.h /tmp/"+os.environ['USER']+"/ //\n" |
|
43 |
"simple_exp2.h \\tmp\\"+os.environ['USER']+"/ //\n" |
|
44 |
"simple_exp3.h /tmp/"+os.environ['USER']+"/simple_exp3.h \n" |
|
45 |
"simple_exp4.h //") |
|
46 |
bld.close() |
|
47 |
||
48 |
||
49 |
t = SmokeTest() |
|
50 |
t.id = "0023a" |
|
51 |
t.name = "export" |
|
52 |
t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \ |
|
53 |
+ "-c armv5 EXPORT" |
|
54 |
t.targets = [ |
|
55 |
"$(EPOCROOT)/epoc32/include/exported_1.h", |
|
56 |
"$(EPOCROOT)/epoc32/include/exported_2.h", |
|
57 |
"$(EPOCROOT)/epoc32/include/exported_3.h", |
|
58 |
"$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc", |
|
59 |
"$(EPOCROOT)/epoc32/include/exported file with a space.doc", |
|
60 |
"/tmp/$(USER)/simple_exp1.h", |
|
61 |
"/tmp/$(USER)/simple_exp2.h", |
|
62 |
"/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
|
63 |
"$(EPOCROOT)/epoc32/include/executable_file", |
3 | 64 |
"$(EPOCROOT)/epoc32/include/simple_exp4.h" |
65 |
] |
|
66 |
t.run() |
|
67 |
if t.result == SmokeTest.FAIL: |
|
68 |
result = SmokeTest.FAIL |
|
69 |
||
70 |
||
278
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
71 |
t = SmokeTest() |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
72 |
t.id = "0023a1" |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
73 |
t.name = "export" |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
74 |
t.usebash = True |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
75 |
t.command = "ls -l ${EPOCROOT}/epoc32/include/executable_file" |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
76 |
t.mustmatch = [ "^.rwxrwxr.x .*executable_file.*$" ] |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
77 |
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
|
78 |
t.run("linux") |
278
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
79 |
t.usebash = False |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
80 |
|
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
81 |
if t.result == SmokeTest.FAIL: |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
82 |
result = SmokeTest.FAIL |
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
83 |
|
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
84 |
|
3 | 85 |
# Testing if clean deletes any exports which it is not supposed to |
86 |
t.id = "0023b" |
|
87 |
t.name = "export_clean" |
|
88 |
t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \ |
|
14 | 89 |
+ "-c armv5 clean" |
278
c38bfd29ee57
SF Bug 2081 - [Raptor] - Exported file executable permissions not maintained (linux)
timothy.murphy@nokia.com
parents:
14
diff
changeset
|
90 |
t.mustmatch = [] |
3 | 91 |
t.targets = [ |
92 |
"$(EPOCROOT)/epoc32/include/exported_1.h", |
|
93 |
"$(EPOCROOT)/epoc32/include/exported_2.h", |
|
94 |
"$(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
|
95 |
"$(EPOCROOT)/epoc32/include/executable_file", |
3 | 96 |
"$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc", |
97 |
"$(EPOCROOT)/epoc32/include/exported file with a space.doc", |
|
98 |
"/tmp/$(USER)/simple_exp1.h", |
|
99 |
"/tmp/$(USER)/simple_exp2.h", |
|
100 |
"/tmp/$(USER)/simple_exp3.h" |
|
101 |
] |
|
102 |
t.run() |
|
103 |
if t.result == SmokeTest.FAIL: |
|
104 |
result = SmokeTest.FAIL |
|
105 |
||
106 |
||
107 |
t = AntiTargetSmokeTest() |
|
108 |
t.id = "0023c" |
|
109 |
t.name = "export_reallyclean" |
|
110 |
t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \ |
|
14 | 111 |
+ "-c armv5 reallyclean" |
112 |
t.antitargets = [ |
|
113 |
'$(EPOCROOT)/epoc32/include/exported_1.h', |
|
114 |
'$(EPOCROOT)/epoc32/include/exported_2.h', |
|
115 |
'$(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
|
116 |
"$(EPOCROOT)/epoc32/include/executable_file", |
14 | 117 |
'$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc', |
118 |
'$(EPOCROOT)/epoc32/include/exported file with a space.doc', |
|
119 |
'/tmp/$(USER)/simple_exp1.h', |
|
120 |
'/tmp/$(USER)/simple_exp2.h', |
|
121 |
'/tmp/$(USER)/simple_exp3.h', |
|
122 |
'$(EPOCROOT)/epoc32/include/simple_exp4.h' |
|
123 |
] |
|
124 |
t.run() |
|
125 |
if t.result == SmokeTest.FAIL: |
|
126 |
result = SmokeTest.FAIL |
|
127 |
||
128 |
# Check that the --noexport feature really does prevent exports from happening |
|
129 |
t = AntiTargetSmokeTest() |
|
130 |
t.id = "0023d" |
|
131 |
t.name = "export_noexport" |
|
132 |
t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \ |
|
133 |
+ "-c armv5 --noexport -n" |
|
3 | 134 |
t.antitargets = [ |
135 |
'$(EPOCROOT)/epoc32/include/exported_1.h', |
|
136 |
'$(EPOCROOT)/epoc32/include/exported_2.h', |
|
137 |
'$(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
|
138 |
"$(EPOCROOT)/epoc32/include/executable_file", |
3 | 139 |
'$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc', |
140 |
'$(EPOCROOT)/epoc32/include/exported file with a space.doc', |
|
141 |
'/tmp/$(USER)/simple_exp1.h', |
|
142 |
'/tmp/$(USER)/simple_exp2.h', |
|
143 |
'/tmp/$(USER)/simple_exp3.h', |
|
144 |
'$(EPOCROOT)/epoc32/include/simple_exp4.h' |
|
145 |
] |
|
146 |
t.run() |
|
147 |
if t.result == SmokeTest.FAIL: |
|
148 |
result = SmokeTest.FAIL |
|
149 |
||
150 |
t.id = "23" |
|
151 |
t.name = "export" |
|
152 |
t.result = result |
|
153 |
t.print_result() |
|
154 |
return t |