The log file directory is configurable with run.py using the
--log-dir argument. This patch removes the use of /tmp as
the default dir for storing all test logs. The default
log dir is now set to show the year, month and day
of the test run. This provides a more meaningful aggregation
of test logs for effective troubleshooting. The default log
dir is set to <CWD>/test-run-YYYY-MM-DD.
Type: improvement
Change-Id: I6c9002e961f6e06fc953ca42d86febf4f218e566
Signed-off-by: Naveen Joy <najoy@cisco.com>
# debian packaging
.pc
+
+# No test log files
+**/test-run-*-*-*
+
import sys
import time
import venv
+import datetime
# Required Std. Path Variables
f"--filter={test}",
f"--jobs={jobs}",
f"--log-dir={log_dir}",
+ f"--tmp-dir={log_dir}",
]
if running_vpp:
args = args + [f"--use-running-vpp"]
parser.add_argument(
"--log-dir",
action="store",
- default="/tmp",
+ default=os.path.abspath(f"./test-run-{datetime.date.today()}"),
help="directory where to store directories "
- "containing log files (default: /tmp)",
+ "containing log files (default: ./test-run-YYYY-MM-DD)",
)
parser.add_argument(
"--jobs",