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"
|
|
38 |
'"file with a space.doc" "exportedfilewithspacesremoved.doc"\n'
|
|
39 |
'"file with a space.doc" "exported file with a space.doc"\n\n'
|
|
40 |
|
|
41 |
"simple_exp1.h /tmp/"+os.environ['USER']+"/ //\n"
|
|
42 |
"simple_exp2.h \\tmp\\"+os.environ['USER']+"/ //\n"
|
|
43 |
"simple_exp3.h /tmp/"+os.environ['USER']+"/simple_exp3.h \n"
|
|
44 |
"simple_exp4.h //")
|
|
45 |
bld.close()
|
|
46 |
|
|
47 |
|
|
48 |
t = SmokeTest()
|
|
49 |
t.id = "0023a"
|
|
50 |
t.name = "export"
|
|
51 |
t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \
|
|
52 |
+ "-c armv5 EXPORT"
|
|
53 |
t.targets = [
|
|
54 |
"$(EPOCROOT)/epoc32/include/exported_1.h",
|
|
55 |
"$(EPOCROOT)/epoc32/include/exported_2.h",
|
|
56 |
"$(EPOCROOT)/epoc32/include/exported_3.h",
|
|
57 |
"$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc",
|
|
58 |
"$(EPOCROOT)/epoc32/include/exported file with a space.doc",
|
|
59 |
"/tmp/$(USER)/simple_exp1.h",
|
|
60 |
"/tmp/$(USER)/simple_exp2.h",
|
|
61 |
"/tmp/$(USER)/simple_exp3.h",
|
|
62 |
"$(EPOCROOT)/epoc32/include/simple_exp4.h"
|
|
63 |
]
|
|
64 |
t.run()
|
|
65 |
if t.result == SmokeTest.FAIL:
|
|
66 |
result = SmokeTest.FAIL
|
|
67 |
|
|
68 |
|
|
69 |
# Testing if clean deletes any exports which it is not supposed to
|
|
70 |
t.id = "0023b"
|
|
71 |
t.name = "export_clean"
|
|
72 |
t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \
|
14
|
73 |
+ "-c armv5 clean"
|
3
|
74 |
t.targets = [
|
|
75 |
"$(EPOCROOT)/epoc32/include/exported_1.h",
|
|
76 |
"$(EPOCROOT)/epoc32/include/exported_2.h",
|
|
77 |
"$(EPOCROOT)/epoc32/include/exported_3.h",
|
|
78 |
"$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc",
|
|
79 |
"$(EPOCROOT)/epoc32/include/exported file with a space.doc",
|
|
80 |
"/tmp/$(USER)/simple_exp1.h",
|
|
81 |
"/tmp/$(USER)/simple_exp2.h",
|
|
82 |
"/tmp/$(USER)/simple_exp3.h"
|
|
83 |
]
|
|
84 |
t.run()
|
|
85 |
if t.result == SmokeTest.FAIL:
|
|
86 |
result = SmokeTest.FAIL
|
|
87 |
|
|
88 |
|
|
89 |
t = AntiTargetSmokeTest()
|
|
90 |
t.id = "0023c"
|
|
91 |
t.name = "export_reallyclean"
|
|
92 |
t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \
|
14
|
93 |
+ "-c armv5 reallyclean"
|
|
94 |
t.antitargets = [
|
|
95 |
'$(EPOCROOT)/epoc32/include/exported_1.h',
|
|
96 |
'$(EPOCROOT)/epoc32/include/exported_2.h',
|
|
97 |
'$(EPOCROOT)/epoc32/include/exported_3.h',
|
|
98 |
'$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc',
|
|
99 |
'$(EPOCROOT)/epoc32/include/exported file with a space.doc',
|
|
100 |
'/tmp/$(USER)/simple_exp1.h',
|
|
101 |
'/tmp/$(USER)/simple_exp2.h',
|
|
102 |
'/tmp/$(USER)/simple_exp3.h',
|
|
103 |
'$(EPOCROOT)/epoc32/include/simple_exp4.h'
|
|
104 |
]
|
|
105 |
t.run()
|
|
106 |
if t.result == SmokeTest.FAIL:
|
|
107 |
result = SmokeTest.FAIL
|
|
108 |
|
|
109 |
# Check that the --noexport feature really does prevent exports from happening
|
|
110 |
t = AntiTargetSmokeTest()
|
|
111 |
t.id = "0023d"
|
|
112 |
t.name = "export_noexport"
|
|
113 |
t.command = "sbs -b smoke_suite/test_resources/simple_export/expbld.inf " \
|
|
114 |
+ "-c armv5 --noexport -n"
|
3
|
115 |
t.antitargets = [
|
|
116 |
'$(EPOCROOT)/epoc32/include/exported_1.h',
|
|
117 |
'$(EPOCROOT)/epoc32/include/exported_2.h',
|
|
118 |
'$(EPOCROOT)/epoc32/include/exported_3.h',
|
|
119 |
'$(EPOCROOT)/epoc32/include/exportedfilewithspacesremoved.doc',
|
|
120 |
'$(EPOCROOT)/epoc32/include/exported file with a space.doc',
|
|
121 |
'/tmp/$(USER)/simple_exp1.h',
|
|
122 |
'/tmp/$(USER)/simple_exp2.h',
|
|
123 |
'/tmp/$(USER)/simple_exp3.h',
|
|
124 |
'$(EPOCROOT)/epoc32/include/simple_exp4.h'
|
|
125 |
]
|
|
126 |
t.run()
|
|
127 |
if t.result == SmokeTest.FAIL:
|
|
128 |
result = SmokeTest.FAIL
|
|
129 |
|
|
130 |
t.id = "23"
|
|
131 |
t.name = "export"
|
|
132 |
t.result = result
|
|
133 |
t.print_result()
|
|
134 |
return t
|