代码拉取完成,页面将自动刷新
#!/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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。