@@ -56,6 +56,12 @@ def test_merge_config_files(mutable_config, mutable_mock_workspace_path, mock_ap
56
56
spack:
57
57
packages: {}
58
58
environments: {}
59
+ """
60
+ test_licenses = """
61
+ licenses:
62
+ zlib:
63
+ set:
64
+ TEST_LICENSE: 'port@server'
59
65
"""
60
66
workspace_name = "test_merge_config_files"
61
67
with ramble .workspace .create (workspace_name ) as ws :
@@ -70,15 +76,20 @@ def test_merge_config_files(mutable_config, mutable_mock_workspace_path, mock_ap
70
76
71
77
applications_file = os .path .join (ws .root , "applications_test.yaml" )
72
78
spack_file = os .path .join (ws .root , "spack_test.yaml" )
79
+ licenses_file = os .path .join (ws .root , "licenses.yaml" )
73
80
74
81
with open (applications_file , "w+" ) as f :
75
82
f .write (test_applications )
76
83
77
84
with open (spack_file , "w+" ) as f :
78
85
f .write (test_spack )
79
86
87
+ with open (licenses_file , "w" ) as f :
88
+ f .write (test_licenses )
89
+
80
90
config ("add" , "-f" , applications_file , global_args = ["-w" , workspace_name ])
81
91
config ("add" , "-f" , spack_file , global_args = ["-w" , workspace_name ])
92
+ config ("add" , "-f" , licenses_file , global_args = ["-w" , workspace_name ])
82
93
83
94
ws ._re_read ()
84
95
@@ -88,3 +99,12 @@ def test_merge_config_files(mutable_config, mutable_mock_workspace_path, mock_ap
88
99
assert "test_experiment" in data
89
100
assert "zlib" in data
90
101
assert "spack_spec: [email protected] " in data
102
+ assert "licenses" in data
103
+ assert "TEST_LICENSE: port@server" in data
104
+
105
+ workspace ("setup" , "--dry-run" , global_args = ["-w" , workspace_name ])
106
+ exec_file = os .path .join (
107
+ ws .experiment_dir , "zlib" , "ensure_installed" , "test_experiment" , "execute_experiment"
108
+ )
109
+ with open (exec_file ) as f :
110
+ assert "license.inc" in f .read ()
0 commit comments