diff options
author | Roel Janssen <roel@gnu.org> | 2016-01-05 15:43:50 +0100 |
---|---|---|
committer | Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> | 2016-01-05 16:24:57 +0100 |
commit | a7ec569c98af8a1c310a32e19f0c01cdd7334af6 (patch) | |
tree | 6b760a9d63077b46ab4d8a78f663f3874d26a379 /gnu/packages/patches/ldc-disable-tests.patch | |
parent | 1075b43737825e3eea24e31ad02142c45747d4bb (diff) | |
download | guix-a7ec569c98af8a1c310a32e19f0c01cdd7334af6.tar guix-a7ec569c98af8a1c310a32e19f0c01cdd7334af6.tar.gz |
gnu: Add LDC.
* gnu/packages/ldc.scm: New file.
* gnu/packages/patches/ldc-disable-tests.patch: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add ldc.scm.
(dist_patch_DATA): Add patch file.
Diffstat (limited to 'gnu/packages/patches/ldc-disable-tests.patch')
-rw-r--r-- | gnu/packages/patches/ldc-disable-tests.patch | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/gnu/packages/patches/ldc-disable-tests.patch b/gnu/packages/patches/ldc-disable-tests.patch new file mode 100644 index 0000000000..3f5e6c29a1 --- /dev/null +++ b/gnu/packages/patches/ldc-disable-tests.patch @@ -0,0 +1,90 @@ +This patch fixes a failing unit test by feeding buildNormalizedPath to the +tzdata properly. Three other tests are disabled, one assumes /root and the +two others use networking. Not bad out of almost 700 tests! + +by Pjotr Prins <pjotr.guix@thebird.nl> + +diff --git a/std/datetime.d b/std/datetime.d +index 8e4ed3b..6c15bc5 100644 +--- a/std/datetime.d ++++ b/std/datetime.d +@@ -28018,6 +28018,7 @@ public: + The default directory where the TZ Database files are. It's empty + for Windows, since Windows doesn't have them. + +/ ++ + enum defaultTZDatabaseDir = "/usr/share/zoneinfo/"; + } + else version(Windows) +@@ -28069,14 +28070,13 @@ assert(tz.dstName == "PDT"); + import std.range : retro; + import std.format : format; + +- name = strip(name); +- + enforce(tzDatabaseDir.exists(), new DateTimeException(format("Directory %s does not exist.", tzDatabaseDir))); + enforce(tzDatabaseDir.isDir, new DateTimeException(format("%s is not a directory.", tzDatabaseDir))); + +- immutable file = buildNormalizedPath(tzDatabaseDir, name); ++ auto filename = "./" ~ strip(name); // make sure the prefix is not stripped ++ immutable file = buildNormalizedPath(tzDatabaseDir, filename); + +- enforce(file.exists(), new DateTimeException(format("File %s does not exist.", file))); ++ enforce(file.exists(), new DateTimeException(format("File %s does not exist in %s.", file, tzDatabaseDir))); + enforce(file.isFile, new DateTimeException(format("%s is not a file.", file))); + + auto tzFile = File(file); +diff --git a/std/path.d b/std/path.d +index 254d8f0..b0fc04d 100644 +--- a/std/path.d ++++ b/std/path.d +@@ -3080,8 +3080,11 @@ unittest + } + else + { ++ pragma(msg, "test disabled on GNU Guix"); ++/* + assert(expandTilde("~root") == "/root", expandTilde("~root")); + assert(expandTilde("~root/") == "/root/", expandTilde("~root/")); ++*/ + } + assert(expandTilde("~Idontexist/hey") == "~Idontexist/hey"); + } +diff --git a/std/socket.d b/std/socket.d +index b85d1c9..7fbf346 100644 +--- a/std/socket.d ++++ b/std/socket.d +@@ -517,6 +517,8 @@ class Protocol + + unittest + { ++ pragma(msg, "test disabled on GNU Guix"); ++/* + // getprotobyname,number are unimplemented on Android + softUnittest({ + Protocol proto = new Protocol; +@@ -530,6 +532,7 @@ unittest + assert(proto.name == "tcp"); + assert(proto.aliases.length == 1 && proto.aliases[0] == "TCP"); + }); ++*/ + } + + +@@ -859,6 +862,8 @@ class InternetHost + + unittest + { ++ pragma(msg, "test disabled on GNU Guix"); ++ /* + InternetHost ih = new InternetHost; + + ih.getHostByAddr(0x7F_00_00_01); +@@ -889,6 +894,7 @@ unittest + // writefln("aliases[%d] = %s", i, s); + // } + }); ++ */ + } + + |