From d8e4dbbeb497ac0ab15fb67874979f2b254a7286 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Thu, 19 Jul 2018 10:30:32 -0700 Subject: [PATCH] Updating the templated HWIntrinsic tests to use `TestLibrary.TestFramework` for logging. --- .../X86/Shared/AlternatingBinOpTest.template | 10 +++++----- .../X86/Shared/AlternatingTernOpTest.template | 12 ++++++------ .../X86/Shared/BooleanBinOpTest.template | 10 +++++----- .../X86/Shared/BooleanCmpOpTest.template | 10 +++++----- .../X86/Shared/BooleanTwoCmpOpTest.template | 10 +++++----- .../X86/Shared/BooleanUnOpTest.template | 8 ++++---- .../X86/Shared/ExtractScalarTest.template | 8 ++++---- .../X86/Shared/ExtractStoreTest.template | 8 ++++---- .../X86/Shared/ExtractVector128Test.template | 8 ++++---- .../X86/Shared/GenericUnOpTest.template | 8 ++++---- .../X86/Shared/HorizontalBinOpTest.template | 10 +++++----- .../X86/Shared/ImmBinOpTest.template | 10 +++++----- .../X86/Shared/ImmUnOpTest.template | 8 ++++---- .../X86/Shared/InsertLoadTest.template | 10 +++++----- .../X86/Shared/InsertScalarTest.template | 8 ++++---- .../X86/Shared/InsertVector128Test.template | 10 +++++----- .../JIT/HardwareIntrinsics/X86/Shared/Program.cs | 13 ++++++++----- .../X86/Shared/ScalarBinOpTest.template | 10 +++++----- .../X86/Shared/ScalarSimdUnOpTest.template | 8 ++++---- .../X86/Shared/ScalarUnOpTest.template | 8 ++++---- .../X86/Shared/SimdScalarUnOpTest.template | 8 ++++---- .../X86/Shared/SimpleBinOpTest.template | 10 +++++----- .../X86/Shared/SimpleTernOpTest.template | 12 ++++++------ .../X86/Shared/SimpleUnOpTest.template | 8 ++++---- 24 files changed, 114 insertions(+), 111 deletions(-) diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/AlternatingBinOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/AlternatingBinOpTest.template index bee607a52b..cbdb51a5a1 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/AlternatingBinOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/AlternatingBinOpTest.template @@ -366,11 +366,11 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); - Console.WriteLine($" left: ({string.Join(", ", left)})"); - Console.WriteLine($" right: ({string.Join(", ", right)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); + TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/AlternatingTernOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/AlternatingTernOpTest.template index 16823d9578..c778890b88 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/AlternatingTernOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/AlternatingTernOpTest.template @@ -392,12 +392,12 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>, {Op3VectorType}<{Op3BaseType}>): {method} failed:"); - Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); - Console.WriteLine($" secondOp: ({string.Join(", ", secondOp)})"); - Console.WriteLine($" thirdOp: ({string.Join(", ", thirdOp)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>, {Op3VectorType}<{Op3BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); + TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); + TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanBinOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanBinOpTest.template index 2c5989f687..828d9772ec 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanBinOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanBinOpTest.template @@ -351,11 +351,11 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = false; - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); - Console.WriteLine($" left: ({string.Join(", ", left)})"); - Console.WriteLine($" right: ({string.Join(", ", right)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); + TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanCmpOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanCmpOpTest.template index 228991aebe..bb33b154f3 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanCmpOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanCmpOpTest.template @@ -332,11 +332,11 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = false; - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); - Console.WriteLine($" left: ({string.Join(", ", left)})"); - Console.WriteLine($" right: ({string.Join(", ", right)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); + TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanTwoCmpOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanTwoCmpOpTest.template index cc9cdb7286..171fb121e8 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanTwoCmpOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanTwoCmpOpTest.template @@ -357,11 +357,11 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = false; - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); - Console.WriteLine($" left: ({string.Join(", ", left)})"); - Console.WriteLine($" right: ({string.Join(", ", right)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); + TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanUnOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanUnOpTest.template index daef5c7ec4..84d00d419c 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanUnOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/BooleanUnOpTest.template @@ -314,10 +314,10 @@ namespace JIT.HardwareIntrinsics.X86 { Succeeded = false; - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); - Console.WriteLine($" value: ({string.Join(", ", value)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" value: ({string.Join(", ", value)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractScalarTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractScalarTest.template index a13b2e66ac..ae9a908306 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractScalarTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractScalarTest.template @@ -337,10 +337,10 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}><9>): {method} failed:"); - Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}><9>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractStoreTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractStoreTest.template index 480f373439..109420f4a6 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractStoreTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractStoreTest.template @@ -335,10 +335,10 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}><9>): {method} failed:"); - Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}><9>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractVector128Test.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractVector128Test.template index 247243a9e4..c6a34ecbe2 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractVector128Test.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ExtractVector128Test.template @@ -348,10 +348,10 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}><9>): {method} failed:"); - Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}><9>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/GenericUnOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/GenericUnOpTest.template index 9ed3500ff4..5036cd23ec 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/GenericUnOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/GenericUnOpTest.template @@ -344,10 +344,10 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); - Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/HorizontalBinOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/HorizontalBinOpTest.template index d6e83b7b93..bd343d2bf8 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/HorizontalBinOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/HorizontalBinOpTest.template @@ -373,11 +373,11 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); - Console.WriteLine($" left: ({string.Join(", ", left)})"); - Console.WriteLine($" right: ({string.Join(", ", right)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); + TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ImmBinOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ImmBinOpTest.template index f2acb74926..1725875eb6 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ImmBinOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ImmBinOpTest.template @@ -374,11 +374,11 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>.{Imm}, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); - Console.WriteLine($" left: ({string.Join(", ", left)})"); - Console.WriteLine($" right: ({string.Join(", ", right)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>.{Imm}, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); + TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ImmUnOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ImmUnOpTest.template index 5c593efdf9..b21e682224 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ImmUnOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ImmUnOpTest.template @@ -348,10 +348,10 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}><9>): {method} failed:"); - Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}><9>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertLoadTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertLoadTest.template index 28d0e8a4a1..121bb69dba 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertLoadTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertLoadTest.template @@ -376,11 +376,11 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>.{Imm}): {method} failed:"); - Console.WriteLine($" left: ({string.Join(", ", left)})"); - Console.WriteLine($" right: ({string.Join(", ", right)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>.{Imm}): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); + TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertScalarTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertScalarTest.template index e61ba655cc..d7daa9ccae 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertScalarTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertScalarTest.template @@ -349,10 +349,10 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}><9>): {method} failed:"); - Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}><9>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertVector128Test.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertVector128Test.template index ecbdcbb772..1fb4014620 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertVector128Test.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/InsertVector128Test.template @@ -376,11 +376,11 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>.{Imm}): {method} failed:"); - Console.WriteLine($" left: ({string.Join(", ", left)})"); - Console.WriteLine($" right: ({string.Join(", ", right)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>.{Imm}): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); + TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/Program.cs b/tests/src/JIT/HardwareIntrinsics/X86/Shared/Program.cs index a5162815f2..99ff4f529b 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/Program.cs +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/Program.cs @@ -3,8 +3,8 @@ // See the LICENSE file in the project root for more information. using System; -using System.Linq; using System.Collections.Generic; +using System.Linq; namespace JIT.HardwareIntrinsics.X86 { @@ -21,7 +21,7 @@ namespace JIT.HardwareIntrinsics.X86 foreach (string testToRun in GetTestsToRun(args)) { - Console.WriteLine($"Running {testToRun} test..."); + TestLibrary.TestFramework.BeginTestCase(testToRun); try { @@ -29,9 +29,12 @@ namespace JIT.HardwareIntrinsics.X86 } catch (Exception e) { - Console.WriteLine($"Error: {e.Message}"); + TestLibrary.TestFramework.LogError(e.GetType().ToString(), e.Message); + TestLibrary.TestFramework.LogVerbose(e.StackTrace); isPassing = false; } + + TestLibrary.TestFramework.EndTestCase(); } return isPassing ? PASS : FAIL; @@ -63,7 +66,7 @@ namespace JIT.HardwareIntrinsics.X86 private static void PrintUsage() { - Console.WriteLine($@"Usage: + TestLibrary.TestFramework.LogInformation($@"Usage: {Environment.GetCommandLineArgs()[0]} [testName] [testName]: The name of the function to test. @@ -73,7 +76,7 @@ namespace JIT.HardwareIntrinsics.X86 Available Test Names:"); foreach (string testName in TestList.Keys) { - Console.WriteLine($" {testName}"); + TestLibrary.TestFramework.LogInformation($" {testName}"); } Environment.Exit(FAIL); diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarBinOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarBinOpTest.template index 767ecb1a5f..8f8c0a0adb 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarBinOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarBinOpTest.template @@ -210,11 +210,11 @@ namespace JIT.HardwareIntrinsics.X86 if (isUnexpectedResult) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1BaseType}, {Op2BaseType}): {Method} failed:"); - Console.WriteLine($" left: {left}"); - Console.WriteLine($" right: {right}"); - Console.WriteLine($" result: {result}"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1BaseType}, {Op2BaseType}): {Method} failed:"); + TestLibrary.TestFramework.LogInformation($" left: {left}"); + TestLibrary.TestFramework.LogInformation($" right: {right}"); + TestLibrary.TestFramework.LogInformation($" result: {result}"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarSimdUnOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarSimdUnOpTest.template index 89095a08da..6389070818 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarSimdUnOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarSimdUnOpTest.template @@ -233,10 +233,10 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); - Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarUnOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarUnOpTest.template index 8e371a88d2..0f585c0c22 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarUnOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/ScalarUnOpTest.template @@ -196,10 +196,10 @@ namespace JIT.HardwareIntrinsics.X86 if (isUnexpectedResult) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1BaseType}): {Method} failed:"); - Console.WriteLine($" data: {data}"); - Console.WriteLine($" result: {result}"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1BaseType}): {Method} failed:"); + TestLibrary.TestFramework.LogInformation($" data: {data}"); + TestLibrary.TestFramework.LogInformation($" result: {result}"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimdScalarUnOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimdScalarUnOpTest.template index cb1c120d97..f248c376b9 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimdScalarUnOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimdScalarUnOpTest.template @@ -306,10 +306,10 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); - Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); - Console.WriteLine($" result: result"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); + TestLibrary.TestFramework.LogInformation($" result: result"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimpleBinOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimpleBinOpTest.template index 5088d80f51..bb246cf517 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimpleBinOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimpleBinOpTest.template @@ -367,11 +367,11 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); - Console.WriteLine($" left: ({string.Join(", ", left)})"); - Console.WriteLine($" right: ({string.Join(", ", right)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" left: ({string.Join(", ", left)})"); + TestLibrary.TestFramework.LogInformation($" right: ({string.Join(", ", right)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimpleTernOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimpleTernOpTest.template index 897a313a1f..5d9529d63c 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimpleTernOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimpleTernOpTest.template @@ -393,12 +393,12 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>, {Op3VectorType}<{Op3BaseType}>): {method} failed:"); - Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); - Console.WriteLine($" secondOp: ({string.Join(", ", secondOp)})"); - Console.WriteLine($" thirdOp: ({string.Join(", ", thirdOp)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>, {Op2VectorType}<{Op2BaseType}>, {Op3VectorType}<{Op3BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); + TestLibrary.TestFramework.LogInformation($" secondOp: ({string.Join(", ", secondOp)})"); + TestLibrary.TestFramework.LogInformation($" thirdOp: ({string.Join(", ", thirdOp)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } diff --git a/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimpleUnOpTest.template b/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimpleUnOpTest.template index b786357121..62e4946b26 100644 --- a/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimpleUnOpTest.template +++ b/tests/src/JIT/HardwareIntrinsics/X86/Shared/SimpleUnOpTest.template @@ -341,10 +341,10 @@ namespace JIT.HardwareIntrinsics.X86 if (!Succeeded) { - Console.WriteLine($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); - Console.WriteLine($" firstOp: ({string.Join(", ", firstOp)})"); - Console.WriteLine($" result: ({string.Join(", ", result)})"); - Console.WriteLine(); + TestLibrary.TestFramework.LogInformation($"{nameof({Isa})}.{nameof({Isa}.{Method})}<{RetBaseType}>({Op1VectorType}<{Op1BaseType}>): {method} failed:"); + TestLibrary.TestFramework.LogInformation($" firstOp: ({string.Join(", ", firstOp)})"); + TestLibrary.TestFramework.LogInformation($" result: ({string.Join(", ", result)})"); + TestLibrary.TestFramework.LogInformation(string.Empty); } } } -- 2.34.1