#!/bin/sh

. /root/qaset/config
. /usr/share/qa/qaset/libs/common.sh

#run test
WORKLOAD_NAME="process_scheduler_cfs_cyclictest_none_rt"    # case
WORKLOAD_LOG_NAME="qa_test_cyclictest"      # suite
BENCHMARK_SCRIPT="/usr/bin/cyclictest"

cpupower -c all frequency-set -g performance
sleep 3

BENCHMARK_SCRIPT_OPTIONS="-Smu -p99 -l 100000 --quiet"
sq_benchmark_run ${WORKLOAD_NAME} ${WORKLOAD_LOG_NAME} ${BENCHMARK_SCRIPT} ${BENCHMARK_SCRIPT_OPTIONS}

# Save parsed benchmark result
BENCHMARK_RESULT_PARSER="/usr/share/qa/tools/test_cyclictest_benchmark_parser.py"
${BENCHMARK_RESULT_PARSER} -f "${WORKLOAD_LOG_DIR}/${WORKLOAD_NAME}"
ret=$((ret+$?))

