aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Zhijian <zhijianx.li@intel.com>2019-07-15 16:31:51 +0800
committerPhilip Li <philip.li@intel.com>2019-07-15 16:48:44 +0800
commit4b6c4114ec195af7c20090292d781734b93972a1 (patch)
tree8de4f142917dd3e386c15acb806491ea58f38099
parent38bf37945fa48e2a6d63c87572e71b2875eb78cb (diff)
downloadlkp-tests-4b6c4114ec195af7c20090292d781734b93972a1.tar.gz
tests/makepkg: update link only when it exists
avoid benchmark linking to a invalid file izhijian@inn:~$ ls -al /osimage/pkg/debian-x86_64-2018-04-03.cgz/xfstests-x86_64-v1.1.0.r1626.g52f9ebbd-1_2019-07-09.cgz ls: cannot access '/osimage/pkg/debian-x86_64-2018-04-03.cgz/xfstests-x86_64-v1.1.0.r1626.g52f9ebbd-1_2019-07-09.cgz': No such file or directory lizhijian@inn:~$ ls -al /osimage/pkg/debian-x86_64-2018-04-03.cgz/xfstests-x86_64.cgz lrwxrwxrwx 1 root root 55 Jul 9 20:05 /osimage/pkg/debian-x86_64-2018-04-03.cgz/xfstests-x86_64.cgz -> xfstests-x86_64-v1.1.0.r1626.g52f9ebbd-1_2019-07-09.cgz Signed-off-by: Li Zhijian <zhijianx.li@intel.com> Signed-off-by: Philip Li <philip.li@intel.com>
-rwxr-xr-xtests/makepkg2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/makepkg b/tests/makepkg
index 7a9c8c50..a7ccf85f 100755
--- a/tests/makepkg
+++ b/tests/makepkg
@@ -89,4 +89,4 @@ setup_proxy
PACMAN=true BUILDDIR=$TMP PKGEXT=.cgz CGZDEST="$sync_dest/$cgz_name" \
$LKP_SRC/sbin/makepkg --config $LKP_SRC/etc/makepkg.conf
-ln -sf "$cgz_name" "$sync_dest/${benchmark}-${arch}.cgz"
+[ -e "$sync_dest/$cgz_name" ] && ln -sf "$cgz_name" "$sync_dest/${benchmark}-${arch}.cgz"