equal
deleted
inserted
replaced
1 #============================================================================ |
|
2 #Name : test_sbs.py |
|
3 #Part of : Helium |
|
4 |
|
5 #Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
6 #All rights reserved. |
|
7 #This component and the accompanying materials are made available |
|
8 #under the terms of the License "Eclipse Public License v1.0" |
|
9 #which accompanies this distribution, and is available |
|
10 #at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
11 # |
|
12 #Initial Contributors: |
|
13 #Nokia Corporation - initial contribution. |
|
14 # |
|
15 #Contributors: |
|
16 # |
|
17 #Description: |
|
18 #=============================================================================== |
|
19 """Tests Raptor (SBS) log creation/scanning """ |
|
20 import unittest |
|
21 import logging |
|
22 import sys |
|
23 import os |
|
24 import tempfile |
|
25 |
|
26 _logger = logging.getLogger('test.sbs') |
|
27 logging.basicConfig(level=logging.INFO) |
|
28 |
|
29 class SBSTest(unittest.TestCase): |
|
30 """SBSTest: tests for raptor log creation""" |
|
31 |
|
32 def setUp(self): |
|
33 """setUp: setup any params or variable required by all tests later""" |
|
34 sys.path.append(os.path.join(os.environ['HELIUM_HOME'], 'tools/common/python/scripts')) |
|
35 |
|
36 def test_sbs(self): |
|
37 """test_sbs: test SBSScanlogMetadata """ |
|
38 #import filter_metadatalog |
|
39 import sbsscanlogmetadata |
|
40 sbs = sbsscanlogmetadata.SBSScanlogMetadata() |
|
41 (_, filename) = tempfile.mkstemp() |
|
42 sbs.open(filename) |
|
43 sbs.write(open(os.path.join(os.environ['TEST_DATA'], 'data/scanlog/all_regex_type.log')).read()) |
|
44 sbs.close() |
|