| 1 | module coracle |
| 2 | |
| 3 | import nspkg.tests.signaturefixtures |
| 4 | import os |
| 5 | |
| 6 | fn test_native_installation_diskspace_matches_source_on_real_mounts() ! { |
| 7 | $if linux { |
| 8 | base := os.join_path(os.temp_dir(), 'alpm-install-space-${os.getpid()}') |
| 9 | os.mkdir_all(base)! |
| 10 | defer { os.rmdir_all(base) or { eprintln(err) } } |
| 11 | probe := os.join_path(base, 'probe') |
| 12 | signaturefixtures.command('v', ['-path', os.dir(@VMODROOT) + '|@vlib|@vmodules', '-o', |
| 13 | probe, os.join_path(@VMODROOT, 'tests', 'install_space_probe.v')])! |
| 14 | output := signaturefixtures.command('timeout', ['45s', 'unshare', '--user', '--map-root-user', |
| 15 | '--mount', probe, base, os.readlink('/proc/self/ns/mnt')!])! |
| 16 | assert output.contains('16 native/libalpm installation space comparisons verified') |
| 17 | } |
| 18 | } |
| 19 | |