gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 104/151: tests: use \r\n for log messages in WSL


From: gnunet
Subject: [gnurl] 104/151: tests: use \r\n for log messages in WSL
Date: Fri, 20 Dec 2019 14:26:53 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 0783f2e585b1ee726698b172ca899d21a7e0af30
Author: Marc Hoersken <address@hidden>
AuthorDate: Sat May 18 23:26:48 2019 +0200

    tests: use \r\n for log messages in WSL
    
    Bash in Windows Subsystem for Linux (WSL) requires it for some reason.
    
    (This is one of several commits to support use of WSL for the tests.)
    
    Ref: https://github.com/curl/curl/pull/3899
---
 tests/runtests.pl | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tests/runtests.pl b/tests/runtests.pl
index 63bd2da68..737fbe27e 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -206,6 +206,9 @@ my $valgrind_tool;
 my $gdb = checktestcmd("gdb");
 my $httptlssrv = find_httptlssrv();
 
+my $uname_release = `uname -r`;
+my $is_wsl = $uname_release =~ /Microsoft$/;
+
 my $has_ssl;        # set if libcurl is built with SSL support
 my $has_largefile;  # set if libcurl is built with large file support
 my $has_idn;        # set if libcurl is built with IDN support
@@ -324,7 +327,12 @@ my $tortalloc;
 #
 sub logmsg {
     for(@_) {
-        print "$_";
+        my $line = $_;
+        if ($is_wsl) {
+            # use \r\n for WSL shell
+            $line =~ s/\r?\n$/\r\n/g;
+        }
+        print "$line";
     }
 }
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]