tests: fix feature test

Fixes: 81f0b84d ("tests: fix feature checking if it's a directory")
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
Georgia Garcia 2023-08-01 16:20:20 -03:00
parent 210ad63cbf
commit 64c1eb9cda

View file

@ -70,9 +70,14 @@ kernel_features()
# check if feature is in file
feature=$(basename "$features_dir/$f")
file=$(dirname "$features_dir/$f")
if [ -f $file ] && ! grep -q $feature $file; then
if [ -f $file ]; then
if ! grep -q $feature $file; then
echo "Required feature '$f' not available."
return 2;
fi
else
echo "Required feature '$f' not available."
return 2;
return 3;
fi
fi
done