summaryrefslogtreecommitdiff
path: root/tests/igt_command_line.sh
diff options
context:
space:
mode:
authorPetri Latvala <petri.latvala@intel.com>2021-10-28 12:18:19 +0200
committerZbigniew Kempczyński <zbigniew.kempczynski@intel.com>2021-10-28 20:20:26 +0200
commit3458490c14afe3cb8aa873fa9e520e1c815ea068 (patch)
tree0d55a92ea6fdc5df072be1070e120425cb5cd7df /tests/igt_command_line.sh
parent7652a83f600677b5597fcc3bac29d82d4976b662 (diff)
tests/igt_command_line.sh: Check for duplicate subtest names
A test having multiple subtests with the same name is always an error and a couple of such cases had already crept in. Keep them out. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Diffstat (limited to 'tests/igt_command_line.sh')
-rwxr-xr-xtests/igt_command_line.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/igt_command_line.sh b/tests/igt_command_line.sh
index 5356877c..fb8f2e2a 100755
--- a/tests/igt_command_line.sh
+++ b/tests/igt_command_line.sh
@@ -92,6 +92,17 @@ check_test ()
echo " test does seem to be using igt_main() (should have subtests) and yet --list-subtests is empty!"
fail $test
fi
+
+ # check for duplicate subtests
+ echo " Checking subtest uniqueness..."
+ if [ $RET -eq 0 ]; then
+ DUPLICATES="`./$test --list-subtests | sort | uniq -d`"
+ if [ -n "$DUPLICATES" ]; then
+ echo " test has duplicate subtest names!"
+ echo $DUPLICATES
+ fail $test
+ fi
+ fi
}
TESTLISTFILE="$tests_dir/test-list.txt"