Snap for 11031605 from 0af85b1021489e254d3a3354c1edbb8715c68ba8 to mainline-os-statsd-release
Change-Id: If7555a0f16c8e9faf2b26b5bf4651070014d798a
diff --git a/suspend/1.0/default/SuspendSepolicyTests.sh b/suspend/1.0/default/SuspendSepolicyTests.sh
index b40f798..0dd2a3e 100755
--- a/suspend/1.0/default/SuspendSepolicyTests.sh
+++ b/suspend/1.0/default/SuspendSepolicyTests.sh
@@ -49,13 +49,15 @@
get_unlabeled_wakeup_paths() {
for path in ${wakeup_paths[@]}; do
+ wakeup_path="$path"
+ has_wakeup_attr "$wakeup_path" && continue
+
# If there exists a common wakeup parent directory, label that instead
# of each wakeupN directory
- wakeup_path="$path"
dir_path="$(dirname $path)"
[ "$(basename $dir_path)" == "wakeup" ] && wakeup_path="$dir_path"
- has_wakeup_attr "$wakeup_path" || check_wakeup_dup $wakeup_path \
- || unlabeled_paths+=( $wakeup_path )
+
+ check_wakeup_dup $wakeup_path || unlabeled_paths+=( $wakeup_path )
done
}