diff options
author | Pjotr Prins <pjotr.public01@thebird.nl> | 2018-02-18 06:09:44 +0000 |
---|---|---|
committer | Danny Milosavljevic <dannym@scratchpost.org> | 2018-02-20 19:36:34 +0100 |
commit | 1b541c3e9375952f4d58dec3783eea2316c65967 (patch) | |
tree | ed54107a139e07dbdf15d918c839a2090b5464fd /gnu/packages/patches | |
parent | 5dd53cbf560f784577b3c22ac9e15e08e35566b5 (diff) | |
download | guix-1b541c3e9375952f4d58dec3783eea2316c65967.tar.gz |
gnu: ldc: Update to 1.7.0.
Fixes recent bootstrap and updates ldc and package manager to match. * gnu/packages/ldc.scm (ldc-bootstrap): Update to 0.17.4. [properties]: Add max-slient-time. [arguments]<#:phases>[patch-phobos]: Update patches (see below). (ldc): Update to 1.7.0. (ldc-beta): Delete variable. [arguments]<#:phases>[patch-phobos]: Update patches (see below). [arguments]<#:phases>[check]: Use invoke. (rdmd): Update to 2.077.1. (dub): Update to 1.7.2. * gnu/local.mk (dist_patch_DATA): Remove "ldc-disable-tests.patch". Add "ldc-bootstrap-disable-tests.patch". Remove "ldc-1.1.0-disable-phobos-tests.patch". Add "ldc-1.7.0-disable-phobos-tests.patch". Remove "ldc-1.1.0-disable-dmd-tests.patch". Co-Authored-By: Danny Milosavljevic <dannym@scratchpost.org>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/ldc-1.1.0-disable-dmd-tests.patch | 35 | ||||
-rw-r--r-- | gnu/packages/patches/ldc-1.1.0-disable-phobos-tests.patch | 414 | ||||
-rw-r--r-- | gnu/packages/patches/ldc-1.7.0-disable-phobos-tests.patch | 88 | ||||
-rw-r--r-- | gnu/packages/patches/ldc-bootstrap-disable-tests.patch (renamed from gnu/packages/patches/ldc-disable-tests.patch) | 18 |
4 files changed, 96 insertions, 459 deletions
diff --git a/gnu/packages/patches/ldc-1.1.0-disable-dmd-tests.patch b/gnu/packages/patches/ldc-1.1.0-disable-dmd-tests.patch deleted file mode 100644 index 31eb44aefc..0000000000 --- a/gnu/packages/patches/ldc-1.1.0-disable-dmd-tests.patch +++ /dev/null @@ -1,35 +0,0 @@ -This patch deactivates some tests that fail when ldc is built with the command: - -./pre-inst-env guix environment guix --pure -- ./pre-inst-env guix build ldc@1.1.0-beta6 - -When the --keep-failed flag is added to the build command above, and the tests -run in the resulting /tmp/guix-build-ldc-1.1.0-beta6.drv-* directory, the tests -pass. - -by Frederick M. Muriithi <fredmanglis@gmail.com> - -diff --git a/d_do_test.d b/d_do_test.d -index aa67169..8173759 100755 ---- a/d_do_test.d -+++ b/d_do_test.d -@@ -645,8 +645,6 @@ int main(string[] args) - auto gdb_output = execute(fThisRun, command, true, result_path); - if (testArgs.gdbMatch !is null) - { -- enforce(match(gdb_output, regex(testArgs.gdbMatch)), -- "\nGDB regex: '"~testArgs.gdbMatch~"' didn't match output:\n----\n"~gdb_output~"\n----\n"); - } - } - } -diff --git a/runnable/gdb15729.sh b/runnable/gdb15729.sh -index 1d390e0..906b2b6 100755 ---- a/runnable/gdb15729.sh -+++ b/runnable/gdb15729.sh -@@ -21,7 +21,6 @@ if [ $OS == "linux" ]; then - echo RESULT= - p s.val - EOF -- gdb ${dir}${SEP}gdb15729 --batch -x ${dir}${SEP}gdb15729.gdb | grep 'RESULT=.*1234' || exit 1 - fi - - rm -f ${libname} ${dir}${SEP}{gdb15729${OBJ},gdb15729${EXE},gdb15729.gdb} diff --git a/gnu/packages/patches/ldc-1.1.0-disable-phobos-tests.patch b/gnu/packages/patches/ldc-1.1.0-disable-phobos-tests.patch deleted file mode 100644 index 70dd419455..0000000000 --- a/gnu/packages/patches/ldc-1.1.0-disable-phobos-tests.patch +++ /dev/null @@ -1,414 +0,0 @@ -This patch deactivates failing tests that depend on network connectivity -to pass in curl.d and socket.d -It deactivates tests in path.d that assume /root - -A thread was started on the ldc forum to pursue the possibility of a -version flag to deactivate tests conditionally. The thread is at -https://forum.dlang.org/post/zmdbdgnzrxyvtpqafvyg@forum.dlang.org - -by Frederick M. Muriithi <fredmanglis@gmail.com> - -diff --git a/std/datetime.d b/std/datetime.d -index 4d4afb1..2c91a44 100644 ---- a/std/datetime.d -+++ b/std/datetime.d -@@ -27306,8 +27306,8 @@ public: - // leaving it commented out until I can sort it out. - //assert(equal(tzNames, tzNames.uniq())); - -- foreach(tzName; tzNames) -- assertNotThrown!DateTimeException(testPZSuccess(tzName)); -+ //foreach(tzName; tzNames) -+ //assertNotThrown!DateTimeException(testPZSuccess(tzName)); - } - - -@@ -29178,8 +29178,8 @@ public: - - auto tzNames = getInstalledTZNames(); - -- foreach(tzName; tzNames) -- assertNotThrown!DateTimeException(testPTZSuccess(tzName)); -+ //foreach(tzName; tzNames) -+ //assertNotThrown!DateTimeException(testPTZSuccess(tzName)); - - // No timezone directories on Android, just a single tzdata file - version(Android) {} else -diff --git a/std/net/curl.d b/std/net/curl.d -index 9c6af66..5fccb38 100644 ---- a/std/net/curl.d -+++ b/std/net/curl.d -@@ -419,7 +419,7 @@ void download(Conn = AutoProtocol)(const(char)[] url, string saveToPath, Conn co - - unittest - { -- static import std.file; -+ /*static import std.file; - foreach (host; [testServer.addr, "http://"~testServer.addr]) - { - testServer.handle((s) { -@@ -430,7 +430,7 @@ unittest - scope (exit) std.file.remove(fn); - download(host, fn); - assert(std.file.readText(fn) == "Hello world"); -- } -+ }*/ - } - - /** Upload file from local files system using the HTTP or FTP protocol. -@@ -483,7 +483,7 @@ void upload(Conn = AutoProtocol)(string loadFromPath, const(char)[] url, Conn co - - unittest - { -- static import std.file; -+ /*static import std.file; - foreach (host; [testServer.addr, "http://"~testServer.addr]) - { - auto fn = std.file.deleteme; -@@ -496,7 +496,7 @@ unittest - s.send(httpOK()); - }); - upload(fn, host ~ "/path"); -- } -+ }*/ - } - - /** HTTP/FTP get content. -@@ -551,7 +551,7 @@ T[] get(Conn = AutoProtocol, T = char)(const(char)[] url, Conn conn = Conn()) - - unittest - { -- foreach (host; [testServer.addr, "http://"~testServer.addr]) -+ /*foreach (host; [testServer.addr, "http://"~testServer.addr]) - { - testServer.handle((s) { - assert(s.recvReq.hdrs.canFind("GET /path")); -@@ -559,7 +559,7 @@ unittest - }); - auto res = get(host ~ "/path"); - assert(res == "GETRESPONSE"); -- } -+ }*/ - } - - -@@ -598,7 +598,7 @@ if (is(T == char) || is(T == ubyte)) - - unittest - { -- foreach (host; [testServer.addr, "http://"~testServer.addr]) -+ /*foreach (host; [testServer.addr, "http://"~testServer.addr]) - { - testServer.handle((s) { - auto req = s.recvReq; -@@ -608,12 +608,12 @@ unittest - }); - auto res = post(host ~ "/path", "POSTBODY"); - assert(res == "POSTRESPONSE"); -- } -+ }*/ - } - - unittest - { -- auto data = new ubyte[](256); -+ /*auto data = new ubyte[](256); - foreach (i, ref ub; data) - ub = cast(ubyte)i; - -@@ -624,7 +624,7 @@ unittest - s.send(httpOK(cast(ubyte[])[17, 27, 35, 41])); - }); - auto res = post!ubyte(testServer.addr, data); -- assert(res == cast(ubyte[])[17, 27, 35, 41]); -+ assert(res == cast(ubyte[])[17, 27, 35, 41]);*/ - } - - -@@ -680,7 +680,7 @@ T[] put(Conn = AutoProtocol, T = char, PutUnit)(const(char)[] url, const(PutUnit - - unittest - { -- foreach (host; [testServer.addr, "http://"~testServer.addr]) -+ /*foreach (host; [testServer.addr, "http://"~testServer.addr]) - { - testServer.handle((s) { - auto req = s.recvReq; -@@ -690,7 +690,7 @@ unittest - }); - auto res = put(host ~ "/path", "PUTBODY"); - assert(res == "PUTRESPONSE"); -- } -+ }*/ - } - - -@@ -742,7 +742,7 @@ void del(Conn = AutoProtocol)(const(char)[] url, Conn conn = Conn()) - - unittest - { -- foreach (host; [testServer.addr, "http://"~testServer.addr]) -+ /*foreach (host; [testServer.addr, "http://"~testServer.addr]) - { - testServer.handle((s) { - auto req = s.recvReq; -@@ -750,7 +750,7 @@ unittest - s.send(httpOK()); - }); - del(host ~ "/path"); -- } -+ }*/ - } - - -@@ -796,13 +796,13 @@ T[] options(T = char, OptionsUnit)(const(char)[] url, - - unittest - { -- testServer.handle((s) { -+ /*testServer.handle((s) { - auto req = s.recvReq; - assert(req.hdrs.canFind("OPTIONS /path")); - s.send(httpOK("OPTIONSRESPONSE")); - }); - auto res = options(testServer.addr ~ "/path"); -- assert(res == "OPTIONSRESPONSE"); -+ assert(res == "OPTIONSRESPONSE");*/ - } - - -@@ -836,13 +836,13 @@ T[] trace(T = char)(const(char)[] url, HTTP conn = HTTP()) - - unittest - { -- testServer.handle((s) { -+ /*testServer.handle((s) { - auto req = s.recvReq; - assert(req.hdrs.canFind("TRACE /path")); - s.send(httpOK("TRACERESPONSE")); - }); - auto res = trace(testServer.addr ~ "/path"); -- assert(res == "TRACERESPONSE"); -+ assert(res == "TRACERESPONSE");*/ - } - - -@@ -875,13 +875,13 @@ T[] connect(T = char)(const(char)[] url, HTTP conn = HTTP()) - - unittest - { -- testServer.handle((s) { -+ /*testServer.handle((s) { - auto req = s.recvReq; - assert(req.hdrs.canFind("CONNECT /path")); - s.send(httpOK("CONNECTRESPONSE")); - }); - auto res = connect(testServer.addr ~ "/path"); -- assert(res == "CONNECTRESPONSE"); -+ assert(res == "CONNECTRESPONSE");*/ - } - - -@@ -919,14 +919,14 @@ T[] patch(T = char, PatchUnit)(const(char)[] url, const(PatchUnit)[] patchData, - - unittest - { -- testServer.handle((s) { -+ /*testServer.handle((s) { - auto req = s.recvReq; - assert(req.hdrs.canFind("PATCH /path")); - assert(req.bdy.canFind("PATCHBODY")); - s.send(httpOK("PATCHRESPONSE")); - }); - auto res = patch(testServer.addr ~ "/path", "PATCHBODY"); -- assert(res == "PATCHRESPONSE"); -+ assert(res == "PATCHRESPONSE");*/ - } - - -@@ -1031,19 +1031,19 @@ private auto _basicHTTP(T)(const(char)[] url, const(void)[] sendData, HTTP clien - - unittest - { -- testServer.handle((s) { -+ /*testServer.handle((s) { - auto req = s.recvReq; - assert(req.hdrs.canFind("GET /path")); - s.send(httpNotFound()); - }); - auto e = collectException!CurlException(get(testServer.addr ~ "/path")); -- assert(e.msg == "HTTP request returned status code 404 (Not Found)"); -+ assert(e.msg == "HTTP request returned status code 404 (Not Found)");*/ - } - - // Bugzilla 14760 - content length must be reset after post - unittest - { -- testServer.handle((s) { -+ /*testServer.handle((s) { - auto req = s.recvReq; - assert(req.hdrs.canFind("POST /")); - assert(req.bdy.canFind("POSTBODY")); -@@ -1061,7 +1061,7 @@ unittest - auto res = post(testServer.addr, "POSTBODY", http); - assert(res == "POSTRESPONSE"); - res = trace(testServer.addr, http); -- assert(res == "TRACERESPONSE"); -+ assert(res == "TRACERESPONSE");*/ - } - - /* -@@ -1265,14 +1265,14 @@ if (isCurlConn!Conn && isSomeChar!Char && isSomeChar!Terminator) - - unittest - { -- foreach (host; [testServer.addr, "http://"~testServer.addr]) -+ /*foreach (host; [testServer.addr, "http://"~testServer.addr]) - { - testServer.handle((s) { - auto req = s.recvReq; - s.send(httpOK("Line1\nLine2\nLine3")); - }); - assert(byLine(host).equal(["Line1", "Line2", "Line3"])); -- } -+ }*/ - } - - /** HTTP/FTP fetch content as a range of chunks. -@@ -1337,14 +1337,14 @@ auto byChunk(Conn = AutoProtocol) - - unittest - { -- foreach (host; [testServer.addr, "http://"~testServer.addr]) -+ /*foreach (host; [testServer.addr, "http://"~testServer.addr]) - { - testServer.handle((s) { - auto req = s.recvReq; - s.send(httpOK(cast(ubyte[])[0, 1, 2, 3, 4, 5])); - }); - assert(byChunk(host, 2).equal([[0, 1], [2, 3], [4, 5]])); -- } -+ }*/ - } - - private T[] _getForRange(T,Conn)(const(char)[] url, Conn conn) -@@ -1629,14 +1629,14 @@ auto byLineAsync(Conn = AutoProtocol, Terminator = char, Char = char) - - unittest - { -- foreach (host; [testServer.addr, "http://"~testServer.addr]) -+ /*foreach (host; [testServer.addr, "http://"~testServer.addr]) - { - testServer.handle((s) { - auto req = s.recvReq; - s.send(httpOK("Line1\nLine2\nLine3")); - }); - assert(byLineAsync(host).equal(["Line1", "Line2", "Line3"])); -- } -+ }*/ - } - - -@@ -1778,14 +1778,14 @@ auto byChunkAsync(Conn = AutoProtocol) - - unittest - { -- foreach (host; [testServer.addr, "http://"~testServer.addr]) -+ /*foreach (host; [testServer.addr, "http://"~testServer.addr]) - { - testServer.handle((s) { - auto req = s.recvReq; - s.send(httpOK(cast(ubyte[])[0, 1, 2, 3, 4, 5])); - }); - assert(byChunkAsync(host, 2).equal([[0, 1], [2, 3], [4, 5]])); -- } -+ }*/ - } - - -@@ -2041,7 +2041,7 @@ private mixin template Protocol() - - unittest - { -- testServer.handle((s) { -+ /*testServer.handle((s) { - auto req = s.recvReq; - assert(req.hdrs.canFind("GET /")); - assert(req.hdrs.canFind("Basic dXNlcjpwYXNz")); -@@ -2051,7 +2051,7 @@ private mixin template Protocol() - auto http = HTTP(testServer.addr); - http.onReceive = (ubyte[] data) { return data.length; }; - http.setAuthentication("user", "pass"); -- http.perform(); -+ http.perform();*/ - } - - /** -@@ -2959,7 +2959,7 @@ struct HTTP - - unittest - { -- testServer.handle((s) { -+ /*testServer.handle((s) { - auto req = s.recvReq!ubyte; - assert(req.hdrs.canFind("POST /path")); - assert(req.bdy.canFind(cast(ubyte[])[0, 1, 2, 3, 4])); -@@ -2975,7 +2975,7 @@ struct HTTP - ubyte[] res; - http.onReceive = (data) { res ~= data; return data.length; }; - http.perform(); -- assert(res == cast(ubyte[])[17, 27, 35, 41]); -+ assert(res == cast(ubyte[])[17, 27, 35, 41]);*/ - } - - /** -diff --git a/std/path.d b/std/path.d -index 60c844f..0598104 100644 ---- a/std/path.d -+++ b/std/path.d -@@ -3953,8 +3953,10 @@ unittest - } - else - { -+/* - 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 7f5a3c3..e68b881 100644 ---- a/std/socket.d -+++ b/std/socket.d -@@ -481,15 +481,15 @@ unittest - { - softUnittest({ - Protocol proto = new Protocol; -- assert(proto.getProtocolByType(ProtocolType.TCP)); -+ //assert(proto.getProtocolByType(ProtocolType.TCP)); - //writeln("About protocol TCP:"); - //writefln("\tName: %s", proto.name); - // foreach(string s; proto.aliases) - // { - // writefln("\tAlias: %s", s); - // } -- assert(proto.name == "tcp"); -- assert(proto.aliases.length == 1 && proto.aliases[0] == "TCP"); -+ //assert(proto.name == "tcp"); -+ //assert(proto.aliases.length == 1 && proto.aliases[0] == "TCP"); - }); - } - -@@ -832,9 +832,9 @@ unittest - InternetHost ih = new InternetHost; - - ih.getHostByAddr(0x7F_00_00_01); -- assert(ih.addrList[0] == 0x7F_00_00_01); -+ //assert(ih.addrList[0] == 0x7F_00_00_01); - ih.getHostByAddr("127.0.0.1"); -- assert(ih.addrList[0] == 0x7F_00_00_01); -+ //assert(ih.addrList[0] == 0x7F_00_00_01); - - softUnittest({ - if (!ih.getHostByName("www.digitalmars.com")) diff --git a/gnu/packages/patches/ldc-1.7.0-disable-phobos-tests.patch b/gnu/packages/patches/ldc-1.7.0-disable-phobos-tests.patch new file mode 100644 index 0000000000..ccc136cc76 --- /dev/null +++ b/gnu/packages/patches/ldc-1.7.0-disable-phobos-tests.patch @@ -0,0 +1,88 @@ +diff --git a/std/path.d b/std/path.d +index a9f0bd8..f47d103 100644 +--- a/std/path.d ++++ b/std/path.d +@@ -4041,7 +4041,7 @@ version(unittest) import std.process : environment; + else version (Android) + { + } +- else ++ else version (HasRoot) + { + assert(expandTilde("~root") == "/root", expandTilde("~root")); + assert(expandTilde("~root/") == "/root/", expandTilde("~root/")); + +diff --git a/std/process.d b/std/process.d +index df83296..d921cdb 100644 +--- a/std/process.d ++++ b/std/process.d +@@ -1171,7 +1171,7 @@ version (Posix) @system unittest + assert(exists(buildPath(directory, "bar"))); + } + +-@system unittest // Specifying a bad working directory. ++@system version(skipunittest) unittest // Specifying a bad working directory. + { + import std.exception : assertThrown; + TestScript prog = "/bin/echo"; +diff --git a/std/socket.d b/std/socket.d +index 8a261d5..c1b87b6 100644 +--- a/std/socket.d ++++ b/std/socket.d +@@ -484,7 +484,7 @@ class Protocol + // Skip this test on Android because getprotobyname/number are + // unimplemented in bionic. + version(CRuntime_Bionic) {} else +-@safe unittest ++@safe version(hasNetwork) unittest + { + softUnittest({ + Protocol proto = new Protocol; +@@ -804,7 +804,7 @@ class InternetHost + } + + /// +-@safe unittest ++@safe version(hasNetwork) unittest + { + InternetHost ih = new InternetHost; + +@@ -959,7 +959,7 @@ AddressInfo[] getAddressInfo(T...)(in char[] node, T options) + return () @trusted { return getAddressInfoImpl(node, service, &hints); }(); + } + +-@system unittest ++@system version(hasNetwork) unittest + { + struct Oops + { +@@ -1010,7 +1010,7 @@ private AddressInfo[] getAddressInfoImpl(in char[] node, in char[] service, addr + } + + +-@safe unittest ++@safe version(hasNetwork) unittest + { + softUnittest({ + if (getaddrinfoPointer) +diff --git a/std/stdio.d b/std/stdio.d +index 10106a5..4b0590e 100644 +--- a/std/stdio.d ++++ b/std/stdio.d +@@ -1426,8 +1426,7 @@ Removes the lock over the specified file segment. + g.unlock(); + } + +- version(Posix) +- @system unittest ++ @system version(skip) unittest + { + static import std.file; + auto deleteme = testFilename(); +@@ -1483,7 +1482,6 @@ Removes the lock over the specified file segment. + f.unlock(); + } + +- + /** + Writes its arguments in text format to the file. diff --git a/gnu/packages/patches/ldc-disable-tests.patch b/gnu/packages/patches/ldc-bootstrap-disable-tests.patch index bdd6e5b76c..d2e40b8016 100644 --- a/gnu/packages/patches/ldc-disable-tests.patch +++ b/gnu/packages/patches/ldc-bootstrap-disable-tests.patch @@ -4,17 +4,17 @@ two others use networking. Not bad out of almost 700 tests! by Pjotr Prins <pjotr.guix@thebird.nl> ---- a/std/datetime.d.orig 2016-11-24 01:13:52.584495545 +0100 -+++ b/std/datetime.d 2016-11-24 01:17:09.655306728 +0100 +--- a/std/datetime.d.orig 2016-11-24 01:13:52.584495545 +0100 ++++ b/std/datetime.d 2016-11-24 01:17:09.655306728 +0100 @@ -28081,22 +28081,24 @@ 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))); - + version(Android) { + name = strip(name); @@ -29,11 +29,11 @@ by Pjotr Prins <pjotr.guix@thebird.nl> + 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 @@ -56,13 +56,13 @@ index b85d1c9..7fbf346 100644 --- a/std/socket.d +++ b/std/socket.d @@ -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); @@ -70,5 +70,3 @@ index b85d1c9..7fbf346 100644 }); + */ } - - |