Python noprofile (#138)

* Fixed noprofile / FakeProfiler

- omnitrace.libpyomnitrace.profiler.profiler_pause()
- omnitrace.libpyomnitrace.profiler.profiler_resume()

* Python tests for noprofile

* Remove static imported module
Tá an tiomantas seo le fáil i:
Jonathan R. Madsen údaraithe agus GitHub tiomanta 2022-08-16 19:28:58 -05:00
1 tuismitheoir 23fb3946c7
tiomantas 3f3ef7ddf9
6 comhad athraithe
+115 -7

Níor tháinig aon chomhaid le do chuardach

+19
Féach ar an gComhad
@@ -1229,6 +1229,15 @@ foreach(_VERSION ${OMNITRACE_PYTHON_VERSIONS})
RUN_ARGS -v 10 -n 5
ENVIRONMENT "${_python_environment}")
omnitrace_add_python_test(
NAME python-builtin-noprofile
PYTHON_EXECUTABLE ${_PYTHON_EXECUTABLE}
PYTHON_VERSION ${_VERSION}
FILE ${CMAKE_SOURCE_DIR}/examples/python/noprofile.py
PROFILE_ARGS "-b" "--label" "file"
RUN_ARGS -v 15 -n 5
ENVIRONMENT "${_python_environment}")
omnitrace_add_python_test(
STANDALONE
NAME python-source
@@ -1282,6 +1291,16 @@ foreach(_VERSION ${OMNITRACE_PYTHON_VERSIONS})
PASS_REGEX "\\\[inefficient\\\]\\\[builtin.py:14\\\]"
DEPENDS python-builtin-${_VERSION}
ENVIRONMENT "${_python_environment}")
omnitrace_add_python_test(
NAME python-builtin-noprofile-check
COMMAND ${OMNITRACE_CAT_COMMAND}
PYTHON_VERSION ${_VERSION}
FILE omnitrace-tests-output/python-builtin-noprofile/${_VERSION}/trip_count.txt
PASS_REGEX ".(run)..(noprofile.py)."
FAIL_REGEX ".(fib|inefficient)..(noprofile.py)."
DEPENDS python-builtin-noprofile-${_VERSION}
ENVIRONMENT "${_python_environment}")
else()
omnitrace_message(
WARNING