[PATCH] tester: Make the SIS time limit user configurable

chrisj at rtems.org chrisj at rtems.org
Tue Jul 5 23:51:21 UTC 2022


From: Chris Johns <chrisj at rtems.org>

Let the user set the test time limit in a config file to
provide site specific overrides. Optimisation can effect
the time a test may take to run.
---
 tester/rtems/testing/bsps/erc32-sis.ini      |  5 +-
 tester/rtems/testing/bsps/gr740-sis.ini      |  5 +-
 tester/rtems/testing/bsps/griscv-sis-cov.ini |  5 +-
 tester/rtems/testing/bsps/griscv-sis.ini     |  5 +-
 tester/rtems/testing/bsps/leon2-sis.ini      |  5 +-
 tester/rtems/testing/bsps/leon3-run.ini      |  3 +-
 tester/rtems/testing/bsps/leon3-sis-cov.ini  |  5 +-
 tester/rtems/testing/bsps/leon3-sis.ini      |  5 +-
 tester/rtems/testing/bsps/sis-run.ini        |  5 +-
 tester/rtems/testing/sis.cfg                 | 72 ++++++++++++++++++++
 10 files changed, 89 insertions(+), 26 deletions(-)
 create mode 100644 tester/rtems/testing/sis.cfg

diff --git a/tester/rtems/testing/bsps/erc32-sis.ini b/tester/rtems/testing/bsps/erc32-sis.ini
index fca2122..a025265 100644
--- a/tester/rtems/testing/bsps/erc32-sis.ini
+++ b/tester/rtems/testing/bsps/erc32-sis.ini
@@ -34,6 +34,5 @@
 [erc32-sis]
 bsp          = erc32
 arch         = sparc
-tester       = %{_rtscripts}/run.cfg
-bsp_run_cmd  = %{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-sis
-bsp_run_opts = -nouartrx -r -tlim 600 s
+tester       = %{_rtscripts}/sis.cfg
+bsp_run_opts =
diff --git a/tester/rtems/testing/bsps/gr740-sis.ini b/tester/rtems/testing/bsps/gr740-sis.ini
index b71048c..c42d716 100644
--- a/tester/rtems/testing/bsps/gr740-sis.ini
+++ b/tester/rtems/testing/bsps/gr740-sis.ini
@@ -33,6 +33,5 @@
 [gr740-sis]
 bsp          = gr740
 arch         = sparc
-tester       = %{_rtscripts}/run.cfg
-bsp_run_cmd  = %{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-sis
-bsp_run_opts = -gr740 -nouartrx -r -tlim 200 s -m 4
+tester       = %{_rtscripts}/sis.cfg
+bsp_run_opts = -gr740 -m 4
diff --git a/tester/rtems/testing/bsps/griscv-sis-cov.ini b/tester/rtems/testing/bsps/griscv-sis-cov.ini
index 9ab37a8..fa86b55 100644
--- a/tester/rtems/testing/bsps/griscv-sis-cov.ini
+++ b/tester/rtems/testing/bsps/griscv-sis-cov.ini
@@ -34,7 +34,6 @@
 [griscv-sis-cov]
 bsp            = griscv-sis
 arch           = riscv
-tester         = %{_rtscripts}/run.cfg
-bsp_run_cmd    = %{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-sis
-bsp_run_opts   = -nouartrx -r -tlim 300 s -m 4 -cov
+tester         = %{_rtscripts}/sis.cfg
+bsp_run_opts   = -m 4 -cov
 bsp_covoar_cmd = -S %{bsp_symbol_path} -E %{cov_explanations} -f TSIM
diff --git a/tester/rtems/testing/bsps/griscv-sis.ini b/tester/rtems/testing/bsps/griscv-sis.ini
index b21cba1..bf32851 100644
--- a/tester/rtems/testing/bsps/griscv-sis.ini
+++ b/tester/rtems/testing/bsps/griscv-sis.ini
@@ -34,6 +34,5 @@
 [griscv-sis]
 bsp          = griscv
 arch         = riscv
-tester       = %{_rtscripts}/run.cfg
-bsp_run_cmd  = %{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-sis
-bsp_run_opts = -nouartrx -r -tlim 300 s -m 4
+tester       = %{_rtscripts}/sis.cfg
+bsp_run_opts = -m 4
diff --git a/tester/rtems/testing/bsps/leon2-sis.ini b/tester/rtems/testing/bsps/leon2-sis.ini
index 61205ad..810320c 100644
--- a/tester/rtems/testing/bsps/leon2-sis.ini
+++ b/tester/rtems/testing/bsps/leon2-sis.ini
@@ -34,6 +34,5 @@
 [leon2-sis]
 bsp          = leon2
 arch         = sparc
-tester       = %{_rtscripts}/run.cfg
-bsp_run_cmd  = %{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-sis
-bsp_run_opts = -leon2 -nouartrx -r -tlim 200 s
+tester       = %{_rtscripts}/sis.cfg
+bsp_run_opts = -leon2
diff --git a/tester/rtems/testing/bsps/leon3-run.ini b/tester/rtems/testing/bsps/leon3-run.ini
index a8c97a6..99c391b 100644
--- a/tester/rtems/testing/bsps/leon3-run.ini
+++ b/tester/rtems/testing/bsps/leon3-run.ini
@@ -34,6 +34,5 @@
 [leon3-run]
 bsp          = leon3
 arch         = sparc
-tester       = %{_rtscripts}/run.cfg
-bsp_run_cmd  = %{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-run
+tester       = %{_rtscripts}/sis.cfg
 bsp_run_opts = -a -leon3
diff --git a/tester/rtems/testing/bsps/leon3-sis-cov.ini b/tester/rtems/testing/bsps/leon3-sis-cov.ini
index d8ffe28..7c6a279 100644
--- a/tester/rtems/testing/bsps/leon3-sis-cov.ini
+++ b/tester/rtems/testing/bsps/leon3-sis-cov.ini
@@ -34,7 +34,6 @@
 [leon3-sis-cov]
 bsp            = leon3-sis
 arch           = sparc
-tester         = %{_rtscripts}/run.cfg
-bsp_run_cmd    = %{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-sis
-bsp_run_opts   = -leon3 -nouartrx -r -tlim 200 s -cov
+tester         = %{_rtscripts}/sis.cfg
+bsp_run_opts   = -leon3 -cov
 bsp_covoar_cmd = -S %{bsp_symbol_path} -E %{cov_explanations} -f TSIM
diff --git a/tester/rtems/testing/bsps/leon3-sis.ini b/tester/rtems/testing/bsps/leon3-sis.ini
index 2f933a7..9035f48 100644
--- a/tester/rtems/testing/bsps/leon3-sis.ini
+++ b/tester/rtems/testing/bsps/leon3-sis.ini
@@ -34,6 +34,5 @@
 [leon3-sis]
 bsp          = leon3
 arch         = sparc
-tester       = %{_rtscripts}/run.cfg
-bsp_run_cmd  = %{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-sis
-bsp_run_opts = -leon3 -nouartrx -r -tlim 200 s -m 4
+tester       = %{_rtscripts}/sis.cfg
+bsp_run_opts = -leon3 -m 4
diff --git a/tester/rtems/testing/bsps/sis-run.ini b/tester/rtems/testing/bsps/sis-run.ini
index 55c30ac..c34eae4 100644
--- a/tester/rtems/testing/bsps/sis-run.ini
+++ b/tester/rtems/testing/bsps/sis-run.ini
@@ -34,6 +34,5 @@
 [sis-run]
 bsp          = sis
 arch         = sparc
-tester       = %{_rtscripts}/run.cfg
-bsp_run_cmd  = %{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-run
-bsp_run_opts = -a -nouartrx
+tester       = %{_rtscripts}/sis.cfg
+bsp_run_opts = -a
diff --git a/tester/rtems/testing/sis.cfg b/tester/rtems/testing/sis.cfg
new file mode 100644
index 0000000..bb8d0bc
--- /dev/null
+++ b/tester/rtems/testing/sis.cfg
@@ -0,0 +1,72 @@
+#
+# RTEMS Tools Project (http://www.rtems.org/)
+# Copyright 2022 Chris Johns (chrisj at rtems.org)
+# All rights reserved.
+#
+# This file is part of the RTEMS Tools package in 'rtems-tools'.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# 1. Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# SIS. The main simulator for SPARC/LEON
+#
+# Use sis command to run the executable in the spike simulator.
+#
+
+%include %{_configdir}/base.cfg
+%include %{_configdir}/checks.cfg
+
+#
+# Console.
+#
+%define console_stdio
+%include %{_configdir}/console.cfg
+
+#
+# RTEMS version
+#
+%include %{_rtdir}/rtems/version.cfg
+
+#
+# Timeout option. This is the default for timeout for the CPU realtime
+# clock
+
+%ifn %{defined sis_time_limit}
+ %define sis_time_limit -tlim 400 s
+%endif
+
+#
+# Default command
+#
+%ifn %{defined bsp_run_cmd}
+ %define bsp_run_cmd %{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-sis
+%endif
+
+%define sis_cmd %{bsp_run_cmd}
+%define sis_opts -nouartrx -r %{sis_time_limit} %{bsp_run_opts}
+
+#
+# Executable
+#
+%execute %{sis_cmd} %{sis_opts} %{test_executable}
-- 
2.24.1



More information about the devel mailing list