]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/perf/collperf/CollPerf.pl
ICU-511.25.tar.gz
[apple/icu.git] / icuSources / test / perf / collperf / CollPerf.pl
index b665104b41fb5f0b74f57ca9648df126eb09e325..1971f5aa535ac5ae498b67867d487500d9a4144b 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 #  ********************************************************************
 #  * COPYRIGHT:
-#  * Copyright (c) 2005-2008, International Business Machines Corporation and
+#  * Copyright (c) 2005-2012, International Business Machines Corporation and
 #  * others. All Rights Reserved.
 #  ********************************************************************
 
@@ -13,12 +13,6 @@ require "../perldriver/Common.pl";
 
 use PerfFramework;
 
-# This test should be run on Windows.
-if (!$OnWindows) {
-       print "This test should be run on Windows.\n";
-    exit(1);
-}
-
 my $options = {
               "title"=>"Collation performance: ICU,POSIX,and Win",
               "headers"=>"ICU POSIX WIN",
@@ -30,11 +24,18 @@ my $options = {
            "outputDir"=>"../results"
              };
 
+my $p;
+if ($OnWindows) {
+       $p = $ICUPathLatest."/collperf/$WindowsPlatform/Release/collperf.exe";
+} else {
+       $p = $ICUPathLatest."/collperf/collperf";
+}
+
 # programs
 # tests will be done for all the programs. Results will be stored and connected
-my $p = $ICUPathLatest."/collperf/$WindowsPlatform/Release/collperf.exe";
-
-my $tests = { 
+my $test;
+if ($OnWindows) {
+       $tests = { 
             "Key Gen null",  ["$p TestIcu_KeyGen_null", "$p TestPosix_KeyGen_null", "$p TestWin_KeyGen_null"],
             "qsort strcoll null",  ["$p TestIcu_qsort_strcoll_null", "$p TestPosix_qsort_strcoll_null", "$p TestWin_qsort_CompareStringW_null"],
             "qsort use key",  ["$p TestIcu_qsort_usekey", "$p TestPosix_qsort_usekey", "$p TestWin_qsort_usekey"],
@@ -73,6 +74,15 @@ my $tests = {
             #"Binary Search win use key",  ["$p TestWin_BinarySearch_usekey"],
             #"Binary Search win wcscmp",  ["$p TestWin_BinarySearch_wcscmp"],
            };
+} else {
+       $tests = { 
+            "Key Gen null",  ["$p TestIcu_KeyGen_null", "$p TestPosix_KeyGen_null"],
+            "qsort strcoll null",  ["$p TestIcu_qsort_strcoll_null", "$p TestPosix_qsort_strcoll_null"],
+            "qsort use key",  ["$p TestIcu_qsort_usekey", "$p TestPosix_qsort_usekey"],
+            "Binary Search icu strcoll null",  ["$p TestIcu_BinarySearch_strcoll_null", "$p TestPosix_BinarySearch_strcoll_null"],
+            "Binary Search icu use key",  ["$p TestIcu_BinarySearch_usekey", "$p TestPosix_BinarySearch_usekey"],
+       };
+}
 
 my $dataFiles = {
                 "",
@@ -84,7 +94,7 @@ my $dataFiles = {
                  "TestNames_Japanese_k.txt",
                  "TestNames_Korean.txt",
                  "TestNames_Latin.txt",
-                 "Testnames_Russian.txt",
+                 "TestNames_Russian.txt",
                  "TestNames_SerbianSH.txt",
                  "TestNames_SerbianSR.txt",
                  "TestNames_Simplified_Chinese.txt",