Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use absolute path of python3 #45

Merged
merged 1 commit into from
Oct 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ add_test(NAME test_tmux

add_test(NAME test_python3
COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/compare_stdout.py
${CMAKE_BINARY_DIR}/sloader python3 --help)
${CMAKE_BINARY_DIR}/sloader /usr/bin/python3 --help)

add_test(NAME test_gcc
COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/compare_stdout.py
Expand All @@ -181,20 +181,25 @@ add_test(
NAME test_python3_hello
COMMAND
python3 ${CMAKE_CURRENT_SOURCE_DIR}/compare_stdout.py
${CMAKE_BINARY_DIR}/sloader python3 ${CMAKE_CURRENT_SOURCE_DIR}/hello.py)
${CMAKE_BINARY_DIR}/sloader /usr/bin/python3 ${CMAKE_CURRENT_SOURCE_DIR}/hello.py)

add_test(
NAME test_python3_ctypes
COMMAND
python3 ${CMAKE_CURRENT_SOURCE_DIR}/compare_stdout.py
${CMAKE_BINARY_DIR}/sloader python3 ${CMAKE_CURRENT_SOURCE_DIR}/ctypes.py)

add_test(
NAME test_python3_torch_ones
COMMAND
python3 ${CMAKE_CURRENT_SOURCE_DIR}/compare_stdout.py
${CMAKE_BINARY_DIR}/sloader python3
${CMAKE_CURRENT_SOURCE_DIR}/torch_ones.py)
${CMAKE_BINARY_DIR}/sloader /usr/bin/python3 ${CMAKE_CURRENT_SOURCE_DIR}/ctypes.py)

# Installing additional packages is required but not supported yet.
#
# Just `python3` may be a bash script because of pyenv. So, we must use
# `/usr/bin/python3` instead. Then, we must install torch system-wide. But, I
# don't want to install torch system-wide just for testing.
# add_test(
# NAME test_python3_torch_ones
# COMMAND
# python3 ${CMAKE_CURRENT_SOURCE_DIR}/compare_stdout.py
# ${CMAKE_BINARY_DIR}/sloader /usr/bin/python3
# ${CMAKE_CURRENT_SOURCE_DIR}/torch_ones.py)

add_test(
NAME test_bash_plus
Expand Down