Skip to content
Snippets Groups Projects
Commit 749c133b authored by Erik von Reis's avatar Erik von Reis
Browse files

added newline at end of daq master file. fixed tests for checkdaqconfig

parent ec8df421
No related branches found
No related tags found
1 merge request!175Added newline at end of daq master file. Fixed tests for checkdaqconfig.py
......@@ -323,7 +323,7 @@ with open(lockfile, "w") as lock_f:
# create master file
with open(new_master, "w") as mf:
mf.write("\n".join(master_entries))
mf.write("\n".join(master_entries)+"\n")
# link to master
create_link(new_archive, master_link)
......
......@@ -12,8 +12,7 @@ test_hash = "7d134aad8c722085dda3b78b2ba20233"
def get_test_dir(test_folder):
global test_dir
base_dir, _ = path.split(__file__)
base_dir, _ = path.split(path.abspath(__file__))
abs_test_dir = path.join(base_dir, test_dir)
return path.join(abs_test_dir, test_folder)
......@@ -47,8 +46,11 @@ def test_link(self, daq_name):
link_path = f"{self.base_path}/{daq_name}/running"
self.assertTrue(path.lexists(link_path), "running doesn't exist")
self.assertTrue(path.islink(link_path), "running not a link")
print(f"link path is: {link_path}")
real_path = path.realpath(link_path)
self.assertEqual(real_path, self.hash_path, f"running pointing to wrong path: {real_path}")
print(f"real path is: {real_path}")
real_hash_path = path.realpath(self.hash_path)
self.assertEqual(real_path, self.hash_path, f"'running' link pointing to wrong path")
class TargetTestCase(unittest.TestCase):
def setUp(self):
......
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