|
1 | 1 | # Unit tests for archSystemFile(), the arch-aware wrapper around system.file() |
2 | | -# introduced when systemFile() was renamed (see #251, #252). It injects the |
3 | | -# architecture-specific subdirectory (.Platform$r_arch) used on Windows, e.g. |
4 | | -# archSystemFile("lib") -> 'lib/x64', while behaving like system.file() |
5 | | -# elsewhere. Note that this subdirectory only ever holds compiled libraries |
6 | | -# ('lib', 'libs'); headers and other resources are never installed under it. |
| 2 | +# introduced when systemFile() was renamed (see #251, #252). When R is built |
| 3 | +# multi-arch -- typically Windows, but also possible on Linux and macOS -- it |
| 4 | +# installs compiled libraries under an architecture-specific subdirectory named |
| 5 | +# by .Platform$r_arch, e.g. 'libs/x64'. archSystemFile() injects that subdir, |
| 6 | +# and behaves like system.file() when r_arch is unset. Note the subdir only |
| 7 | +# ever holds compiled libraries ('lib', 'libs'); headers and other resources |
| 8 | +# are never installed under it. |
7 | 9 |
|
8 | 10 | RcppParallel:::test_init() |
9 | 11 |
|
@@ -40,8 +42,8 @@ assert(samePath(archSystemFile("lib"), expected("lib"))) |
40 | 42 | assert(samePath(archSystemFile("lib", "libtbb.so"), expected("lib", "libtbb.so"))) |
41 | 43 |
|
42 | 44 | # the package's own compiled code is installed under 'libs' (or 'libs/<arch>' |
43 | | -# on Windows) -- exactly the arch-aware lookup archSystemFile() exists for -- |
44 | | -# so it must resolve to an existing directory on every platform |
| 45 | +# under a multi-arch R) -- exactly the arch-aware lookup archSystemFile() |
| 46 | +# exists for -- so it must resolve to an existing directory on every platform |
45 | 47 | libs <- archSystemFile("libs") |
46 | 48 | assert(nzchar(libs)) |
47 | 49 | assert(dir.exists(libs)) |
0 commit comments