author | Jon Chatten |
Mon, 13 Sep 2010 14:04:04 +0100 | |
changeset 641 | 8dd670a9f34f |
parent 616 | 24e4ef208cca |
permissions | -rw-r--r-- |
591 | 1 |
# |
641 | 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 |
||
641 | 17 |
from raptor_tests import AntiTargetSmokeTest, ReplaceEnvs |
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
18 |
from raptor_meta import MetaReader |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
19 |
from raptor_utilities import sanitise |
591 | 20 |
import re |
21 |
||
22 |
def run(): |
|
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
23 |
premarkerfile = sanitise(ReplaceEnvs("$(SBS_HOME)_test_smoke_suite_test_resources_simple_zip_export_archive.zip$(EPOCROOT)_epoc32_testunzip")) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
591
diff
changeset
|
24 |
markerfile = MetaReader.unzippedPathFragment(premarkerfile) + ".unzipped" |
591 | 25 |
|
641 | 26 |
t = AntiTargetSmokeTest() |
27 |
||
28 |
# Check basic export success |
|
591 | 29 |
t.name = "zip_export" |
30 |
t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf" |
|
31 |
t.targets = [ |
|
32 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt", |
|
33 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt", |
|
34 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt", |
|
35 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt", |
|
36 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin", |
|
641 | 37 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefilereadonly.txt", |
591 | 38 |
"$(EPOCROOT)/epoc32/build/" + markerfile |
39 |
] |
|
40 |
t.run() |
|
641 | 41 |
|
42 |
# Confirm executable permissions are retained on Linux |
|
591 | 43 |
t.name = "zip_export_execute_permissions" |
44 |
t.usebash = True |
|
641 | 45 |
t.targets = [] # prevent auto clean-up up of target files from previous test |
591 | 46 |
t.command = "ls -l $(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin" |
47 |
t.mustmatch = ["-[rw-]{2}x[rw-]{2}x[rw-]{2}x"] |
|
48 |
t.run("linux") |
|
641 | 49 |
|
50 |
# Confirm reallyclean deletes all exports, including those that were read-only |
|
51 |
# as source (and so should now be removable at their destination) |
|
591 | 52 |
t.name = "zip_export_reallyclean" |
641 | 53 |
t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf reallyclean" |
54 |
t.mustmatch = [] |
|
591 | 55 |
t.antitargets = [ |
56 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt", |
|
57 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt", |
|
58 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt", |
|
59 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt", |
|
60 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin", |
|
641 | 61 |
"$(EPOCROOT)/epoc32/testunzip/archive/archivefilereadonly.txt", |
591 | 62 |
"$(EPOCROOT)/epoc32/build/" + markerfile |
63 |
] |
|
64 |
t.run() |
|
65 |
||
66 |
t.name = "zip_export_plus_clean" |
|
67 |
t.print_result() |
|
68 |
return t |