Check cirros symlink before creation
Currently, run_tests.sh does: ln -s ~/cache/files/cirros-0.4.0-x86_64-disk.img $IMG_DIR inconditionally. This patch checks if the file exists and is a symlink before doing the ln -s. This helps running ./all-in-one.sh twice if the first attempt failed, for some reasons, which isn't hypothetical, it happens often that it fails because of networking problems (bad WIFI) on my laptop. Change-Id: I3faed512a1eeccef15f4965d6deb2151eab9d36d
This commit is contained in:
parent
4bbea36c6f
commit
fb4836d749
@ -146,7 +146,9 @@ fi
|
||||
|
||||
if [ -f ~/cache/files/cirros-0.4.0-x86_64-disk.img ]; then
|
||||
# Create a symlink for tempest.
|
||||
ln -s ~/cache/files/cirros-0.4.0-x86_64-disk.img $IMG_DIR
|
||||
if ! [ -h /tmp/openstack/image/cirros-0.4.0-x86_64-disk.img ] ; then
|
||||
ln -s ~/cache/files/cirros-0.4.0-x86_64-disk.img $IMG_DIR
|
||||
fi
|
||||
else
|
||||
wget http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img -P $IMG_DIR
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user