diff --git a/core/common_radiohdl.py b/core/common_radiohdl.py index 78e12a00a2cba701605ff30aa5b0f4e922360260..fd3c80f066ae9e7cf580375d447bb37ce5c4a860 100644 --- a/core/common_radiohdl.py +++ b/core/common_radiohdl.py @@ -84,7 +84,7 @@ def mkdir(path): expand_path = os.path.expandvars(path) # support using environment variables in the file path expand_path = os.path.expanduser(expand_path) # support using ~ in the file path if not os.path.exists(expand_path): - print("expand_path=%s", expand_path) + print("expand_path=%s" % expand_path) os.makedirs(expand_path) diff --git a/regressiontest/modelsim_regression_test_vhdl.py b/regressiontest/modelsim_regression_test_vhdl.py index 388b6a38e4cbd5bae3cb1af649e70af1c01e7642..8d9d049eacf6efab1b95a352d98b1e78eeeee7db 100755 --- a/regressiontest/modelsim_regression_test_vhdl.py +++ b/regressiontest/modelsim_regression_test_vhdl.py @@ -451,8 +451,7 @@ class TestBenchWorker(multiprocessing.Process): if not os.path.exists(sim_dir): os.mkdir(sim_dir) os.environ["HDL_IOFILE_SIM_DIR"] = sim_dir - - logger.info("%s", str(os.environ)) + # logger.debug("%s", str(os.environ)) terminal = Terminal(print_stdout_on_timeout=True) terminal.run_cmd(f"rm -rf {sim_dir}/*") diff --git a/regressiontest/modelsim_regression_test_vhdl_cron.sh b/regressiontest/modelsim_regression_test_vhdl_cron.sh index 5130f325a9bb7061405470c11c39cc12c2c7de60..03d9f8cba17209338d3aaadd91d98cf1d9be4762 100755 --- a/regressiontest/modelsim_regression_test_vhdl_cron.sh +++ b/regressiontest/modelsim_regression_test_vhdl_cron.sh @@ -46,19 +46,19 @@ set -e . "${HOME}"/git/radiohdl/generic.sh buildset_filename="${1:-}" -hdl_info "$0" "Do regressiontest for buildsets in file: ${buildset_filename}" +echo ".. Do regressiontest for buildsets in file: ${buildset_filename}" # go to the hdl firmware repository, exit if not excisting -hdl_exec "$0" cd "${HOME}"/git/hdl || exit +cd "${HOME}"/git/hdl || exit # init hdl -echo "initialize hdl" +echo ".. initialize hdl" . ./init_hdl.sh # update hdl from repository, -echo "update hdl repository" -hdl_exec "$0" git reset --hard -hdl_exec "$0" git pull +echo ".. Update hdl repository" +git reset --hard +git pull # get hash from last test if file excists git_prev_hash="none" @@ -67,58 +67,60 @@ git_hash_filename="${RADIOHDL_LOG_DIR}"/modelsim_previous_git_hash.txt git_active_hash=$(git rev-parse HEAD) # make clean modelsim_build_list from given buildset_filename, skip lines starting with # -grep -v '^#' < "${buildset_filename}" > modelsim_used_buildset_list.txt +echo ".. Read buildsets to check from: ${buildset_filename}" +echo " and make a clean list in: ${RADIOHDL_LOG_DIR}/modelsim_used_buildset_list.txt" +grep -v '^#' < "${buildset_filename}" > "${RADIOHDL_LOG_DIR}/modelsim_used_buildset_list.txt" # Modelsim test for each line in 'modelsim_used_buildset_list.txt' while read -r line; do + echo ". Next line in 'modelsim_used_buildset_list.txt' is '${line}'" if [ -n "${line}" ]; then buildset=$(echo "${line}" | cut -d " " -f1) - hdl_info "$0" "Do all regressiontests for ${buildset}" + echo ".. Do all regressiontests for ${buildset}" logfile="${RADIOHDL_LOG_DIR}/${buildset}/modelsim_regressiontest.log" - + # Using > will start a new file + echo "Do all regressiontests for ${buildset}" > "${logfile}" + # Delete tempory modelsim files '/tmp/VSOUT*' - hdl_exec "$0" rm -f /tmp/VSOUT* + echo ".. Remove old /tmp/VSOUT* files" + hdl_exec "$0" rm -f /tmp/VSOUT* 1>> "${logfile}" 2>&1 if [ "${git_active_hash}" == "${git_prev_hash}" ]; then - hdl_info "$0" "Skip regression test NO change in repository" + echo ".. Skip regression test, NO change in repository" # Send nothing changed mail (-n option) - hdl_info "$0" "call modelsim_regression_test_vhdl_mail" + echo ".. Call modelsim_regression_test_vhdl_mail --nochange" hdl_exec "$0" modelsim_regression_test_vhdl_mail.py "${buildset}" --nochange 1>> "${logfile}" 2>&1 continue fi - # Delete any previous log files - if [ -f "${logfile}" ]; then - hdl_exec "$0" rm -f "${logfile}" - fi - - echo "cleanup last build" # Cleanup last build if exists - hdl_exec "$0" rm -rf "${HDL_BUILD_DIR:?}"/"${buildset}" + echo ".. Cleanup last build ${buildset}" + hdl_exec "$0" rm -rf "${HDL_BUILD_DIR:?}"/"${buildset}" 1>> "${logfile}" 2>&1 # Build all IP - echo "call compile_altera_simlibs" + echo ".. Call compile_altera_simlibs" hdl_exec "$0" compile_altera_simlibs "${buildset}" 1>> "${logfile}" 2>&1 - echo "call generate_ip_libs" + echo ".. Call generate_ip_libs" hdl_exec "$0" generate_ip_libs "${buildset}" 1>> "${logfile}" 2>&1 # re-create it with modelsim_config and quartus_config - echo "call modelsim_config" + echo ".. Call modelsim_config" hdl_exec "$0" modelsim_config "${buildset}" 1>> "${logfile}" 2>&1 - echo "call quartus_config" + echo ".. Call quartus_config" hdl_exec "$0" quartus_config "${buildset}" 1>> "${logfile}" 2>&1 # Perform the regression test and put the output in a log file # -p 4: number of simultaneously test processes, each process needs a license - echo "call modelsim_regression_test_vhdl" + echo ".. Call modelsim_regression_test_vhdl" hdl_exec "$0" modelsim_regression_test_vhdl.py "${buildset}" -p 4 1>> "${logfile}" 2>&1 # Read the log file en send the result email - echo "call modelsim_regression_test_vhdl_mail" + echo ".. Call modelsim_regression_test_vhdl_mail" hdl_exec "$0" modelsim_regression_test_vhdl_mail.py "${buildset}" 1>> "${logfile}" 2>&1 + fi -done < modelsim_used_buildset_list.txt +done < "${RADIOHDL_LOG_DIR}/modelsim_used_buildset_list.txt" # save hash for next run echo "${git_active_hash}" > "${git_hash_filename}"