blob: c77ec1de9fcfb264d548a86ec19fc5d9c44e52e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/bash
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
# Run license management on it.
echo "Running license management on the cloned repository"
cd /code
/run.sh analyze .
# Compare results with expected results.
set +e
diff /code/gl-license-management-report.json /test/results/ruby-bundler.json > /diff.txt
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
|