diff options
| author | Lukas Eipert <leipert@gitlab.com> | 2018-06-14 18:36:22 +0000 |
|---|---|---|
| committer | Fabien Catteau <fcatteau@gitlab.com> | 2018-06-14 18:36:22 +0000 |
| commit | 2bf9bc8145a881b7b6e17423ab8dfccbfd138fc7 (patch) | |
| tree | cb42f99f76906d6ae652dc0b0dfc1ad5256cbf59 /test/test.sh | |
| parent | ae265f62905777bd9df4c6397399413794afb15e (diff) | |
Ensure that license name order is consistent
Diffstat (limited to 'test/test.sh')
| -rwxr-xr-x | test/test.sh | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/test/test.sh b/test/test.sh index c77ec1d..0130492 100755 --- a/test/test.sh +++ b/test/test.sh @@ -2,24 +2,26 @@ set -e -# Clone the Ruby Bundler test repository. -echo "Cloning the test repository https://gitlab.com/gitlab-org/security-products/tests/ruby-bundler.git" -git clone https://gitlab.com/gitlab-org/security-products/tests/ruby-bundler.git /code +for project in ruby-bundler java-maven; do + # Clone the test repository. + echo "Cloning the test repository https://gitlab.com/gitlab-org/security-products/tests/$project.git" + git clone "https://gitlab.com/gitlab-org/security-products/tests/$project.git" "/code/$project" -# Run license management on it. -echo "Running license management on the cloned repository" -cd /code -/run.sh analyze . + # Run license management on it. + echo "Running license management on the $project" + cd "/code/$project" + /run.sh analyze . -# Compare results with expected results. -set +e -diff /code/gl-license-management-report.json /test/results/ruby-bundler.json > /diff.txt + # Compare results with expected results. + set +e + diff "/code/$project/gl-license-management-report.json" "/test/results/$project.json" > /diff.txt + set -e -if [ -s /diff.txt ] ; then - echo "Unexpected result. Here is the diff between actual results and those expected :" - cat /diff.txt - exit 1 -else - echo "All tests are OK." -fi + if [ -s /diff.txt ] ; then + echo "Unexpected result. Here is the diff between actual results and those expected :" + cat /diff.txt + exit 1 + fi +done +echo "All tests are OK." |
