From f1b0e55e7825f153c10bbdca544b9a7ba172fdfd Mon Sep 17 00:00:00 2001
From: Sergey Yakubov <sergey.yakubov@desy.de>
Date: Mon, 3 May 2021 20:17:30 +0200
Subject: [PATCH] use python3 for test

---
 .../bug_fixes/streamlist_python_multithread/CMakeLists.txt | 7 +++++--
 .../bug_fixes/streamlist_python_multithread/check_linux.sh | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/automatic/bug_fixes/streamlist_python_multithread/CMakeLists.txt b/tests/automatic/bug_fixes/streamlist_python_multithread/CMakeLists.txt
index 32b3c885e..704002fc8 100644
--- a/tests/automatic/bug_fixes/streamlist_python_multithread/CMakeLists.txt
+++ b/tests/automatic/bug_fixes/streamlist_python_multithread/CMakeLists.txt
@@ -1,8 +1,11 @@
-set(TARGET_NAME consumer_python_memleak)
+set(TARGET_NAME streamlist_python)
 
 
 prepare_asapo()
 
+find_package (Python3 REQUIRED)
+
+
 if (UNIX)
     get_target_property(PYTHON_LIBS python-lib-consumer BINARY_DIR)
     get_target_property(PYTHON_LIBS_PRODUCER python-lib-producer BINARY_DIR)
@@ -11,7 +14,7 @@ else()
     get_target_property(PYTHON_LIBS_PRODUCER asapo_producer BINARY_DIR)
 endif()
 
-add_script_test("${TARGET_NAME}" "${PYTHON_LIBS} ${PYTHON_LIBS_PRODUCER} ${Python_EXECUTABLE}" nomem)
+add_script_test("${TARGET_NAME}" "${PYTHON_LIBS} ${PYTHON_LIBS_PRODUCER} ${Python3_EXECUTABLE}" nomem)
 
 configure_file(magic_producer.py magic_producer.py COPYONLY)
 
diff --git a/tests/automatic/bug_fixes/streamlist_python_multithread/check_linux.sh b/tests/automatic/bug_fixes/streamlist_python_multithread/check_linux.sh
index 162da7d2d..678925935 100644
--- a/tests/automatic/bug_fixes/streamlist_python_multithread/check_linux.sh
+++ b/tests/automatic/bug_fixes/streamlist_python_multithread/check_linux.sh
@@ -28,9 +28,9 @@ nomad run authorizer.nmd
 sleep 1
 
 export PYTHONPATH=$1:$2:${PYTHONPATH}
-export Python_EXECUTABLE=$3
+export Python3_EXECUTABLE=$3
 
-$Python_EXECUTABLE magic_producer.py $endpoint $beamtime_id $token > out
+$Python3_EXECUTABLE magic_producer.py $endpoint $beamtime_id $token > out
 cat out
 cat out | grep "5 : number of streams source_1:  5"
 cat out | grep "5 : number of streams source_2:  5"
-- 
GitLab