diff --git a/rust-build/ohos_ci_build.sh b/rust-build/ohos_ci_build.sh index 66c5566f285baf166683708dc6e7e5d402611f3d..6f82356f6b94a43c3147ee2a4a7689e67b8e40fa 100644 --- a/rust-build/ohos_ci_build.sh +++ b/rust-build/ohos_ci_build.sh @@ -53,8 +53,7 @@ main() { pushd ${rust_source_dir} export_ohos_path - # clear cache before build - sudo sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches' + python3 ./x.py dist collect_build_result if [ "${host_platform}" = "linux" ]; then diff --git a/rust-build/ohos_ci_test.sh b/rust-build/ohos_ci_test.sh index 22613c0998afee31f59e56d87ede4b9c1b082b36..c741b780772753f9cec795adf1f6aa82998ec5f8 100644 --- a/rust-build/ohos_ci_test.sh +++ b/rust-build/ohos_ci_test.sh @@ -18,7 +18,6 @@ main() { download_rust_at_net copy_config update_config_clang ${oh_tools} ${mingw_tools} - sed -i "s/nightly/beta/g" ${rust_source_dir}/config.toml sed -i "s/target = .*/target = [\"x86_64-unknown-linux-gnu\"]/g" ${rust_source_dir}/config.toml move_static_rust_source ${rust_static_dir} ${rust_source_dir} @@ -33,14 +32,6 @@ main() { fi exclude_file="$exclude_file --exclude $line" done < ${shell_path}/exclude_test.txt - # Downloading through repo does not have an origin remote, but the Rust test code uses - # the origin remote information. Add origin remote information through this method. - # search "refs/remotes/origin" at rust code. - if [ -z $(git remote | grep "origin") ]; then - local address=$(echo $(git remote -v | grep fetch) | awk '{print $2}') - git remote add origin ${address} - git fetch -f origin - fi test_suite_dir=("assembly" "codegen" "codegen-units" "incremental" "mir-opt" "pretty" "run-coverage" "run-coverage-rustdoc" "run-make" "run-make-fulldeps" @@ -51,9 +42,8 @@ main() { do all_test_suite="${all_test_suite} tests/${element}" done - # clear cache before test - sudo sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches' - python3 ./x.py test --stage=2 tidy ${all_test_suite} $exclude_file --no-fail-fast + + python3 ./x.py test --stage=2 ${all_test_suite} $exclude_file --no-fail-fast popd echo "test the rust toolchain Completed"