diff options
| author | Lukas Eipert <leipert@gitlab.com> | 2019-02-05 20:58:05 +0100 |
|---|---|---|
| committer | Lukas Eipert <leipert@gitlab.com> | 2019-02-05 20:58:05 +0100 |
| commit | 8c29c7be6f18f54fdd99504ef025c72b0ab16ef7 (patch) | |
| tree | 00b4cd511469151f7a3f5c07ae6a6fe6946f6577 | |
| parent | 76385b533e179f1faf51ad3da8e1b07abb427526 (diff) | |
Simplify test script by ending with diff directly
| -rwxr-xr-x | test/test.sh | 19 |
1 files 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" |
