2 Star 0 Fork 0

Xu-Lingyun/pre_scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
regression_testing.sh 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
Xu-Lingyun 提交于 2024-12-23 12:28 . update regression_testing.sh.
#!/bin/bash
#cd
#ROOT_DIR=$(pwd)
echo "in regression testing"
echo $ROOT_DIR
SDK_DIR=$ROOT_DIR/pre_scripts/accessory/ohos-sdk
TEST_DIR=$ROOT_DIR/applications_photos
AA_DIR=$ROOT_DIR/arkanalyzer_g/arkanalyzer
#ROOT_DIR=/home/redx/Tests
#SDK_DIR=/home/redx/Projects/pre_scripts/accessory/ohos-sdk
#TEST_DIR=/home/redx/Tests/applications_photos
#AA_DIR=/home/redx/Projects/arkanalyzer
prepare_sdk() {
if [ ! -d "$SDK_DIR" ]; then
echo $SDK_DIR
echo "ERROR: SDK dir is not existing"
exit 1
fi
if [ -d "$SDK_DIR/ets" ]; then
rm -rf $SDK_DIR/ets
fi
tar -xf $SDK_DIR/ets-linux-x64-4.1.7.5-Release.tar.bz -C $SDK_DIR
SDK_DIR=$SDK_DIR/ets
if [ ! -d "$SDK_DIR" ]; then
echo "ERROR: extracting SDK get error"
exit 1
fi
echo "### prepare SDK done"
}
prepare_testing_app() {
if [ -d "$TEST_DIR" ]; then
rm -rf $TEST_DIR
fi
git clone -b OpenHarmony-v4.0.4-Release https://gitee.com/openharmony/applications_photos.git $TEST_DIR
if [ ! -d "$TEST_DIR" ]; then
echo "ERROR: download testing target error"
exit
fi
}
#run testing
run_testing() {
cd $AA_DIR
node -r ts-node/register tests/PipelineAppTest.ts
if [ $? -ne 0 ]; then
echo "Regression test failed"
exit 1
fi
exit 0
}
prepare_sdk
prepare_testing_app
run_testing
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/muya318/pre_scripts.git
[email protected]:muya318/pre_scripts.git
muya318
pre_scripts
pre_scripts
master

搜索帮助