14 # Description: |
14 # Description: |
15 # |
15 # |
16 |
16 |
17 |
17 |
18 from raptor_tests import SmokeTest |
18 from raptor_tests import SmokeTest |
19 import os |
|
20 |
19 |
21 def run(): |
20 def run(): |
22 t = SmokeTest() |
21 t = SmokeTest() |
23 t.description = """ |
22 t.description = """ |
24 Tests the creation and content of an .iby romfile for the armv5.test |
23 Tests the creation and content of an .iby romfile for the armv5.test |
25 configuration. Also tests for creation of relevant test batch files. |
24 configuration. Also tests for creation of relevant test batch files. |
26 """ |
25 """ |
27 t.id = "55a" |
|
28 t.name = "romfile_general" |
|
29 t.usebash = True |
26 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 |
27 # Don't allow -m or -f to be appended |
35 t.logfileOption = lambda :"" |
28 t.logfileOption = lambda :"" |
36 t.makefileOption = lambda :"" |
29 t.makefileOption = lambda :"" |
|
30 |
|
31 t.id = "55a" |
|
32 # Check content of iby file is correct |
|
33 # Check batch files are generated |
|
34 t.name = "romfile_general" |
|
35 |
|
36 t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \ |
|
37 + "-c armv5.test ROMFILE -m ${SBSMAKEFILE} -f ${SBSLOGFILE} " \ |
|
38 + "&& cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby" |
|
39 |
37 t.targets = [ |
40 t.targets = [ |
38 "$(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby", |
41 "$(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby", |
39 "$(EPOCROOT)/epoc32/data/z/test/src/armv5.auto.bat", |
42 "$(EPOCROOT)/epoc32/data/z/test/src/armv5.auto.bat", |
40 "$(EPOCROOT)/epoc32/data/z/test/src/armv5.manual.bat" |
43 "$(EPOCROOT)/epoc32/data/z/test/src/armv5.manual.bat" |
41 ] |
44 ] |
42 |
45 |
43 # Check the content of the generated .iby file. |
46 # Check the content of the generated .iby file. |
44 |
|
45 t.mustmatch = [ |
47 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. |
48 # The comment that is put at the start of the file. |
52 r".*// epoc32/rom/src/ongoing/group/romfile/armv5test\.iby\n.*", |
49 r".*// epoc32/rom/src/ongoing/group/romfile/armv5test\.iby\n.*", |
53 |
50 |
54 # The batch files that are added by the build system. |
51 # 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.*", |
52 r".*\ndata=/epoc32/data/z/test/src/armv5\.auto\.bat test/src\.auto\.bat\n.*", |
74 t.mustnotmatch = [ |
71 t.mustnotmatch = [ |
75 # Try to detect file paths that contain two or more slashes in a row, |
72 # Try to detect file paths that contain two or more slashes in a row, |
76 # without flagging C++ style comments. |
73 # without flagging C++ style comments. |
77 r"\w//+\w" |
74 r"\w//+\w" |
78 ] |
75 ] |
|
76 t.warnings = 0 if t.onWindows else 2 |
|
77 t.run() |
|
78 |
79 |
79 |
80 t.run("windows") |
80 t.id = "55b" |
81 |
81 # t.targets and t.warnings are the same as above and thus omitted |
82 if t.result == SmokeTest.SKIP: |
82 t.name = "romfile_whatlog" |
83 t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf" \ |
83 t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \ |
84 + " -c armv5.test ROMFILE -f -" \ |
84 + "-c armv5.test ROMFILE -f -" |
85 + " && cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby" |
85 |
86 |
86 t.mustmatch = [ |
87 # These two warnings are because gnumakefiles are not supported on |
87 # Check whatlog output includes batch files and .iby file |
88 # Linux: |
88 r".*/epoc32/rom/src/ongoing/group/romfile/armv5test.iby</build>.*", |
89 t.warnings = 2 |
89 r".*/epoc32/data/z/test/src/armv5.auto.bat</build>.*", |
90 t.run("linux") |
90 r".*/epoc32/data/z/test/src/armv5.manual.bat</build>.*" |
|
91 ] |
|
92 t.mustnotmatch = [] |
|
93 t.run() |
91 |
94 |
92 |
95 |
93 t.id = "55b" |
96 t.id = "55c" |
94 t.name = "romfile_mmp_include_twice" |
97 t.name = "romfile_mmp_include_twice" |
95 t.command = "sbs -b $(EPOCROOT)/src/e32test/group/bld.inf " \ |
98 t.command = "sbs -b $(EPOCROOT)/src/e32test/group/bld.inf " \ |
96 + "-b $(EPOCROOT)/src/falcon/test/bld.inf " \ |
99 + "-b $(EPOCROOT)/src/falcon/test/bld.inf " \ |
97 + "-c armv5.test ROMFILE -m ${SBSMAKEFILE} -f ${SBSLOGFILE} " \ |
100 + "-c armv5.test ROMFILE -m ${SBSMAKEFILE} -f ${SBSLOGFILE} " \ |
98 + "&& cat $(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby" |
101 + "&& cat $(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby" |