* [PATCH] gnu: Add ldc-1.1.0-beta6 @ 2017-01-06 15:04 Frederick Muriithi 2017-01-07 16:32 ` Pjotr Prins 2017-01-09 14:41 ` Ludovic Courtès 0 siblings, 2 replies; 14+ messages in thread From: Frederick Muriithi @ 2017-01-06 15:04 UTC (permalink / raw) To: guix-devel [-- Attachment #1: Type: text/plain, Size: 397 bytes --] Based on thread https://lists.gnu.org/archive/html/guix-devel/2017-01/msg00465.html - Fixed some issues raised by Danny Milosavljevic on thread above - Updated the beta version to 6, up from 4 - Started up a thread on ldc forum to have a version flag added to deactivate network tests when building ldc https://forum.dlang.org/post/zmdbdgnzrxyvtpqafvyg@forum.dlang.org -- Frederick M. Muriithi [-- Attachment #2: 0001-gnu-Add-ldc-1.1.0-beta6.patch --] [-- Type: text/x-patch, Size: 19035 bytes --] From a0185dc1f5881bae8094643251335b04560900a0 Mon Sep 17 00:00:00 2001 From: Muriithi Frederick Muriuki <fredmanglis@gmail.com> Date: Fri, 6 Jan 2017 17:51:18 +0300 Subject: [PATCH] gnu: Add ldc-1.1.0-beta6 * gnu/packages/ldc.scm (ldc-1.1.0-beta6): New variable * gnu/packages/ldc.scm (ldc-beta): New variable * gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch: New patch * gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch: New patch --- gnu/packages/ldc.scm | 85 +++++ .../patches/ldc1.1.0-disable-dmd-tests.patch | 28 ++ .../patches/ldc1.1.0-disable-phobos-tests.patch | 404 +++++++++++++++++++++ 3 files changed, 517 insertions(+) create mode 100644 gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch create mode 100644 gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm index 6ea7f66..bbc5a10 100644 --- a/gnu/packages/ldc.scm +++ b/gnu/packages/ldc.scm @@ -27,6 +27,7 @@ #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages compression) + #:use-module (gnu packages gdb) #:use-module (gnu packages libedit) #:use-module (gnu packages llvm) #:use-module (gnu packages python) @@ -171,3 +172,87 @@ latest DMD frontend and uses LLVM as backend.") (license (list license:bsd-3 license:gpl2+ license:boost1.0)))) + + +(define-public ldc-1.1.0-beta6 + (let ((older-version "1.1.0-beta4")) + (package + (inherit ldc) + (name "ldc") + (version "1.1.0-beta6") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/ldc/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0n53brlkm86jjkppy9xmzx7nyxykzj68kcxgv8q7d10s5hfscxs8")))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (let ((unpack (lambda (source target) + (with-directory-excursion target + (zero? (system* "tar" "xvf" + (assoc-ref inputs source) + "--strip-components=1")))))) + (and (unpack "phobos-src" "runtime/phobos") + (unpack "druntime-src" "runtime/druntime") + (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite"))))) + ;; the 'patch-dmd2 step in ldc causes the build to fail since + ;; dmd2/root/port.c no longer exists. arguments needed to have + ;; 'patch-dmd2 step removed, but retain everything else + (add-after 'unpack-submodule-sources 'patch-phobos + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "runtime/phobos/std/process.d" + (("/bin/sh") (which "sh")) + (("echo") (which "echo"))) + (substitute* "runtime/phobos/std/datetime.d" + (("/usr/share/zoneinfo/") + (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))) + (substitute* "tests/d2/dmd-testsuite/Makefile" + (("/bin/bash") (which "bash"))) + #t))))) + (native-inputs + `(("llvm" ,llvm) + ("clang" ,clang) + ("ldc" ,ldc) + ("python-lit" ,python-lit) + ("python-wrapper" ,python-wrapper) + ("unzip" ,unzip) + ("gdb" ,gdb) + ("phobos-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/phobos/archive/ldc-v" + older-version ".tar.gz")) + (sha256 + (base32 + "1iwy5rs0rqkicj1zfsa5yqvk8ard99bfr8g69qmhlbzb98q0kpks")) + (patches (search-patches "ldc1.1.0-disable-phobos-tests.patch")))) + ("druntime-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/druntime/archive/ldc-v" + older-version ".tar.gz")) + (sha256 + (base32 + "1qsiw5lz1pr8ms9myjf8b94nqi7f1781k226jvxwnhkjg11d0s63")))) + ("dmd-testsuite-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/dmd-testsuite/archive/ldc-v" + older-version ".tar.gz")) + (sha256 + (base32 + "0jp54hyi75i9g41rvgmm3zg21yzv57q8dghrhb432rb0n9j15mbp")) + ;; Deactivate some failing gdb tests. Most other gdb tests pass + (patches (search-patches "ldc1.1.0-disable-dmd-tests.patch"))))))))) + +(define-public ldc-beta ldc-1.1.0-beta6) diff --git a/gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch b/gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch new file mode 100644 index 0000000..952fcb8 --- /dev/null +++ b/gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch @@ -0,0 +1,28 @@ +diff --git a/d_do_test.d b/d_do_test.d +index aa67169..7a4dcc1 100755 +--- a/d_do_test.d ++++ b/d_do_test.d +@@ -645,8 +645,8 @@ 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"); ++ //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..7bd1a3b 100755 +--- a/runnable/gdb15729.sh ++++ b/runnable/gdb15729.sh +@@ -21,7 +21,7 @@ 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 ++ #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/ldc1.1.0-disable-phobos-tests.patch b/gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch new file mode 100644 index 0000000..79deb11 --- /dev/null +++ b/gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch @@ -0,0 +1,404 @@ +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")) -- 2.1.4 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: Add ldc-1.1.0-beta6 2017-01-06 15:04 [PATCH] gnu: Add ldc-1.1.0-beta6 Frederick Muriithi @ 2017-01-07 16:32 ` Pjotr Prins 2017-01-09 14:41 ` Ludovic Courtès 1 sibling, 0 replies; 14+ messages in thread From: Pjotr Prins @ 2017-01-07 16:32 UTC (permalink / raw) To: Frederick Muriithi; +Cc: guix-devel On Fri, Jan 06, 2017 at 06:04:38PM +0300, Frederick Muriithi wrote: > - Started up a thread on ldc forum to have a version flag added to > deactivate network tests when building ldc > https://forum.dlang.org/post/zmdbdgnzrxyvtpqafvyg@forum.dlang.org Promising :) Pj. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: Add ldc-1.1.0-beta6 2017-01-06 15:04 [PATCH] gnu: Add ldc-1.1.0-beta6 Frederick Muriithi 2017-01-07 16:32 ` Pjotr Prins @ 2017-01-09 14:41 ` Ludovic Courtès 2017-01-10 5:55 ` Frederick Muriithi ` (2 more replies) 1 sibling, 3 replies; 14+ messages in thread From: Ludovic Courtès @ 2017-01-09 14:41 UTC (permalink / raw) To: Frederick Muriithi; +Cc: guix-devel Hello! Sorry for the late reply! Frederick Muriithi <fredmanglis@gmail.com> skribis: > Based on thread > https://lists.gnu.org/archive/html/guix-devel/2017-01/msg00465.html > > - Fixed some issues raised by Danny Milosavljevic on thread above > - Updated the beta version to 6, up from 4 > - Started up a thread on ldc forum to have a version flag added to > deactivate network tests when building ldc > https://forum.dlang.org/post/zmdbdgnzrxyvtpqafvyg@forum.dlang.org Nice! > From a0185dc1f5881bae8094643251335b04560900a0 Mon Sep 17 00:00:00 2001 > From: Muriithi Frederick Muriuki <fredmanglis@gmail.com> > Date: Fri, 6 Jan 2017 17:51:18 +0300 > Subject: [PATCH] gnu: Add ldc-1.1.0-beta6 > > * gnu/packages/ldc.scm (ldc-1.1.0-beta6): New variable > * gnu/packages/ldc.scm (ldc-beta): New variable > * gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch: New patch > * gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch: New patch Overall the patch looks good to me. One question: We usually avoid packaging software that has no release or has an “alpha” or “beta” label. Do you think we could wait for 1.1.0 to be officially released? Or are there good reasons why we should not wait? Some minor issues: > +(define-public ldc-1.1.0-beta6 > + (let ((older-version "1.1.0-beta4")) [...] > + ("phobos-src" > + ,(origin > + (method url-fetch) > + (uri (string-append > + "https://github.com/ldc-developers/phobos/archive/ldc-v" > + older-version ".tar.gz")) > + (sha256 > + (base32 > + "1iwy5rs0rqkicj1zfsa5yqvk8ard99bfr8g69qmhlbzb98q0kpks")) > + (patches (search-patches "ldc1.1.0-disable-phobos-tests.patch")))) > + ("druntime-src" > + ,(origin > + (method url-fetch) > + (uri (string-append > + "https://github.com/ldc-developers/druntime/archive/ldc-v" > + older-version ".tar.gz")) > + (sha256 > + (base32 > + "1qsiw5lz1pr8ms9myjf8b94nqi7f1781k226jvxwnhkjg11d0s63")))) > + ("dmd-testsuite-src" > + ,(origin > + (method url-fetch) > + (uri (string-append > + "https://github.com/ldc-developers/dmd-testsuite/archive/ldc-v" > + older-version ".tar.gz")) > + (sha256 > + (base32 > + "0jp54hyi75i9g41rvgmm3zg21yzv57q8dghrhb432rb0n9j15mbp")) > + ;; Deactivate some failing gdb tests. Most other gdb tests pass > + (patches (search-patches "ldc1.1.0-disable-dmd-tests.patch"))))))))) Could you add a comment explaining why the previous version of these is needed, instead of the current version? > --- /dev/null > +++ b/gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch Could you add a line or two explaining at the top of patch explaining what it does and why, and what its upstream status is? For example, I think this one disables a test that would require GDB, which is not an input (?), and presumably it won’t be submitted upstream. > @@ -0,0 +1,28 @@ > +diff --git a/d_do_test.d b/d_do_test.d > +index aa67169..7a4dcc1 100755 > +--- a/d_do_test.d > ++++ b/d_do_test.d > +@@ -645,8 +645,8 @@ 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"); > ++ //enforce(match(gdb_output, regex(testArgs.gdbMatch)), > ++ //"\nGDB regex: '"~testArgs.gdbMatch~"' didn't match output:\n----\n"~gdb_output~"\n----\n"); I think it’s better to just delete the two lines instead of commenting them out: that makes the patch easier to read. Hope this makes sense. Thanks for your contribution! Ludo’. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: Add ldc-1.1.0-beta6 2017-01-09 14:41 ` Ludovic Courtès @ 2017-01-10 5:55 ` Frederick Muriithi 2017-01-10 14:36 ` Frederick Muriithi 2017-01-19 11:02 ` Pjotr Prins 2 siblings, 0 replies; 14+ messages in thread From: Frederick Muriithi @ 2017-01-10 5:55 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel On Mon, Jan 9, 2017 at 5:41 PM, Ludovic Courtès <ludo@gnu.org> wrote: > Hello! > > Sorry for the late reply! > > ... > > One question: We usually avoid packaging software that has no release or > has an “alpha” or “beta” label. Do you think we could wait for 1.1.0 to > be officially released? Or are there good reasons why we should not > wait? > I chose to write the patch, since there is need for the newer versions of ldc to compile some tools like sambamba (http://lomereiter.github.io/sambamba/) successfully. These tools are needed, but will not compile with the older stable version (0.17.2). Since both versions, the stable version and one of the beta versions, might be needed, I thought to write a definition for it, to get it on guix and make it easier to provide the tools for the scientists on the bleeding edge. > > ... > > Could you add a comment explaining why the previous version of these is > needed, instead of the current version? > > ... > > Could you add a line or two explaining at the top of patch explaining > what it does and why, and what its upstream status is? > > For example, I think this one disables a test that would require GDB, > which is not an input (?), and presumably it won’t be submitted > upstream. > > ... > > I think it’s better to just delete the two lines instead of commenting > them out: that makes the patch easier to read. > > Hope this makes sense. > > Thanks for your contribution! > > Ludo’. Thanks for the feedback. I will work on these and send an updated patch. -- Frederick M. Muriithi ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: Add ldc-1.1.0-beta6 2017-01-09 14:41 ` Ludovic Courtès 2017-01-10 5:55 ` Frederick Muriithi @ 2017-01-10 14:36 ` Frederick Muriithi 2017-01-12 14:09 ` Ludovic Courtès 2017-01-19 11:02 ` Pjotr Prins 2 siblings, 1 reply; 14+ messages in thread From: Frederick Muriithi @ 2017-01-10 14:36 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 100 bytes --] Here is an updated patch with the corrections. Hopefully, this is better -- Frederick M. Muriithi [-- Attachment #2: 0001-gnu-Add-ldc-1.1.0-beta6.patch --] [-- Type: text/x-patch, Size: 19775 bytes --] From 0ef5303600d20eaf19bf24a8badafe3148d56cae Mon Sep 17 00:00:00 2001 From: Muriithi Frederick Muriuki <fredmanglis@gmail.com> Date: Fri, 6 Jan 2017 17:51:18 +0300 Subject: [PATCH] gnu: Add ldc-1.1.0-beta6 * gnu/packages/ldc.scm (ldc-1.1.0-beta6): New variable * gnu/packages/ldc.scm (ldc-beta): New variable * gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch: New patch * gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch: New patch --- gnu/packages/ldc.scm | 102 ++++++ .../patches/ldc1.1.0-disable-dmd-tests.patch | 25 ++ .../patches/ldc1.1.0-disable-phobos-tests.patch | 404 +++++++++++++++++++++ 3 files changed, 531 insertions(+) create mode 100644 gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch create mode 100644 gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm index 6ea7f66..b789feb 100644 --- a/gnu/packages/ldc.scm +++ b/gnu/packages/ldc.scm @@ -27,6 +27,7 @@ #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages compression) + #:use-module (gnu packages gdb) #:use-module (gnu packages libedit) #:use-module (gnu packages llvm) #:use-module (gnu packages python) @@ -171,3 +172,104 @@ latest DMD frontend and uses LLVM as backend.") (license (list license:bsd-3 license:gpl2+ license:boost1.0)))) + + +(define-public ldc-1.1.0-beta6 + ;; The phobos, druntime and dmd-testsuite dependencies + ;; do not have a newer release than 1.1.0-beta4, hence + ;; the need to make use of the older-version variable + ;; to hold this variable + (let ((older-version "1.1.0-beta4")) + (package + (inherit ldc) + (name "ldc") + (version "1.1.0-beta6") + ;; beta version needed to compile various scientific tools + ;; that require the newer beta versions, and won't compile + ;; successfully with the older stable version + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/ldc/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0n53brlkm86jjkppy9xmzx7nyxykzj68kcxgv8q7d10s5hfscxs8")))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (let ((unpack (lambda (source target) + (with-directory-excursion target + (zero? (system* "tar" "xvf" + (assoc-ref inputs source) + "--strip-components=1")))))) + (and (unpack "phobos-src" "runtime/phobos") + (unpack "druntime-src" "runtime/druntime") + (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite"))))) + ;; the 'patch-dmd2 step in ldc causes the build to fail since + ;; dmd2/root/port.c no longer exists. arguments needed to have + ;; 'patch-dmd2 step removed, but retain everything else + (add-after 'unpack-submodule-sources 'patch-phobos + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "runtime/phobos/std/process.d" + (("/bin/sh") (which "sh")) + (("echo") (which "echo"))) + (substitute* "runtime/phobos/std/datetime.d" + (("/usr/share/zoneinfo/") + (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))) + (substitute* "tests/d2/dmd-testsuite/Makefile" + (("/bin/bash") (which "bash"))) + #t))))) + (native-inputs + `(("llvm" ,llvm) + ("clang" ,clang) + ("ldc" ,ldc) + ("python-lit" ,python-lit) + ("python-wrapper" ,python-wrapper) + ("unzip" ,unzip) + ("gdb" ,gdb) + ("phobos-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/phobos/archive/ldc-v" + older-version ".tar.gz")) + (sha256 + (base32 + "1iwy5rs0rqkicj1zfsa5yqvk8ard99bfr8g69qmhlbzb98q0kpks")) + ;; This patch deactivates some tests that depend on network access + ;; to pass. It also deactivates some tests that have some reliance + ;; on timezone + ;; For the network tests, there's an effort to get a version flag + ;; added to deactivate these tests for distribution packagers that + ;; is being pursued at + ;; https://forum.dlang.org/post/zmdbdgnzrxyvtpqafvyg@forum.dlang.org + ;; It also deactivates a test that requires /root + (patches (search-patches "ldc1.1.0-disable-phobos-tests.patch")))) + ("druntime-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/druntime/archive/ldc-v" + older-version ".tar.gz")) + (sha256 + (base32 + "1qsiw5lz1pr8ms9myjf8b94nqi7f1781k226jvxwnhkjg11d0s63")))) + ("dmd-testsuite-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/dmd-testsuite/archive/ldc-v" + older-version ".tar.gz")) + (sha256 + (base32 + "0jp54hyi75i9g41rvgmm3zg21yzv57q8dghrhb432rb0n9j15mbp")) + ;; Remove the gdb tests that fails with a "Error: No such file or directory" + ;; error, despite the files being present in the debug files left with + ;; the --keep-failed flag to guix build + (patches (search-patches "ldc1.1.0-disable-dmd-tests.patch"))))))))) + +(define-public ldc-beta ldc-1.1.0-beta6) diff --git a/gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch b/gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch new file mode 100644 index 0000000..87b4c6b --- /dev/null +++ b/gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch @@ -0,0 +1,25 @@ +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/ldc1.1.0-disable-phobos-tests.patch b/gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch new file mode 100644 index 0000000..79deb11 --- /dev/null +++ b/gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch @@ -0,0 +1,404 @@ +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")) -- 2.1.4 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: Add ldc-1.1.0-beta6 2017-01-10 14:36 ` Frederick Muriithi @ 2017-01-12 14:09 ` Ludovic Courtès 2017-01-17 12:58 ` Frederick Muriithi 0 siblings, 1 reply; 14+ messages in thread From: Ludovic Courtès @ 2017-01-12 14:09 UTC (permalink / raw) To: Frederick Muriithi; +Cc: guix-devel Hello, Frederick Muriithi <fredmanglis@gmail.com> skribis: > From 0ef5303600d20eaf19bf24a8badafe3148d56cae Mon Sep 17 00:00:00 2001 > From: Muriithi Frederick Muriuki <fredmanglis@gmail.com> > Date: Fri, 6 Jan 2017 17:51:18 +0300 > Subject: [PATCH] gnu: Add ldc-1.1.0-beta6 > > * gnu/packages/ldc.scm (ldc-1.1.0-beta6): New variable > * gnu/packages/ldc.scm (ldc-beta): New variable > * gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch: New patch > * gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch: New patch The one last thing that’s missing as discussed at <https://lists.gnu.org/archive/html/guix-devel/2017-01/msg00788.html> is the comment at the top of .patch files (description and upstream status). Could you do that? I’ll happily commit for you afterwards. TIA! Ludo’. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: Add ldc-1.1.0-beta6 2017-01-12 14:09 ` Ludovic Courtès @ 2017-01-17 12:58 ` Frederick Muriithi 2017-01-19 12:47 ` Ludovic Courtès 0 siblings, 1 reply; 14+ messages in thread From: Frederick Muriithi @ 2017-01-17 12:58 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 569 bytes --] On Thu, Jan 12, 2017 at 5:09 PM, Ludovic Courtès <ludo@gnu.org> wrote: > ... > The one last thing that’s missing as discussed at > <https://lists.gnu.org/archive/html/guix-devel/2017-01/msg00788.html> is > the comment at the top of .patch files (description and upstream > status). > > Could you do that? I’ll happily commit for you afterwards. Apologies for the delay. Here is the updated patch. Added some comments in the patches. I hope those are good enough. Thank you for your patience with me as I learn, so far. -- Frederick M. Muriithi [-- Attachment #2: 0001-gnu-Add-ldc-1.1.0-beta6.patch --] [-- Type: text/x-patch, Size: 20586 bytes --] From 70094e16777b835b0ed86b2deb9cba6ea0d40914 Mon Sep 17 00:00:00 2001 From: Muriithi Frederick Muriuki <fredmanglis@gmail.com> Date: Fri, 6 Jan 2017 17:51:18 +0300 Subject: [PATCH] gnu: Add ldc-1.1.0-beta6 * gnu/packages/ldc.scm (ldc-1.1.0-beta6): New variable * gnu/packages/ldc.scm (ldc-beta): New variable * gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch: New patch * gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch: New patch --- gnu/packages/ldc.scm | 102 +++++ .../patches/ldc1.1.0-disable-dmd-tests.patch | 35 ++ .../patches/ldc1.1.0-disable-phobos-tests.patch | 414 +++++++++++++++++++++ 3 files changed, 551 insertions(+) create mode 100644 gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch create mode 100644 gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm index 6ea7f66..b789feb 100644 --- a/gnu/packages/ldc.scm +++ b/gnu/packages/ldc.scm @@ -27,6 +27,7 @@ #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages compression) + #:use-module (gnu packages gdb) #:use-module (gnu packages libedit) #:use-module (gnu packages llvm) #:use-module (gnu packages python) @@ -171,3 +172,104 @@ latest DMD frontend and uses LLVM as backend.") (license (list license:bsd-3 license:gpl2+ license:boost1.0)))) + + +(define-public ldc-1.1.0-beta6 + ;; The phobos, druntime and dmd-testsuite dependencies + ;; do not have a newer release than 1.1.0-beta4, hence + ;; the need to make use of the older-version variable + ;; to hold this variable + (let ((older-version "1.1.0-beta4")) + (package + (inherit ldc) + (name "ldc") + (version "1.1.0-beta6") + ;; beta version needed to compile various scientific tools + ;; that require the newer beta versions, and won't compile + ;; successfully with the older stable version + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/ldc/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0n53brlkm86jjkppy9xmzx7nyxykzj68kcxgv8q7d10s5hfscxs8")))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (let ((unpack (lambda (source target) + (with-directory-excursion target + (zero? (system* "tar" "xvf" + (assoc-ref inputs source) + "--strip-components=1")))))) + (and (unpack "phobos-src" "runtime/phobos") + (unpack "druntime-src" "runtime/druntime") + (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite"))))) + ;; the 'patch-dmd2 step in ldc causes the build to fail since + ;; dmd2/root/port.c no longer exists. arguments needed to have + ;; 'patch-dmd2 step removed, but retain everything else + (add-after 'unpack-submodule-sources 'patch-phobos + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "runtime/phobos/std/process.d" + (("/bin/sh") (which "sh")) + (("echo") (which "echo"))) + (substitute* "runtime/phobos/std/datetime.d" + (("/usr/share/zoneinfo/") + (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))) + (substitute* "tests/d2/dmd-testsuite/Makefile" + (("/bin/bash") (which "bash"))) + #t))))) + (native-inputs + `(("llvm" ,llvm) + ("clang" ,clang) + ("ldc" ,ldc) + ("python-lit" ,python-lit) + ("python-wrapper" ,python-wrapper) + ("unzip" ,unzip) + ("gdb" ,gdb) + ("phobos-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/phobos/archive/ldc-v" + older-version ".tar.gz")) + (sha256 + (base32 + "1iwy5rs0rqkicj1zfsa5yqvk8ard99bfr8g69qmhlbzb98q0kpks")) + ;; This patch deactivates some tests that depend on network access + ;; to pass. It also deactivates some tests that have some reliance + ;; on timezone + ;; For the network tests, there's an effort to get a version flag + ;; added to deactivate these tests for distribution packagers that + ;; is being pursued at + ;; https://forum.dlang.org/post/zmdbdgnzrxyvtpqafvyg@forum.dlang.org + ;; It also deactivates a test that requires /root + (patches (search-patches "ldc1.1.0-disable-phobos-tests.patch")))) + ("druntime-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/druntime/archive/ldc-v" + older-version ".tar.gz")) + (sha256 + (base32 + "1qsiw5lz1pr8ms9myjf8b94nqi7f1781k226jvxwnhkjg11d0s63")))) + ("dmd-testsuite-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/dmd-testsuite/archive/ldc-v" + older-version ".tar.gz")) + (sha256 + (base32 + "0jp54hyi75i9g41rvgmm3zg21yzv57q8dghrhb432rb0n9j15mbp")) + ;; Remove the gdb tests that fails with a "Error: No such file or directory" + ;; error, despite the files being present in the debug files left with + ;; the --keep-failed flag to guix build + (patches (search-patches "ldc1.1.0-disable-dmd-tests.patch"))))))))) + +(define-public ldc-beta ldc-1.1.0-beta6) diff --git a/gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch b/gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch new file mode 100644 index 0000000..31eb44a --- /dev/null +++ b/gnu/packages/patches/ldc1.1.0-disable-dmd-tests.patch @@ -0,0 +1,35 @@ +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/ldc1.1.0-disable-phobos-tests.patch b/gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch new file mode 100644 index 0000000..70dd419 --- /dev/null +++ b/gnu/packages/patches/ldc1.1.0-disable-phobos-tests.patch @@ -0,0 +1,414 @@ +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")) -- 2.1.4 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: Add ldc-1.1.0-beta6 2017-01-17 12:58 ` Frederick Muriithi @ 2017-01-19 12:47 ` Ludovic Courtès [not found] ` <CALjrZwaJnPN5B5PoLX5Xf56m93nOev5xaydeYYP32sg+88ZzAA@mail.gmail.com> 0 siblings, 1 reply; 14+ messages in thread From: Ludovic Courtès @ 2017-01-19 12:47 UTC (permalink / raw) To: Frederick Muriithi; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 1292 bytes --] Hi Frederick, Frederick Muriithi <fredmanglis@gmail.com> skribis: > On Thu, Jan 12, 2017 at 5:09 PM, Ludovic Courtès <ludo@gnu.org> wrote: >> ... >> The one last thing that’s missing as discussed at >> <https://lists.gnu.org/archive/html/guix-devel/2017-01/msg00788.html> is >> the comment at the top of .patch files (description and upstream >> status). >> >> Could you do that? I’ll happily commit for you afterwards. > > Apologies for the delay. Here is the updated patch. Added some > comments in the patches. > I hope those are good enough. Thank you for your patience with me as I > learn, so far. I made cosmetic adjustments to your patch (added the patches to gnu/local.mk and a copyright line, changed file names to match our convention, added missing punctuation), leading to the attached patch. However, on my x86_64 machine, the build fails with: --8<---------------cut here---------------start------------->8--- 99% tests passed, 1 tests failed out of 751 Total Test time (real) = 2134.61 sec The following tests FAILED: 235 - std.datetime (Failed) Errors while running CTest make: *** [Makefile:76: test] Error 8 --8<---------------cut here---------------end--------------->8--- Any idea what’s amiss? Thanks, Ludo’. [-- Attachment #2: the patch --] [-- Type: text/x-patch, Size: 22563 bytes --] From 38ca5e5158653ad75b73fd0ab62285e4d9f48519 Mon Sep 17 00:00:00 2001 From: Muriithi Frederick Muriuki <fredmanglis@gmail.com> Date: Fri, 6 Jan 2017 17:51:18 +0300 Subject: [PATCH 1/2] gnu: Add ldc@1.1.0-beta6. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/ldc.scm (ldc-1.1.0-beta6, ldc-beta): New variables. * gnu/packages/patches/ldc-1.1.0-disable-dmd-tests.patch: New file. * gnu/packages/patches/ldc-1.1.0-disable-phobos-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Add them. Signed-off-by: Ludovic Courtès <ludo@gnu.org> --- gnu/local.mk | 2 + gnu/packages/ldc.scm | 103 +++++ .../patches/ldc-1.1.0-disable-dmd-tests.patch | 35 ++ .../patches/ldc-1.1.0-disable-phobos-tests.patch | 414 +++++++++++++++++++++ 4 files changed, 554 insertions(+) create mode 100644 gnu/packages/patches/ldc-1.1.0-disable-dmd-tests.patch create mode 100644 gnu/packages/patches/ldc-1.1.0-disable-phobos-tests.patch diff --git a/gnu/local.mk b/gnu/local.mk index 217d31712..76be233e9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -656,6 +656,8 @@ dist_patch_DATA = \ %D%/packages/patches/kobodeluxe-graphics-window-signed-char.patch \ %D%/packages/patches/laby-make-install.patch \ %D%/packages/patches/ldc-disable-tests.patch \ + %D%/packages/patches/ldc-1.1.0-disable-dmd-tests.patch \ + %D%/packages/patches/ldc-1.1.0-disable-phobos-tests.patch \ %D%/packages/patches/liba52-enable-pic.patch \ %D%/packages/patches/liba52-link-with-libm.patch \ %D%/packages/patches/liba52-set-soname.patch \ diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm index 6ea7f664b..a1bdc586d 100644 --- a/gnu/packages/ldc.scm +++ b/gnu/packages/ldc.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015, 2016 Roel Janssen <roel@gnu.org> ;;; Copyright © 2015 Pjotr Prins <pjotr.guix@thebird.nl> +;;; Copyright © 2017 Frederick Muriithi <fredmanglis@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,6 +28,7 @@ #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages compression) + #:use-module (gnu packages gdb) #:use-module (gnu packages libedit) #:use-module (gnu packages llvm) #:use-module (gnu packages python) @@ -171,3 +173,104 @@ latest DMD frontend and uses LLVM as backend.") (license (list license:bsd-3 license:gpl2+ license:boost1.0)))) + + +(define-public ldc-1.1.0-beta6 + ;; The phobos, druntime and dmd-testsuite dependencies do not have a newer + ;; release than 1.1.0-beta4, hence the need to make use of the older-version + ;; variable to hold this variable. + (let ((older-version "1.1.0-beta4")) + (package + (inherit ldc) + (name "ldc") + (version "1.1.0-beta6") + ;; Beta version needed to compile various scientific tools that require + ;; the newer beta versions, and won't compile successfully with the + ;; older stable version. + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/ldc/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0n53brlkm86jjkppy9xmzx7nyxykzj68kcxgv8q7d10s5hfscxs8")))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (let ((unpack (lambda (source target) + (with-directory-excursion target + (zero? (system* "tar" "xvf" + (assoc-ref inputs source) + "--strip-components=1")))))) + (and (unpack "phobos-src" "runtime/phobos") + (unpack "druntime-src" "runtime/druntime") + (unpack "dmd-testsuite-src" "tests/d2/dmd-testsuite"))))) + ;; The 'patch-dmd2 step in ldc causes the build to fail since + ;; dmd2/root/port.c no longer exists. Arguments needed to have + ;; 'patch-dmd2 step removed, but retain everything else. + (add-after 'unpack-submodule-sources 'patch-phobos + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "runtime/phobos/std/process.d" + (("/bin/sh") (which "sh")) + (("echo") (which "echo"))) + (substitute* "runtime/phobos/std/datetime.d" + (("/usr/share/zoneinfo/") + (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))) + (substitute* "tests/d2/dmd-testsuite/Makefile" + (("/bin/bash") (which "bash"))) + #t))))) + (native-inputs + `(("llvm" ,llvm) + ("clang" ,clang) + ("ldc" ,ldc) + ("python-lit" ,python-lit) + ("python-wrapper" ,python-wrapper) + ("unzip" ,unzip) + ("gdb" ,gdb) + ("phobos-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/phobos/archive/ldc-v" + older-version ".tar.gz")) + (sha256 + (base32 + "1iwy5rs0rqkicj1zfsa5yqvk8ard99bfr8g69qmhlbzb98q0kpks")) + ;; This patch deactivates some tests that depend on network access + ;; to pass. It also deactivates some tests that have some reliance + ;; on timezone. + ;; + ;; For the network tests, there's an effort to get a version flag + ;; added to deactivate these tests for distribution packagers + ;; that is being pursued at + ;; <https://forum.dlang.org/post/zmdbdgnzrxyvtpqafvyg@forum.dlang.org>. + ;; It also deactivates a test that requires /root + (patches (search-patches "ldc-1.1.0-disable-phobos-tests.patch")))) + ("druntime-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/druntime/archive/ldc-v" + older-version ".tar.gz")) + (sha256 + (base32 + "1qsiw5lz1pr8ms9myjf8b94nqi7f1781k226jvxwnhkjg11d0s63")))) + ("dmd-testsuite-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ldc-developers/dmd-testsuite/archive/ldc-v" + older-version ".tar.gz")) + (sha256 + (base32 + "0jp54hyi75i9g41rvgmm3zg21yzv57q8dghrhb432rb0n9j15mbp")) + ;; Remove the gdb tests that fails with a "Error: No such file or + ;; directory" error, despite the files being present in the debug + ;; files left with the --keep-failed flag to guix build. + (patches (search-patches "ldc-1.1.0-disable-dmd-tests.patch"))))))))) + +(define-public ldc-beta ldc-1.1.0-beta6) 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 new file mode 100644 index 000000000..31eb44aef --- /dev/null +++ b/gnu/packages/patches/ldc-1.1.0-disable-dmd-tests.patch @@ -0,0 +1,35 @@ +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 new file mode 100644 index 000000000..70dd41945 --- /dev/null +++ b/gnu/packages/patches/ldc-1.1.0-disable-phobos-tests.patch @@ -0,0 +1,414 @@ +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")) -- 2.11.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
[parent not found: <CALjrZwaJnPN5B5PoLX5Xf56m93nOev5xaydeYYP32sg+88ZzAA@mail.gmail.com>]
[parent not found: <CALjrZwbB__c8_VVETcurMxKeP4n3iyN70SpuAexp3jJXAGn8eg@mail.gmail.com>]
[parent not found: <CALjrZwY9gNvP_KbmhrR1V+oKxV=RFOCWeqfjQvMZ0t0HX5tEhg@mail.gmail.com>]
[parent not found: <CALjrZwapZQtNvdp-KGBUGD6UM34RZxO3Xvqwe=++xGqNvqUE6A@mail.gmail.com>]
[parent not found: <CALjrZwavQ0sTw3Ds8ALpYbppvfbNevj7c7vQjqn7uJqY0hqxaA@mail.gmail.com>]
[parent not found: <CALjrZwb2iZPcce+vkVoTGfq7dZZ+zbxz3TyxN5L+Uq_cwiO_MQ@mail.gmail.com>]
* Re: [PATCH] gnu: Add ldc-1.1.0-beta6 [not found] ` <CALjrZwb2iZPcce+vkVoTGfq7dZZ+zbxz3TyxN5L+Uq_cwiO_MQ@mail.gmail.com> @ 2017-01-19 13:00 ` Frederick Muriithi 2017-01-20 13:33 ` Ludovic Courtès 0 siblings, 1 reply; 14+ messages in thread From: Frederick Muriithi @ 2017-01-19 13:00 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 731 bytes --] On 19 Jan 2017 3:47 p.m., "Ludovic Courtès" <ludo@gnu.org> wrote: ... However, on my x86_64 machine, the build fails with: --8<---------------cut here---------------start------------->8--- 99% tests passed, 1 tests failed out of 751 Total Test time (real) = 2134.61 sec The following tests FAILED: 235 - std.datetime (Failed) Errors while running CTest make: *** [Makefile:76: test] Error 8 --8<---------------cut here---------------end--------------->8--- Any idea what’s amiss? If you have the time , look in builild/Testing/Temporary/Last test.log file in the debug folder created by guix with the --keep-failed flag: If you can't, I'll look at it when I get back to my computer. Thanks. [-- Attachment #2: Type: text/html, Size: 1274 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: Add ldc-1.1.0-beta6 2017-01-19 13:00 ` Frederick Muriithi @ 2017-01-20 13:33 ` Ludovic Courtès 2017-01-22 9:27 ` Frederick Muriithi 0 siblings, 1 reply; 14+ messages in thread From: Ludovic Courtès @ 2017-01-20 13:33 UTC (permalink / raw) To: Frederick Muriithi; +Cc: guix-devel Frederick Muriithi <fredmanglis@gmail.com> skribis: > On 19 Jan 2017 3:47 p.m., "Ludovic Courtès" <ludo@gnu.org> wrote: > > ... However, on my x86_64 machine, the build fails with: > --8<---------------cut here---------------start------------->8--- > 99% tests passed, 1 tests failed out of 751 > > Total Test time (real) = 2134.61 sec > > The following tests FAILED: > 235 - std.datetime (Failed) > Errors while running CTest > make: *** [Makefile:76: test] Error 8 > --8<---------------cut here---------------end--------------->8--- > > Any idea what’s amiss? > > If you have the time , look in builild/Testing/Temporary/Last test.log file in the debug folder created by guix with the --keep-failed flag: If you can't, > I'll look at it when I get back to my computer. Please do! TIA, Ludo’. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: Add ldc-1.1.0-beta6 2017-01-20 13:33 ` Ludovic Courtès @ 2017-01-22 9:27 ` Frederick Muriithi 2017-01-28 0:28 ` Ludovic Courtès 0 siblings, 1 reply; 14+ messages in thread From: Frederick Muriithi @ 2017-01-22 9:27 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel On Fri, Jan 20, 2017 at 4:33 PM, Ludovic Courtès <ludo@gnu.org> wrote: > Frederick Muriithi <fredmanglis@gmail.com> skribis: > >> On 19 Jan 2017 3:47 p.m., "Ludovic Courtès" <ludo@gnu.org> wrote: >> >> ... However, on my x86_64 machine, the build fails with: >> --8<---------------cut here---------------start------------->8--- >> 99% tests passed, 1 tests failed out of 751 >> >> Total Test time (real) = 2134.61 sec >> >> The following tests FAILED: >> 235 - std.datetime (Failed) >> Errors while running CTest >> make: *** [Makefile:76: test] Error 8 >> --8<---------------cut here---------------end--------------->8--- >> >> Any idea what’s amiss? >> >> If you have the time , look in builild/Testing/Temporary/Last test.log file in the debug folder created by guix with the --keep-failed flag: If you can't, >> I'll look at it when I get back to my computer. > > Please do! > > TIA, > Ludo’. I ran `dos2unix 0001-gnu-Add-ldc-1.1.0-beta6.patch` then applied the patch on a newly cloned guix repository and ran the following command: ./pre-inst-env guix environment guix --pure -- ./pre-inst-env guix build --keep-failed ldc@1.1.0-beta6 on my system. The ldc build ran successfully with no errors. My system is a x86_64, running Debian 8 (Jessie). The output of `uname -a` is: Linux localhost 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux When you get the time, please send me the files in /tmp/guix-build-ldc-1.1.0-beta6.drv-0/build/Testing from your system. Those should help me troubleshoot the issue. -- Frederick M. Muriithi ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: Add ldc-1.1.0-beta6 2017-01-22 9:27 ` Frederick Muriithi @ 2017-01-28 0:28 ` Ludovic Courtès 0 siblings, 0 replies; 14+ messages in thread From: Ludovic Courtès @ 2017-01-28 0:28 UTC (permalink / raw) To: Frederick Muriithi; +Cc: guix-devel Frederick Muriithi <fredmanglis@gmail.com> skribis: > On Fri, Jan 20, 2017 at 4:33 PM, Ludovic Courtès <ludo@gnu.org> wrote: >> Frederick Muriithi <fredmanglis@gmail.com> skribis: >> >>> On 19 Jan 2017 3:47 p.m., "Ludovic Courtès" <ludo@gnu.org> wrote: >>> >>> ... However, on my x86_64 machine, the build fails with: >>> --8<---------------cut here---------------start------------->8--- >>> 99% tests passed, 1 tests failed out of 751 >>> >>> Total Test time (real) = 2134.61 sec >>> >>> The following tests FAILED: >>> 235 - std.datetime (Failed) >>> Errors while running CTest >>> make: *** [Makefile:76: test] Error 8 >>> --8<---------------cut here---------------end--------------->8--- >>> >>> Any idea what’s amiss? >>> >>> If you have the time , look in builild/Testing/Temporary/Last test.log file in the debug folder created by guix with the --keep-failed flag: If you can't, >>> I'll look at it when I get back to my computer. >> >> Please do! >> >> TIA, >> Ludo’. > > I ran `dos2unix 0001-gnu-Add-ldc-1.1.0-beta6.patch` then applied the > patch on a newly cloned guix repository and ran the following command: > > ./pre-inst-env guix environment guix --pure -- ./pre-inst-env guix > build --keep-failed ldc@1.1.0-beta6 > > on my system. > The ldc build ran successfully with no errors. > > My system is a x86_64, running Debian 8 (Jessie). The output of `uname -a` is: > > Linux localhost 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 > (2016-12-30) x86_64 GNU/Linux > > When you get the time, please send me the files in > /tmp/guix-build-ldc-1.1.0-beta6.drv-0/build/Testing from your system. > Those should help me troubleshoot the issue. I tried another time and this time all the tests passed. I have pushed the patch and we’ll investigate when the problem comes up again: http://git.savannah.gnu.org/cgit/guix.git/commit/?id=2429dde57d8461cc8e51dbe6c9d47d795fe6fc9a Thanks, and sorry for the delay! Ludo’. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: Add ldc-1.1.0-beta6 2017-01-09 14:41 ` Ludovic Courtès 2017-01-10 5:55 ` Frederick Muriithi 2017-01-10 14:36 ` Frederick Muriithi @ 2017-01-19 11:02 ` Pjotr Prins 2017-01-28 6:09 ` Pjotr Prins 2 siblings, 1 reply; 14+ messages in thread From: Pjotr Prins @ 2017-01-19 11:02 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel, Frederick Muriithi On Mon, Jan 09, 2017 at 03:41:40PM +0100, Ludovic Courtès wrote: > Overall the patch looks good to me. > > One question: We usually avoid packaging software that has no release or > has an “alpha” or “beta” label. Do you think we could wait for 1.1.0 to > be officially released? Or are there good reasons why we should not > wait? ldc is pretty stable and there are many commits since the last stable release which are needed. Normally we should support 1.0.0, but since that is more than 6 months old I think we can skip that. Next round will be stable 1.1.0 (I am building a git checkout right now because I need the recent stack trace fix!). In all I suggest we support 1.1.0-beta6 and then on to 1.1.0 etc. We can add new beta's on top of that again for those who want it. Pj. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] gnu: Add ldc-1.1.0-beta6 2017-01-19 11:02 ` Pjotr Prins @ 2017-01-28 6:09 ` Pjotr Prins 0 siblings, 0 replies; 14+ messages in thread From: Pjotr Prins @ 2017-01-28 6:09 UTC (permalink / raw) To: Pjotr Prins; +Cc: guix-devel, Frederick Muriithi ldc 1.1.0 was released yesterday :). I am testing. Pj. ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2017-01-28 6:12 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-01-06 15:04 [PATCH] gnu: Add ldc-1.1.0-beta6 Frederick Muriithi 2017-01-07 16:32 ` Pjotr Prins 2017-01-09 14:41 ` Ludovic Courtès 2017-01-10 5:55 ` Frederick Muriithi 2017-01-10 14:36 ` Frederick Muriithi 2017-01-12 14:09 ` Ludovic Courtès 2017-01-17 12:58 ` Frederick Muriithi 2017-01-19 12:47 ` Ludovic Courtès [not found] ` <CALjrZwaJnPN5B5PoLX5Xf56m93nOev5xaydeYYP32sg+88ZzAA@mail.gmail.com> [not found] ` <CALjrZwbB__c8_VVETcurMxKeP4n3iyN70SpuAexp3jJXAGn8eg@mail.gmail.com> [not found] ` <CALjrZwY9gNvP_KbmhrR1V+oKxV=RFOCWeqfjQvMZ0t0HX5tEhg@mail.gmail.com> [not found] ` <CALjrZwapZQtNvdp-KGBUGD6UM34RZxO3Xvqwe=++xGqNvqUE6A@mail.gmail.com> [not found] ` <CALjrZwavQ0sTw3Ds8ALpYbppvfbNevj7c7vQjqn7uJqY0hqxaA@mail.gmail.com> [not found] ` <CALjrZwb2iZPcce+vkVoTGfq7dZZ+zbxz3TyxN5L+Uq_cwiO_MQ@mail.gmail.com> 2017-01-19 13:00 ` Frederick Muriithi 2017-01-20 13:33 ` Ludovic Courtès 2017-01-22 9:27 ` Frederick Muriithi 2017-01-28 0:28 ` Ludovic Courtès 2017-01-19 11:02 ` Pjotr Prins 2017-01-28 6:09 ` Pjotr Prins
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.