Skip to content

Commit

Permalink
triage tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xtofalex committed Jul 25, 2023
1 parent 219a4d9 commit 5684f31
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ jobs:
working-directory: ${{github.workspace}}/build/test/snl/snl/kernel
run: valgrind --error-exitcode=1 --show-leak-kinds=all --leak-check=full --errors-for-leak-kinds=all ./snlTests

- name: TestSNLKernelWithPyLoader
working-directory: ${{github.workspace}}/build/test/snl/snl/kernel
env:
PYTHONPATH: ${{env.PYTHONPATH}}:${{github.workspace}}/build/src/snl/python/snl_wrapping
PYTHONMALLOC: malloc
run: valgrind --error-exitcode=1 --show-leak-kinds=definite --leak-check=full --errors-for-leak-kinds=definite ./snlTestsWithPyLoader

- name: TestSNLDump
working-directory: ${{github.workspace}}/build/test/snl/snl/serialization/capnp
run: valgrind --error-exitcode=1 --show-leak-kinds=all --leak-check=full --errors-for-leak-kinds=all ./snlCapnPTests
Expand All @@ -64,9 +71,9 @@ jobs:
working-directory: ${{github.workspace}}/build/test/snl/formats/verilog/backend
run: valgrind --error-exitcode=1 --show-leak-kinds=all --leak-check=full --errors-for-leak-kinds=all ./snlVRLDumperTests

- name: TestSNLPrimitives
working-directory: ${{github.workspace}}/build/test/snl/python/primitives
- name: TestSNLPyLoader
working-directory: ${{github.workspace}}/build/test/snl/python/pyloader
env:
PYTHONPATH: ${{env.PYTHONPATH}}:${{github.workspace}}/build/src/snl/python/snl_wrapping
PYTHONMALLOC: malloc
run: valgrind --error-exitcode=1 --show-leak-kinds=definite --leak-check=full --errors-for-leak-kinds=definite ./snlPrimitivesTests --gtest_filter=-"*testFaultyPythonScript*"
run: valgrind --error-exitcode=1 --show-leak-kinds=definite --leak-check=full --errors-for-leak-kinds=definite ./snlPyLoaderTests --gtest_filter=-"*testFaultyPythonScript*"
1 change: 0 additions & 1 deletion src/snl/python/pyloader/SNLPyLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ void SNLPyLoader::loadDB(
Py_DECREF(pyDB);
Py_DECREF(constructString);
Py_Finalize();

}

void SNLPyLoader::loadPrimitives(
Expand Down
15 changes: 12 additions & 3 deletions test/snl/snl/kernel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,27 @@ SET(snl_tests
SNLNetTest.cpp #SNLLargeDBTest.cpp
SNLPathTest0.cpp SNLPathTest1.cpp
SNLOccurrenceTest.cpp
SNLEquipotentialTest.cpp
SNLParameterTest.cpp
SNLDB0Test.cpp
)

SET(snl_tests_with_pyloader
SNLEquipotentialTest.cpp
)

ADD_EXECUTABLE(snlTests ${snl_tests})
target_compile_definitions(snlTests PRIVATE
SNL_BENCHS_PATH="${CMAKE_CURRENT_SOURCE_DIR}/benchs")

TARGET_LINK_LIBRARIES(snlTests naja_snl_pyloader gtest gmock gtest_main)
ADD_EXECUTABLE(snlTestsWithPyLoader ${snl_tests_with_pyloader})
target_compile_definitions(snlTestsWithPyLoader PRIVATE
SNL_BENCHS_PATH="${CMAKE_CURRENT_SOURCE_DIR}/benchs")

TARGET_LINK_LIBRARIES(snlTests naja_snl gtest gmock gtest_main)
TARGET_LINK_LIBRARIES(snlTestsWithPyLoader naja_snl_pyloader gtest gmock gtest_main)

GTEST_DISCOVER_TESTS(snlTests
GTEST_DISCOVER_TESTS(snlTests)
GTEST_DISCOVER_TESTS(snlTestsWithPyLoader
PROPERTIES ENVIRONMENT
PYTHONPATH=${PROJECT_BINARY_DIR}/src/snl/python/snl_wrapping
)

0 comments on commit 5684f31

Please sign in to comment.