texinfoInteractive: refactor XFAIL_TESTS

The previous code had to avoid a mass rebuild. Clean it up.

Changed files
+24 -19
pkgs
development
tools
misc
texinfo
+24 -19
pkgs/development/tools/misc/texinfo/common.nix
···
patch -p1 -d gnulib < ${gnulib.passthru.longdouble-redirect-patch}
'';
-
# ncurses is required to build `makedoc'
-
# this feature is introduced by the ./cross-tools-flags.patch
-
NATIVE_TOOLS_CFLAGS = if crossBuildTools then "-I${getDev buildPackages.ncurses}/include" else null;
-
NATIVE_TOOLS_LDFLAGS = if crossBuildTools then "-L${getLib buildPackages.ncurses}/lib" else null;
+
env =
+
{
+
XFAIL_TESTS = toString (
+
optionals stdenv.hostPlatform.isMusl [
+
# musl does not support locales.
+
"different_languages_gen_master_menu.sh"
+
"test_scripts/formatting_documentlanguage_cmdline.sh"
+
"test_scripts/layout_formatting_fr_info.sh"
+
"test_scripts/layout_formatting_fr.sh"
+
"test_scripts/layout_formatting_fr_icons.sh"
+
]
+
++ optionals (!stdenv.hostPlatform.isMusl && versionOlder version "7") [
+
# Test is known to fail on various locales on texinfo-6.8:
+
# https://lists.gnu.org/r/bug-texinfo/2021-07/msg00012.html
+
"test_scripts/layout_formatting_fr_icons.sh"
+
]
+
);
+
}
+
// lib.optionalAttrs crossBuildTools {
+
# ncurses is required to build `makedoc'
+
# this feature is introduced by the ./cross-tools-flags.patch
+
NATIVE_TOOLS_CFLAGS = "-I${getDev buildPackages.ncurses}/include";
+
NATIVE_TOOLS_LDFLAGS = "-L${getLib buildPackages.ncurses}/lib";
+
};
strictDeps = true;
enableParallelBuilding = true;
···
checkInputs = optionals (lib.versionAtLeast version "7.2") [ glibcLocales ];
doCheck = interactive && !stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isSunOS; # flaky
-
-
# musl does not support locales.
-
preCheck =
-
if interactive && stdenv.hostPlatform.isMusl then
-
''
-
checkFlagsArray+=(XFAIL_TESTS="different_languages_gen_master_menu.sh test_scripts/formatting_documentlanguage_cmdline.sh test_scripts/layout_formatting_fr_info.sh test_scripts/layout_formatting_fr.sh test_scripts/layout_formatting_fr_icons.sh")
-
''
-
else
-
null;
-
-
checkFlags = optionals (!stdenv.hostPlatform.isMusl && versionOlder version "7") [
-
# Test is known to fail on various locales on texinfo-6.8:
-
# https://lists.gnu.org/r/bug-texinfo/2021-07/msg00012.html
-
"XFAIL_TESTS=test_scripts/layout_formatting_fr_icons.sh"
-
];
postFixup = optionalString crossBuildTools ''
for f in "$out"/bin/{pod2texi,texi2any}; do