mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-25 10:43:15 +00:00
ci: fix run-nydus tests
GH-9973 introduced: * New function get_kata_memory_and_vcpus() in tests/metrics/lib/common.bash. * A call to get_kata_memory_and_vcpus() from extract_kata_env(), which is defined in tests/common.bash. Because the nydus test only sources tests/common.bash, it can't find get_kata_memory_and_vcpus() and errors out. We fix this by moving the get_kata_memory_and_vcpus() call from tests/common.bash to tests/metrics/lib/json.bash so that it doesn't impact the nydus test. Signed-off-by: Aurélien Bombo <abombo@microsoft.com>
This commit is contained in:
@@ -43,6 +43,11 @@ function metrics_json_init() {
|
||||
despaced_name="$(echo ${TEST_NAME} | sed 's/[ \/]/-/g')"
|
||||
json_filename="${RESULT_DIR}/${despaced_name}.json"
|
||||
|
||||
# get_kata_memory_and_vcpus() function measures the memory and the number of vcpus
|
||||
# from a kata container, and saves these values in the variables:
|
||||
# 'MEASURED_CONTAINER_NUM_VCPUS' and 'MEASURED_CONTAINER_TOTAL_MEM'
|
||||
get_kata_memory_and_vcpus
|
||||
|
||||
local json="$(cat << EOF
|
||||
"@timestamp" : $(timestamp_ms)
|
||||
EOF
|
||||
|
Reference in New Issue
Block a user