Skip to content
Snippets Groups Projects
Commit 875a4bee authored by David Vasek's avatar David Vasek Committed by Daniel Salzman
Browse files

tests-extra: move the "knottest-last" symlink to the testers' home directories

Move the "/tmp/knottest-last" symlink to the home directory of every user
who runs the test. The goal is to make the link updatable by every user
and to point to his last test run.
Also, keep the link created by the regular nightly-test runs in its output
directory (like "/tmp/tmp.K9O8sIsRSd/"), but make it a relative link, which
seems more appropriate.
parent b3976c29
No related branches found
No related tags found
No related merge requests found
Pipeline #73834 passed
......@@ -260,7 +260,7 @@ def main(args):
os.chmod(outs_dir, 0o755)
# Try to create symlink to the latest result.
last_link = os.path.join(params.outs_dir, "knottest-last")
last_link = os.path.join(params.home_dir, "knottest-last")
try:
if os.path.exists(last_link):
os.remove(last_link)
......@@ -268,6 +268,16 @@ def main(args):
except:
pass
# Make the symlink in the test directory too.
# (For backward compatibility?)
if os.path.realpath(params.outs_dir) != "/tmp":
outs_dir_relative = os.path.basename(outs_dir)
last_link_relative = os.path.join(params.outs_dir,"knottest-last")
try:
os.symlink(outs_dir_relative, last_link_relative)
except:
pass
# Write down environment.
log_environment(os.path.join(outs_dir, "environment.log"))
......
......@@ -67,6 +67,9 @@ bind_ctl = get_binary("KNOT_TEST_BINDC", "rndc")
# KNOT_TEST_OUTS_DIR - working directories location.
outs_dir = get_param("KNOT_TEST_OUTS_DIR", "/tmp")
# HOME - tester's home directory for the "knottest-last" symbolic link.
home_dir = get_param("HOME", "/tmp")
# Common data directory (e.g. zone files).
common_data_dir = ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment