Skip to content

Commit

Permalink
Follow-up to r152620: restore JIT event listener tests to unittest/Ex…
Browse files Browse the repository at this point in the history
…ecutionEngine/JIT

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152780 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Eli Bendersky committed Mar 15, 2012
1 parent 5a89434 commit f963cd3
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 34 deletions.
16 changes: 8 additions & 8 deletions unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,15 @@ add_llvm_unittest(Analysis
Analysis/ScalarEvolutionTest.cpp
)

add_llvm_unittest(ExecutionEngine
ExecutionEngine/ExecutionEngineTest.cpp
)

if( LLVM_USE_INTEL_JITEVENTS )
include_directories( ${LLVM_INTEL_JITEVENTS_INCDIR} )
link_directories( ${LLVM_INTEL_JITEVENTS_LIBDIR} )
set(ProfileTestSources
ExecutionEngine/IntelJITEventListenerTest.cpp
ExecutionEngine/JIT/IntelJITEventListenerTest.cpp
)
set(LLVM_LINK_COMPONENTS
${LLVM_LINK_COMPONENTS}
Expand All @@ -98,24 +102,20 @@ endif( LLVM_USE_INTEL_JITEVENTS )
if( LLVM_USE_OPROFILE )
set(ProfileTestSources
${ProfileTestSources}
ExecutionEngine/OProfileJITEventListenerTest.cpp
ExecutionEngine/JIT/OProfileJITEventListenerTest.cpp
)
set(LLVM_LINK_COMPONENTS
${LLVM_LINK_COMPONENTS}
OProfileJIT
)
endif( LLVM_USE_OPROFILE )

add_llvm_unittest(ExecutionEngine
ExecutionEngine/ExecutionEngineTest.cpp
ExecutionEngine/JITEventListenerTest.cpp
${ProfileTestSources}
)

set(JITTestsSources
ExecutionEngine/JIT/JITEventListenerTest.cpp
ExecutionEngine/JIT/JITMemoryManagerTest.cpp
ExecutionEngine/JIT/JITTest.cpp
ExecutionEngine/JIT/MultiJITTest.cpp
${ProfileTestSources}
)

if(MSVC)
Expand Down
23 changes: 23 additions & 0 deletions unittests/ExecutionEngine/JIT/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,29 @@ TESTNAME = JIT
LINK_COMPONENTS := asmparser bitreader bitwriter core jit native support

include $(LEVEL)/Makefile.config

SOURCES := JITEventListenerTest.cpp

ifeq ($(USE_INTEL_JITEVENTS), 1)
# Build the Intel JIT Events interface tests
SOURCES += IntelJITEventListenerTest.cpp

# Add the Intel JIT Events include directory
CPPFLAGS += -I$(INTEL_JITEVENTS_INCDIR)

# Link against the LLVM Intel JIT Evens interface library
LINK_COMPONENTS += inteljitevents
endif

ifeq ($(USE_OPROFILE), 1)
# Build the OProfile JIT interface tests
SOURCES += OProfileJITEventListenerTest.cpp

# Link against the LLVM oprofile interface library
LINK_COMPONENTS += oprofilejit
endif


include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest

# Permit these tests to use the JIT's symbolic lookup.
Expand Down
27 changes: 1 addition & 26 deletions unittests/ExecutionEngine/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,7 @@
LEVEL = ../..
TESTNAME = ExecutionEngine
LINK_COMPONENTS := engine interpreter

include $(LEVEL)/Makefile.config

SOURCES := ExecutionEngineTest.cpp \
JITEventListenerTest.cpp

ifeq ($(USE_INTEL_JITEVENTS), 1)
# Build the Intel JIT Events interface tests
SOURCES += IntelJITEventListenerTest.cpp

# Add the Intel JIT Events include directory
CPPFLAGS += -I$(INTEL_JITEVENTS_INCDIR)

# Link against the LLVM Intel JIT Evens interface library
LINK_COMPONENTS += inteljitevents
endif

ifeq ($(USE_OPROFILE), 1)
# Build the OProfile JIT interface tests
SOURCES += OProfileJITEventListenerTest.cpp

# Link against the LLVM oprofile interface library
LINK_COMPONENTS += oprofilejit
endif


PARALLEL_DIRS = JIT

include $(LEVEL)/Makefile.config
include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest

0 comments on commit f963cd3

Please sign in to comment.