Commit 588cf34c authored by Brice Videau's avatar Brice Videau
Browse files

Added a first test for level zero.

parent 1d0f51fe
Pipeline #12964 canceled with stage
......@@ -88,6 +88,7 @@ AC_CONFIG_FILES([opencl/extract_enqueues], [chmod +x opencl/extract_enqueues])
AC_CONFIG_FILES([opencl/test_wrapper.sh], [chmod +x opencl/test_wrapper.sh])
AC_CONFIG_FILES([ze/tracer_ze.sh], [chmod +x ze/tracer_ze.sh])
AC_CONFIG_FILES([ze/babeltrace_ze], [chmod +x ze/babeltrace_ze])
AC_CONFIG_FILES([ze/test_wrapper.sh], [chmod +x ze/test_wrapper.sh])
AC_CONFIG_FILES([cuda/babeltrace_cuda], [chmod +x cuda/babeltrace_cuda])
AC_CONFIG_FILES([cuda/tracer_cuda.sh], [chmod +x cuda/tracer_cuda.sh])
AC_OUTPUT
......@@ -109,10 +109,9 @@ def populate_field(field, field_value)
be_class = field.get_class.user_attributes[:be_class]
n = be_class.nil? ? nil : be_class.value
if n
if n.start_with?('ZE')
thapi_root = ENV['THAPI_ROOT']
require "/#{thapi_root}/share/ze_bindings"
struct = ZE.const_get(n.to_sym).new
if n.start_with?('ZE::')
require "#{ENV["BINDING_DIR"]}/ze_library"
struct = eval(n).new
elsif n.start_with?('CL::')
require 'opencl_ruby_ffi/opencl_types'
require 'opencl_ruby_ffi/opencl_arithmetic_gen'
......
......@@ -133,6 +133,8 @@ zel_api.yaml: $(srcdir)/extract_zel.rb $(MODIFIED_ZE_HDR) $(ZE_EXTRACT)
ze_babeltrace_model.yaml: $(srcdir)/gen_babeltrace_ze_model.rb $(ZE_MODEL)
SRC_DIR=$(srcdir) $(RUBY) $< > $@
CLEANFILES += ze_babeltrace_model.yaml
EXTRA_DIST += \
extract_ze.rb \
extract_zet.rb \
......@@ -307,6 +309,21 @@ ZE_BINDINGS = \
ze_refinements.rb \
ze_bindings.rb
tests/ze_dummy_trace.yaml: ze_babeltrace_model.yaml
mkdir -p tests
$(RUBY) $(top_srcdir)/utils/gen_dummy_trace.rb ze_babeltrace_model.yaml > $@
TEST_FILES = \
tests/ze_dummy_trace.dust
TESTS = $(TEST_FILES)
TEST_EXTENSIONS = .dust
DUST_LOG_COMPILER = ./test_wrapper.sh
check_DATA = \
test_wrapper.sh \
tests/ze_dummy_trace.yaml
data_DATA = \
$(ZE_BINDINGS) \
ze_bindings_base.rb
......@@ -316,7 +333,9 @@ EXTRA_DIST += \
gen_babeltrace_ze_lib.rb \
gen_ze_refinements.rb \
gen_ze_bindings.rb \
ze_bindings_base.rb
ze_bindings_base.rb \
test_wrapper.sh \
$(TEST_FILES)
CLEANFILES += $(ZE_BINDINGS)
#!/usr/bin/env sh
set -o xtrace
BINDING_DIR=@builddir@ \
DUST_MODELS_DIR=@abs_builddir@/ \
BABELTRACE_PLUGIN_PATH=@builddir@/.libs/ \
DUST_TRACE_DIR=@abs_srcdir@/tests:@abs_builddir@/tests \
@RUBY@ @top_srcdir@/utils/bt2.rb -f $1
---
:components:
- :plugin: source.ruby.dust
:name: dust
:params:
schemas: [ze_babeltrace_model.yaml]
trace: ze_dummy_trace.yaml
- :plugin: sink.text.details
:name: details
:connections:
- dust:details
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment