projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: rename BT_OS_TYPE to BT_TESTS_OS_TYPE
[babeltrace.git]
/
tests
/
plugins
/
src.ctf.fs
/
query
/
test_query_trace_info.py
diff --git
a/tests/plugins/src.ctf.fs/query/test_query_trace_info.py
b/tests/plugins/src.ctf.fs/query/test_query_trace_info.py
index ff8264a349fba1d32ae7edcd3c0620124db9839e..eb8fd25ce8e63638386bed9f6f9cbd96bcd89f54 100644
(file)
--- a/
tests/plugins/src.ctf.fs/query/test_query_trace_info.py
+++ b/
tests/plugins/src.ctf.fs/query/test_query_trace_info.py
@@
-1,24
+1,12
@@
-# Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; only version 2
-# of the License.
+# SPDX-License-Identifier: GPL-2.0-only
#
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
#
#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import unittest
import bt2
import os
import re
import unittest
import bt2
import os
import re
-from pathlib import PureWindowsPath, PurePosixPath
test_ctf_traces_path = os.environ['BT_CTF_TRACES_PATH']
test_ctf_traces_path = os.environ['BT_CTF_TRACES_PATH']
@@
-145,11
+133,12
@@
class QueryTraceInfoPortNameTestCase(unittest.TestCase):
},
).query()
},
).query()
- os_stream_path = PurePosixPath(
- '/tests/data/ctf-traces/intersection/3eventsintersect/'
- )
- if os.environ['BT_OS_TYPE'] == 'mingw':
- os_stream_path = PureWindowsPath(os_stream_path)
+ if os.environ['BT_TESTS_OS_TYPE'] == 'mingw':
+ os_stream_path = (
+ '\\tests\\data\\ctf-traces\\intersection\\3eventsintersect\\'
+ )
+ else:
+ os_stream_path = '/tests/data/ctf-traces/intersection/3eventsintersect/'
self.assertEqual(len(res), 1)
trace = res[0]
self.assertEqual(len(res), 1)
trace = res[0]
@@
-158,13
+147,13
@@
class QueryTraceInfoPortNameTestCase(unittest.TestCase):
self.assertRegex(
str(streams[0]["port-name"]),
r"^7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf \| 0 \| .*"
self.assertRegex(
str(streams[0]["port-name"]),
r"^7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf \| 0 \| .*"
- + re.escape(
str(os_stream_path / "test_stream_0")
)
+ + re.escape(
os_stream_path + "test_stream_0"
)
+ r"$",
)
self.assertRegex(
str(streams[1]["port-name"]),
r"^7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf \| 0 \| .*"
+ r"$",
)
self.assertRegex(
str(streams[1]["port-name"]),
r"^7afe8fbe-79b8-4f6a-bbc7-d0c782e7ddaf \| 0 \| .*"
- + re.escape(
str(os_stream_path / "test_stream_1")
)
+ + re.escape(
os_stream_path + "test_stream_1"
)
+ r"$",
)
+ r"$",
)
@@
-175,11
+164,10
@@
class QueryTraceInfoPortNameTestCase(unittest.TestCase):
{"inputs": [os.path.join(test_ctf_traces_path, "succeed", "succeed1")]},
).query()
{"inputs": [os.path.join(test_ctf_traces_path, "succeed", "succeed1")]},
).query()
- os_stream_path = PurePosixPath(
- '/tests/data/ctf-traces/succeed/succeed1/dummystream'
- )
- if os.environ['BT_OS_TYPE'] == 'mingw':
- os_stream_path = PureWindowsPath(os_stream_path)
+ if os.environ['BT_TESTS_OS_TYPE'] == 'mingw':
+ os_stream_path = '\\tests\\data\\ctf-traces\\succeed\\succeed1\\dummystream'
+ else:
+ os_stream_path = '/tests/data/ctf-traces/succeed/succeed1/dummystream'
self.assertEqual(len(res), 1)
trace = res[0]
self.assertEqual(len(res), 1)
trace = res[0]
@@
-188,7
+176,7
@@
class QueryTraceInfoPortNameTestCase(unittest.TestCase):
self.assertRegex(
str(streams[0]["port-name"]),
r"^2a6422d0-6cee-11e0-8c08-cb07d7b3a564 \| .*"
self.assertRegex(
str(streams[0]["port-name"]),
r"^2a6422d0-6cee-11e0-8c08-cb07d7b3a564 \| .*"
- + re.escape(
str(os_stream_path)
)
+ + re.escape(
os_stream_path
)
+ r"$",
)
+ r"$",
)
This page took
0.026219 seconds
and
4
git commands to generate.