From 8c29c7be6f18f54fdd99504ef025c72b0ab16ef7 Mon Sep 17 00:00:00 2001 From: Lukas Eipert Date: Tue, 5 Feb 2019 20:58:05 +0100 Subject: Simplify test script by ending with diff directly --- test/test.sh | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/test/test.sh b/test/test.sh index bbf66f7..2b6326c 100755 --- a/test/test.sh +++ b/test/test.sh @@ -16,24 +16,9 @@ cd "/code/$project" git checkout "$ref" 2> /dev/null /run.sh analyze . +# In order to upload the artifact to check it manually mkdir -p /results/ -# In order to upload the artifact always cp "/code/$project/gl-license-management-report.json" "/results/$project-gl-license-management-report.json" # Compare results with expected results. -set +e - -diff "/code/$project/gl-license-management-report.json" "/test/results/$project.json" > /diff.txt -error=$? -if [[ $error -eq 0 ]]; then - echo "The report matches the fixture." - exit 0 -elif [[ $error -eq 1 ]]; then - echo "Unexpected result. Here is the diff between actual results and those expected :" - cat /diff.txt - mv /diff.txt "/results/$project-diff.txt" -else - echo "Could not compare the fixture to the generated report" -fi - -exit 1 +diff "/code/$project/gl-license-management-report.json" "/test/results/$project.json" -- cgit v1.2.3