代码拉取完成,页面将自动刷新
#!/bin/bash
source ./test-helpers.sh
# This script tests container image build and runs a couple of
# tests against the generated image.
if [ -d ".venv" ]; then
mv .venv .venv_temp
fi
docker build -t porting-advisor .
if [ $? -ne 0 ]; then
echo "**ERROR**: building container image" && exit 1
fi
echo "Running container on samples to console"
docker run --rm -v $(pwd)/sample-projects:/source porting-advisor /source > console_test.txt
test_report 'console' 'console_test.txt' "${lines_to_find[@]}"
if [ $? -ne 0 ]; then
echo "**ERROR**: running container to console" && exit 1
fi
rm console_test.txt
echo "Running container on samples to HTML report"
docker run --rm -v $(pwd):/source porting-advisor /source/sample-projects --output /source/test.html
test_report 'html' 'test.html' "${lines_to_find[@]}"
if [ $? -ne 0 ]; then
echo "**ERROR**: running container to html report" && exit 1
fi
rm -f test.html
if [ -d ".venv_temp" ]; then
mv .venv_temp .venv
fi
exit 0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。