summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2013-09-05 22:06:16 -0400
committerOz Linden <oz@lindenlab.com>2013-09-05 22:06:16 -0400
commit980802e46859dc31f14d20e558a4e955e6976f48 (patch)
tree3b1328ec5505a6f7764f6bcaa7d2cfe4038b13e0 /scripts
parent6e1138585bf745f73f0bb99ca62f77eeb273f1e4 (diff)
STORM-1552: detect, ignore, and delete invalid feature and gpu table files
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gpu_table_tester4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/gpu_table_tester b/scripts/gpu_table_tester
index 9bc958636d..0fe3e9e8f7 100755
--- a/scripts/gpu_table_tester
+++ b/scripts/gpu_table_tester
@@ -73,6 +73,10 @@ die "Must specify a --gpu-table <gpu_table.txt> value"
open(GPUS, "<$GpuTable")
|| die "Failed to open gpu table '$GpuTable':\n\t$!\n";
+my $FirstLine = <GPUS>;
+die "First line of gpu table does not begin with '//GPU_TABLE'"
+ unless $FirstLine =~ m|^//GPU_TABLE|;
+
# Parse the GPU table into these tables, indexed by the name
my %NameLine; # name -> line number on which a given name was found (catches duplicate names)
my %RecognizerLine; # name -> line number on which a given name was found (catches duplicate names)