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 |
# The stringtable example doesn't currently build in full, hence it's built for
|
|
17 |
# EXPORT in isolation; We also test archives here - although an export, they
|
|
18 |
# will be exported in response to the first configuration processed (this
|
|
19 |
# example ensures it's armv5_udeb, so we can match against that config).
|
|
20 |
from raptor_tests import CheckWhatSmokeTest, ReplaceEnvs
|
|
21 |
import re
|
|
22 |
import os
|
|
23 |
|
|
24 |
def run():
|
|
25 |
markerfile = re.sub("(\\\\|\/|:|;| )", "_",
|
|
26 |
ReplaceEnvs("$(SBS_HOME)_test_smoke_suite_test_resources_simple_zip_export_archive.zip$(EPOCROOT)_epoc32_testunzip.unzipped"))
|
|
27 |
|
|
28 |
result = CheckWhatSmokeTest.PASS
|
|
29 |
|
|
30 |
t = CheckWhatSmokeTest()
|
|
31 |
t.id = "0069a"
|
|
32 |
t.name = "stringtable_zip_whatlog"
|
|
33 |
t.command = "sbs -b smoke_suite/test_resources/simple_stringtable/bld.inf -b smoke_suite/test_resources/simple_zip_export/bld.inf -f - -m ${SBSMAKEFILE} -c armv5_udeb.whatlog EXPORT"
|
|
34 |
componentpath1 = re.sub(r'\\','/',os.path.abspath("smoke_suite/test_resources/simple_stringtable"))
|
|
35 |
componentpath2 = re.sub(r'\\','/',os.path.abspath("smoke_suite/test_resources/simple_zip_export"))
|
|
36 |
t.regexlinefilter = \
|
|
37 |
re.compile("^<(whatlog|archive|stringtable>|archive|member>|zipmarker>)")
|
|
38 |
t.hostossensitive = False
|
|
39 |
t.usebash = True
|
|
40 |
t.targets = [
|
|
41 |
"$(EPOCROOT)/epoc32/include/strconsts.h",
|
|
42 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt",
|
|
43 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
|
|
44 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
|
|
45 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
|
|
46 |
"$(EPOCROOT)/epoc32/build/" + markerfile
|
|
47 |
]
|
|
48 |
t.addbuildtargets('smoke_suite/test_resources/simple_stringtable/bld.inf', [
|
|
49 |
"stringtabletest_/strconsts.cpp",
|
|
50 |
"stringtabletest_/strconsts.h",
|
|
51 |
"stringtabletest_/strconsts.st"
|
|
52 |
])
|
|
53 |
t.stdout = [
|
|
54 |
"<whatlog bldinf='"+componentpath1+"/bld.inf' mmp='"+componentpath1+"/simple_stringtable.mmp' config='armv5_udeb.whatlog'>",
|
|
55 |
"<stringtable>$(EPOCROOT)/epoc32/include/strconsts.h</stringtable>",
|
|
56 |
"<whatlog bldinf='"+componentpath2+"/bld.inf' mmp='' config=''>",
|
|
57 |
"<archive zipfile='"+componentpath2+"/archive.zip'>",
|
|
58 |
"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt</member>",
|
|
59 |
"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt</member>",
|
|
60 |
"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt</member>",
|
|
61 |
"<member>$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt</member>",
|
|
62 |
"<zipmarker>$(EPOCROOT)/epoc32/build/" + markerfile + "</zipmarker>"
|
|
63 |
]
|
|
64 |
t.run()
|
|
65 |
if t.result == CheckWhatSmokeTest.FAIL:
|
|
66 |
result = CheckWhatSmokeTest.FAIL
|
|
67 |
|
|
68 |
|
|
69 |
"Tests to check that up-to-date zip exports are reported"
|
|
70 |
t.id = "0069b"
|
|
71 |
t.name = "stringtable_zip_whatlog_rebuild"
|
|
72 |
t.targets = []
|
|
73 |
t.run()
|
|
74 |
if t.result == CheckWhatSmokeTest.FAIL:
|
|
75 |
result = CheckWhatSmokeTest.FAIL
|
|
76 |
|
|
77 |
|
|
78 |
t.id = "69"
|
|
79 |
t.name = "stringtable_zip_whatlog"
|
|
80 |
t.result = result
|
|
81 |
t.print_result()
|
|
82 |
return t
|