@@ -188,6 +188,20 @@ def test_detect_ubuntu_20(self):
188
188
self .assertEqual (hpccm .config .g_linux_distro , linux_distro .UBUNTU )
189
189
self .assertEqual (hpccm .config .g_linux_version , Version ('20.04' ))
190
190
191
+ @docker
192
+ def test_detect_ubuntu_22 (self ):
193
+ """Base image Linux distribution detection"""
194
+ b = baseimage (image = 'ubuntu:22.04' )
195
+ self .assertEqual (hpccm .config .g_linux_distro , linux_distro .UBUNTU )
196
+ self .assertEqual (hpccm .config .g_linux_version , Version ('22.04' ))
197
+
198
+ @docker
199
+ def test_detect_ubuntu_24 (self ):
200
+ """Base image Linux distribution detection"""
201
+ b = baseimage (image = 'ubuntu:24.04' )
202
+ self .assertEqual (hpccm .config .g_linux_distro , linux_distro .UBUNTU )
203
+ self .assertEqual (hpccm .config .g_linux_version , Version ('24.04' ))
204
+
191
205
@docker
192
206
def test_detect_centos (self ):
193
207
"""Base image Linux distribution detection"""
@@ -216,6 +230,13 @@ def test_detect_rockylinux_8(self):
216
230
self .assertEqual (hpccm .config .g_linux_distro , linux_distro .ROCKYLINUX )
217
231
self .assertEqual (hpccm .config .g_linux_version , Version ('8.0' ))
218
232
233
+ @docker
234
+ def test_detect_rockylinux_9 (self ):
235
+ """Base image Linux distribution detection"""
236
+ b = baseimage (image = 'rockylinux/rockylinux:9' )
237
+ self .assertEqual (hpccm .config .g_linux_distro , linux_distro .ROCKYLINUX )
238
+ self .assertEqual (hpccm .config .g_linux_version , Version ('9.0' ))
239
+
219
240
@docker
220
241
def test_detect_ubi7 (self ):
221
242
"""Base image Linux distribution detection"""
@@ -274,6 +295,20 @@ def test_distro_ubuntu20(self):
274
295
self .assertEqual (hpccm .config .g_linux_distro , linux_distro .UBUNTU )
275
296
self .assertEqual (hpccm .config .g_linux_version , Version ('20.04' ))
276
297
298
+ @docker
299
+ def test_distro_ubuntu22 (self ):
300
+ """Base image Linux distribution specification"""
301
+ b = baseimage (image = 'foo' , _distro = 'ubuntu22' )
302
+ self .assertEqual (hpccm .config .g_linux_distro , linux_distro .UBUNTU )
303
+ self .assertEqual (hpccm .config .g_linux_version , Version ('22.04' ))
304
+
305
+ @docker
306
+ def test_distro_ubuntu24 (self ):
307
+ """Base image Linux distribution specification"""
308
+ b = baseimage (image = 'foo' , _distro = 'ubuntu24' )
309
+ self .assertEqual (hpccm .config .g_linux_distro , linux_distro .UBUNTU )
310
+ self .assertEqual (hpccm .config .g_linux_version , Version ('24.04' ))
311
+
277
312
@docker
278
313
def test_distro_centos (self ):
279
314
"""Base image Linux distribution specification"""
@@ -295,6 +330,20 @@ def test_distro_centos8(self):
295
330
self .assertEqual (hpccm .config .g_linux_distro , linux_distro .CENTOS )
296
331
self .assertEqual (hpccm .config .g_linux_version , Version ('8.0' ))
297
332
333
+ @docker
334
+ def test_distro_rockylinux8 (self ):
335
+ """Base image Linux distribution specification"""
336
+ b = baseimage (image = 'foo' , _distro = 'rockylinux8' )
337
+ self .assertEqual (hpccm .config .g_linux_distro , linux_distro .CENTOS )
338
+ self .assertEqual (hpccm .config .g_linux_version , Version ('8.0' ))
339
+
340
+ @docker
341
+ def test_distro_rockylinux9 (self ):
342
+ """Base image Linux distribution specification"""
343
+ b = baseimage (image = 'foo' , _distro = 'rockylinux9' )
344
+ self .assertEqual (hpccm .config .g_linux_distro , linux_distro .CENTOS )
345
+ self .assertEqual (hpccm .config .g_linux_version , Version ('9.0' ))
346
+
298
347
@docker
299
348
def test_distro_nonexistent (self ):
300
349
"""Base image Linux distribution specification"""
0 commit comments