author | Bob Rosenberg <bob.rosenberg@nokia.com> |
Mon, 13 Sep 2010 13:52:18 +0100 | |
changeset 656 | 88e01c8f013e |
parent 625 | a1925fb7753a |
child 641 | 8dd670a9f34f |
permissions | -rw-r--r-- |
591 | 1 |
# |
625
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
2 |
# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
591 | 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 |
||
18 |
from raptor_tests import SmokeTest |
|
19 |
import os |
|
20 |
||
21 |
def run(): |
|
22 |
t = SmokeTest() |
|
23 |
t.description = """ |
|
24 |
Tests the creation and content of an .iby romfile for the armv5.test |
|
25 |
configuration. Also tests for creation of relevant test batch files. |
|
26 |
""" |
|
625
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
27 |
t.id = "55a" |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
28 |
t.name = "romfile_general" |
591 | 29 |
t.usebash = True |
30 |
t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \ |
|
31 |
+ "-c armv5.test ROMFILE -f - " \ |
|
32 |
+ "&& cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby" |
|
33 |
||
34 |
# Don't allow -m or -f to be appended |
|
35 |
t.logfileOption = lambda :"" |
|
36 |
t.makefileOption = lambda :"" |
|
37 |
t.targets = [ |
|
38 |
"$(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby", |
|
39 |
"$(EPOCROOT)/epoc32/data/z/test/src/armv5.auto.bat", |
|
40 |
"$(EPOCROOT)/epoc32/data/z/test/src/armv5.manual.bat" |
|
41 |
] |
|
42 |
||
43 |
# Check the content of the generated .iby file. |
|
44 |
||
45 |
t.mustmatch = [ |
|
46 |
# Check whatlog output includes batch files and .iby file |
|
47 |
r".*/epoc32/rom/src/ongoing/group/romfile/armv5test.iby</build>.*", |
|
48 |
r".*/epoc32/data/z/test/src/armv5.auto.bat</build>.*", |
|
49 |
r".*/epoc32/data/z/test/src/armv5.manual.bat</build>.*", |
|
50 |
||
51 |
# The comment that is put at the start of the file. |
|
52 |
r".*// epoc32/rom/src/ongoing/group/romfile/armv5test\.iby\n.*", |
|
53 |
||
54 |
# The batch files that are added by the build system. |
|
55 |
r".*\ndata=/epoc32/data/z/test/src/armv5\.auto\.bat test/src\.auto\.bat\n.*", |
|
56 |
r".*\ndata=/epoc32/data/z/test/src/armv5\.manual\.bat test/src\.manual\.bat\n.*", |
|
57 |
||
58 |
# Some normal files. |
|
59 |
r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_rand\.exe\s+sys/bin/t_rand\.exe\n.*", |
|
60 |
r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_swapfsys\.exe\s+sys/bin/t_swapfsys\.exe\n.*", |
|
61 |
r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_localtime\.exe\s+sys/bin/t_localtime\.exe\n.*", |
|
62 |
||
63 |
# Some files where the MMP file has the PAGED or UNPAGED keywords. |
|
64 |
r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_pagestress\.exe\s+sys/bin/t_pagestress\.exe paged\n.*", |
|
65 |
r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_fsys\.exe\s+sys/bin/t_fsys\.exe unpaged\n.*", |
|
66 |
||
67 |
# Some files where the MMP file has the ROMTARGET or RAMTARGET keywords. |
|
68 |
r".*\ndata=/epoc32/release/##MAIN##/##BUILD##/t_prel\.dll\s+/sys/bin/t_prel\.dll attrib=r\n.*", |
|
69 |
r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+sys/bin/t_sysbin\.exe\n.*", |
|
70 |
r".*\ndata=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/sys/bin/t_sysbin_ram\.exe attrib=r\n.*", |
|
71 |
r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/sys/bin/t_sysbina\.exe\n.*", |
|
72 |
r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/system/programs/t_sysbinb\.exe\n.*" |
|
73 |
] |
|
74 |
t.mustnotmatch = [ |
|
75 |
# Try to detect file paths that contain two or more slashes in a row, |
|
76 |
# without flagging C++ style comments. |
|
77 |
r"\w//+\w" |
|
78 |
] |
|
79 |
||
80 |
t.run("windows") |
|
81 |
||
82 |
if t.result == SmokeTest.SKIP: |
|
83 |
t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf" \ |
|
84 |
+ " -c armv5.test ROMFILE -f -" \ |
|
85 |
+ " && cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby" |
|
86 |
||
87 |
# These two warnings are because gnumakefiles are not supported on |
|
88 |
# Linux: |
|
89 |
t.warnings = 2 |
|
90 |
t.run("linux") |
|
91 |
||
625
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
92 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
93 |
t.id = "55b" |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
94 |
t.name = "romfile_mmp_include_twice" |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
95 |
t.command = "sbs -b $(EPOCROOT)/src/e32test/group/bld.inf " \ |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
96 |
+ "-b $(EPOCROOT)/src/falcon/test/bld.inf " \ |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
97 |
+ "-c armv5.test ROMFILE -m ${SBSMAKEFILE} -f ${SBSLOGFILE} " \ |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
98 |
+ "&& cat $(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby" |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
99 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
100 |
t.targets = [ |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
101 |
"$(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby" |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
102 |
] |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
103 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
104 |
# Check the content of the generated .iby file |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
105 |
t.mustmatch = [ |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
106 |
r".*\ndevice\[MAGIC\]=/epoc32/release/##KMAIN##/##BUILD##/d_nanowait\.ldd\s+sys/bin/d_nanowait\.ldd\n.*", |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
107 |
r".*\ndevice\[MAGIC\]=/epoc32/release/##KMAIN##/##BUILD##/d_pagingexample_2_post.ldd\s+sys/bin/d_pagingexample_2_post.ldd\n.*", |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
108 |
] |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
109 |
t.mustnotmatch = [ |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
110 |
# These two files are from two mmp files that included in both bld.inf |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
111 |
# They shouldn't be in the ROM |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
112 |
r".*/d_medch.ldd\s.*" |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
113 |
r".*/d_dma.ldd\s.*" |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
114 |
] |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
115 |
t.warnings = 0 |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
116 |
t.run() |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
117 |
|
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
118 |
t.id = "55" |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
119 |
t.name = "romfile" |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
120 |
t.print_result() |
591 | 121 |
return t |