On Tue, Feb 02, 2021 at 11:42:20AM +0800, Cao Xueliang wrote:
On Tue, Feb 02, 2021 at 09:54:43AM +0800, Wang Yong wrote:
[before] $ ll $LKP_SRC/distro/depends/sysbench-cpu sysbench-cpu -> sysbench $ tree /srv/initrd/deps/$os/$os_arch/$os_version/ . ├── sysbench_20200903.cgz ├── sysbench.cgz -> sysbench_20200903.cgz └── sysbench-cpu.cgz -> sysbench.cgz
all cgz file under one directory, so we can generate symlink when depends file is a symlink
[after] $ tree /srv/initrd/deps/$os/$os_arch/$os_version/sysbench-cpu . ├── sysbench-cpu_20210128.cgz └── sysbench-cpu.cgz -> sysbench-cpu_20210128.cgz
now we upload cgz file through curl, it's not appropriate to generate symlink directly, now generate original cgz file and rename it
Signed-off-by: Wang Yong wangyong0117@qq.com
distro/common | 11 +++++++++++ tests/cci-depends | 9 ++------- 2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/distro/common b/distro/common index 1fd7df4e8..f3a9c3071 100755 --- a/distro/common +++ b/distro/common @@ -94,3 +94,14 @@ upload_to_target_dir()
upload_one_curl "${dir}/${file}" "${dir}" >/dev/null }
+rename_cgz_file() +{
- [ "${BM_NAME}" == "${benchmark}" ] && return
- cd "$pack_to"
cd "$pack_to" && { do something ... }
May be better.
ok
Thanks, Yong