about summary refs log tree commit diff
path: root/pkgs/test/cc-wrapper
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2023-09-07 04:51:52 +0300
committerArtturin <Artturin@artturin.com>2023-09-07 22:36:16 +0300
commit535447e289be901fb309952e7bfc1c913083241d (patch)
treeab28d26267c6e56f4dc7ad601f5a379e82f21047 /pkgs/test/cc-wrapper
parent1b6c3aed6336efd056f5e3e0165e3e74f04b169f (diff)
tests.cc-wrapper: show command output on different line
this is much easier to read.
Diffstat (limited to 'pkgs/test/cc-wrapper')
-rw-r--r--pkgs/test/cc-wrapper/default.nix20
1 files changed, 10 insertions, 10 deletions
diff --git a/pkgs/test/cc-wrapper/default.nix b/pkgs/test/cc-wrapper/default.nix
index 7d38ae31cf73d..8809030989e69 100644
--- a/pkgs/test/cc-wrapper/default.nix
+++ b/pkgs/test/cc-wrapper/default.nix
@@ -22,16 +22,16 @@ in stdenv.mkDerivation {
     NIX_DEBUG=1 $CC -v
     NIX_DEBUG=1 $CXX -v
 
-    printf "checking whether compiler builds valid C binaries... " >&2
+    echo "checking whether compiler builds valid C binaries... " >&2
     $CC -o cc-check ${./cc-main.c}
     ${emulator} ./cc-check
 
-    printf "checking whether compiler builds valid C++ binaries... " >&2
+    echo "checking whether compiler builds valid C++ binaries... " >&2
     $CXX -o cxx-check ${./cxx-main.cc}
     ${emulator} ./cxx-check
 
     ${lib.optionalString (stdenv.isDarwin && stdenv.cc.isClang) ''
-      printf "checking whether compiler can build with CoreFoundation.framework... " >&2
+      echo "checking whether compiler can build with CoreFoundation.framework... " >&2
       mkdir -p foo/lib
       $CC -framework CoreFoundation -o core-foundation-check ${./core-foundation-main.c}
       ${emulator} ./core-foundation-check
@@ -39,11 +39,11 @@ in stdenv.mkDerivation {
 
 
     ${lib.optionalString (!stdenv.isDarwin) ''
-      printf "checking whether compiler builds valid static C binaries... " >&2
+      echo "checking whether compiler builds valid static C binaries... " >&2
       $CC ${staticLibc} -static -o cc-static ${./cc-main.c}
       ${emulator} ./cc-static
       ${lib.optionalString (stdenv.cc.isGNU && lib.versionAtLeast (lib.getVersion stdenv.cc.name) "8.0.0") ''
-        printf "checking whether compiler builds valid static pie C binaries... " >&2
+        echo "checking whether compiler builds valid static pie C binaries... " >&2
         $CC ${staticLibc} -static-pie -o cc-static-pie ${./cc-main.c}
         ${emulator} ./cc-static-pie
       ''}
@@ -52,7 +52,7 @@ in stdenv.mkDerivation {
     ${# See: https://github.com/llvm/llvm-project/commit/ed1d07282cc9d8e4c25d585e03e5c8a1b6f63a74
       # `gcc` does not support this so we gate the test on `clang`
       lib.optionalString stdenv.cc.isClang ''
-        printf "checking whether cc-wrapper accepts -- followed by positional (file) args..." >&2
+        echo "checking whether cc-wrapper accepts -- followed by positional (file) args..." >&2
         mkdir -p positional
 
         # Make sure `--` is not parsed as a "non flag arg"; we should get an
@@ -70,13 +70,13 @@ in stdenv.mkDerivation {
         ${emulator} ./positional/main
     ''}
 
-    printf "checking whether compiler uses NIX_CFLAGS_COMPILE... " >&2
+    echo "checking whether compiler uses NIX_CFLAGS_COMPILE... " >&2
     mkdir -p foo/include
     cp ${./foo.c} foo/include/foo.h
     NIX_CFLAGS_COMPILE="-Ifoo/include -DVALUE=42" $CC -o cflags-check ${./cflags-main.c}
     ${emulator} ./cflags-check
 
-    printf "checking whether compiler uses NIX_LDFLAGS... " >&2
+    echo "checking whether compiler uses NIX_LDFLAGS... " >&2
     mkdir -p foo/lib
     $CC -shared \
       ${lib.optionalString stdenv.isDarwin "-Wl,-install_name,@rpath/libfoo.dylib"} \
@@ -87,7 +87,7 @@ in stdenv.mkDerivation {
     NIX_LDFLAGS="-L$NIX_BUILD_TOP/foo/lib -rpath $NIX_BUILD_TOP/foo/lib" $CC -lfoo -o ldflags-check ${./ldflags-main.c}
     ${emulator} ./ldflags-check
 
-    printf "Check whether -nostdinc and -nostdinc++ is handled correctly" >&2
+    echo "Check whether -nostdinc and -nostdinc++ is handled correctly" >&2
     mkdir -p std-include
     cp ${./stdio.h} std-include/stdio.h
     NIX_DEBUG=1 $CC -I std-include -nostdinc -o nostdinc-main ${./nostdinc-main.c}
@@ -96,7 +96,7 @@ in stdenv.mkDerivation {
     ${emulator} ./nostdinc-main++
 
     ${lib.optionalString sanitizersWorking ''
-      printf "checking whether sanitizers are fully functional... ">&2
+      echo "checking whether sanitizers are fully functional... ">&2
       $CC -o sanitizers -fsanitize=address,undefined ${./sanitizers.c}
       ASAN_OPTIONS=use_sigaltstack=0 ${emulator} ./sanitizers
     ''}