sbsv2/raptor/test/smoke_suite/zip_export_plus_clean.py
changeset 641 8dd670a9f34f
parent 616 24e4ef208cca
equal deleted inserted replaced
640:ac0bbc1e5d79 641:8dd670a9f34f
     1 #
     1 #
     2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 # Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 # All rights reserved.
     3 # All rights reserved.
     4 # This component and the accompanying materials are made available
     4 # This component and the accompanying materials are made available
     5 # under the terms of the License "Eclipse Public License v1.0"
     5 # under the terms of the License "Eclipse Public License v1.0"
     6 # which accompanies this distribution, and is available
     6 # which accompanies this distribution, and is available
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
    12 # Contributors:
    12 # Contributors:
    13 #
    13 #
    14 # Description: 
    14 # Description: 
    15 #
    15 #
    16 
    16 
    17 from raptor_tests import SmokeTest, AntiTargetSmokeTest, ReplaceEnvs
    17 from raptor_tests import AntiTargetSmokeTest, ReplaceEnvs
    18 from raptor_meta import MetaReader
    18 from raptor_meta import MetaReader
    19 from raptor_utilities import sanitise
    19 from raptor_utilities import sanitise
    20 import re
    20 import re
    21 
    21 
    22 def run():
    22 def run():
    23 	premarkerfile = sanitise(ReplaceEnvs("$(SBS_HOME)_test_smoke_suite_test_resources_simple_zip_export_archive.zip$(EPOCROOT)_epoc32_testunzip"))
    23 	premarkerfile = sanitise(ReplaceEnvs("$(SBS_HOME)_test_smoke_suite_test_resources_simple_zip_export_archive.zip$(EPOCROOT)_epoc32_testunzip"))
    24 	markerfile = MetaReader.unzippedPathFragment(premarkerfile) + ".unzipped"
    24 	markerfile = MetaReader.unzippedPathFragment(premarkerfile) + ".unzipped"
    25 	
    25 	
    26 	t = SmokeTest()
    26 	t = AntiTargetSmokeTest()
    27 	
    27 
    28 	t.id = "0024a"
    28 	# Check basic export success	
    29 	t.name = "zip_export"
    29 	t.name = "zip_export"
    30 	t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf"
    30 	t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf"
    31 	t.targets = [
    31 	t.targets = [
    32 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt",
    32 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt",
    33 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
    33 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
    34 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
    34 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
    35 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
    35 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
    36 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
    36 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
       
    37 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilereadonly.txt",
    37 		"$(EPOCROOT)/epoc32/build/" + markerfile
    38 		"$(EPOCROOT)/epoc32/build/" + markerfile
    38 	]
    39 	]
    39 	t.run()
    40 	t.run()
    40 	
    41 
    41 	t.id = "0024aa"
    42 	# Confirm executable permissions are retained on Linux	
    42 	t.name = "zip_export_execute_permissions"
    43 	t.name = "zip_export_execute_permissions"
    43 	t.usebash = True
    44 	t.usebash = True
    44 	t.targets = []
    45 	t.targets = [] # prevent auto clean-up up of target files from previous test
    45 	t.command = "ls -l $(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin"
    46 	t.command = "ls -l $(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin"
    46 	t.mustmatch = ["-[rw-]{2}x[rw-]{2}x[rw-]{2}x"]
    47 	t.mustmatch = ["-[rw-]{2}x[rw-]{2}x[rw-]{2}x"]
    47 	t.run("linux")
    48 	t.run("linux")
    48 	
    49 
    49 	t = AntiTargetSmokeTest()
    50 	# Confirm reallyclean deletes all exports, including those that were read-only
    50 	t.id = "0024b"
    51 	# as source (and so should now be removable at their destination)	
    51 	t.name = "zip_export_reallyclean"
    52 	t.name = "zip_export_reallyclean"
    52 	t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf REALLYCLEAN"
    53 	t.command = "sbs -b smoke_suite/test_resources/simple_zip_export/bld.inf reallyclean"
       
    54 	t.mustmatch = []
    53 	t.antitargets = [
    55 	t.antitargets = [
    54 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt",
    56 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile1.txt",
    55 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
    57 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile2.txt",
    56 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
    58 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile3.txt",
    57 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
    59 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefile4.txt",
    58 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
    60 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilelinuxbin",
       
    61 		"$(EPOCROOT)/epoc32/testunzip/archive/archivefilereadonly.txt",
    59 		"$(EPOCROOT)/epoc32/build/" + markerfile
    62 		"$(EPOCROOT)/epoc32/build/" + markerfile
    60 	]
    63 	]
    61 	t.run()
    64 	t.run()
    62 	
    65 	
    63 	t.id = "24"
       
    64 	t.name = "zip_export_plus_clean"
    66 	t.name = "zip_export_plus_clean"
    65 	t.print_result()
    67 	t.print_result()
    66 	return t
    68 	return t