author | timothy.murphy@nokia.com |
Mon, 24 May 2010 16:57:12 +0100 | |
branch | fix |
changeset 573 | e2b5644641c6 |
parent 450 | 63f3bc391c14 |
permissions | -rw-r--r-- |
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 AntiTargetSmokeTest |
|
18 |
import os |
|
19 |
import stat |
|
20 |
||
21 |
def run(): |
|
5 | 22 |
|
23 |
# build something; make it read-only; then try and clean it |
|
3 | 24 |
|
25 |
t = AntiTargetSmokeTest() |
|
5 | 26 |
t.id = "10a" |
450
63f3bc391c14
Fix mismatches in test names vs. file names.
Daniel Jacobs <daniel.jacobs@nokia.com>
parents:
5
diff
changeset
|
27 |
t.name = "clean_readonly" |
5 | 28 |
t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5" |
29 |
t.targets = [ |
|
3 | 30 |
"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym", |
31 |
"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym", |
|
32 |
"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso", |
|
33 |
"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso", |
|
34 |
"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll", |
|
35 |
"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll" |
|
36 |
] |
|
5 | 37 |
t.addbuildtargets("smoke_suite/test_resources/simple_dll/bld.inf", |
38 |
[ |
|
39 |
"createstaticdll_dll/armv5/udeb/CreateStaticDLL.o", |
|
40 |
"createstaticdll_dll/armv5/urel/CreateStaticDLL.o" |
|
41 |
]) |
|
3 | 42 |
t.run() |
5 | 43 |
setupOK = (t.result != AntiTargetSmokeTest.FAIL) |
44 |
||
45 |
# This particular file createstaticdll.dll is changed to be readonly to test |
|
46 |
# if sbs CLEAN command actually gets rid of read only files |
|
47 |
fileForClean = os.environ['EPOCROOT'] + "/epoc32/release/armv5/urel/createstaticdll.dll" |
|
48 |
if os.path.exists(fileForClean): |
|
49 |
os.chmod(fileForClean, stat.S_IREAD) |
|
50 |
||
51 |
t.id = "10" |
|
52 |
t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5 CLEAN" |
|
53 |
t.targets = [] |
|
54 |
t.antitargets = [ |
|
55 |
"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym", |
|
56 |
"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym", |
|
57 |
"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso", |
|
58 |
"$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso", |
|
59 |
"$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll", |
|
60 |
"$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll" |
|
61 |
] |
|
62 |
t.addbuildantitargets("smoke_suite/test_resources/simple_dll/bld.inf", |
|
63 |
[ |
|
64 |
"createstaticdll_dll/armv5/udeb/CreateStaticDLL.o", |
|
65 |
"createstaticdll_dll/armv5/urel/CreateStaticDLL.o" |
|
66 |
]) |
|
67 |
t.run() |
|
68 |
||
69 |
if not setupOK: |
|
70 |
t.result = AntiTargetSmokeTest.FAIL |
|
71 |
||
3 | 72 |
return t |