com pftt2: bug fix for reading new result-pack format: src/com/mostc/pftt/results/PhpResultPackReader.java
| From: | Anatol Belski | Date: | Fri, 26 Jul 2013 18:09:24 +0000 |
| Subject: | com pftt2: bug fix for reading new result-pack format: src/com/mostc/pftt/results/PhpResultPackReader.java | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-68360@lists.php.net to get a copy of this message | ||
Commit: f818b098a313902faad655339623f6fa6b87ee83
Author: Matt Ficken <v-mafick@microsoft.com> Fri, 26 Jul 2013 11:09:24 -0700
Parents: d20cc9a7717da6d4e19f9e8ecbc6e26b6c0d8850
Branches: master
Link: http://git.php.net/?p=pftt2.git;a=commitdiff;h=f818b098a313902faad655339623f6fa6b87ee83
Log:
bug fix for reading new result-pack format
Former-commit-id: fd3aac87639446b4b2b1b50d2e967df6a4c968d7
Changed paths:
M src/com/mostc/pftt/results/PhpResultPackReader.java
Diff:
diff --git a/src/com/mostc/pftt/results/PhpResultPackReader.java
b/src/com/mostc/pftt/results/PhpResultPackReader.java
index abd828a..83b1195 100644
--- a/src/com/mostc/pftt/results/PhpResultPackReader.java
+++ b/src/com/mostc/pftt/results/PhpResultPackReader.java
@@ -71,36 +71,35 @@ public class PhpResultPackReader extends PhpResultPack {
File phpt_dir = new File(host_dir+"/phpt");
File[] dirs = phpt_dir.listFiles();
if (dirs!=null) {
- for ( File scenario_dir : dirs ) {
- if (!scenario_dir.isDirectory())
+ for ( File test_pack_dir : dirs ) {
+ if (!test_pack_dir.isDirectory())
continue;
- String scenario_set_name = scenario_dir.getName();
-
HashMap<String,HashMap<String,AbstractPhptRW>> map_a =
reader.phpt_reader_map.get(host_name);
if (map_a==null) {
map_a = new HashMap<String,HashMap<String,AbstractPhptRW>>(3);
reader.phpt_reader_map.put(host_name, map_a);
}
- File[] dirs2 = scenario_dir.listFiles();
+ HashMap<String,AbstractPhptRW> map_b = map_a.get(test_pack_dir.getName());
+ if (map_b==null) {
+ map_b = new HashMap<String,AbstractPhptRW>(7);
+ map_a.put(test_pack_dir.getName(), map_b);
+ }
+ File[] dirs2 = test_pack_dir.listFiles();
if (dirs2==null)
continue;
- for ( File test_pack_dir : dirs2 ) {
- HashMap<String,AbstractPhptRW> map_b = map_a.get(scenario_set_name);
- if (map_b==null) {
- map_b = new HashMap<String,AbstractPhptRW>(7);
- map_a.put(scenario_set_name, map_b);
- }
+ for ( File scenario_dir : dirs2 ) {
+ String scenario_set_name = scenario_dir.getName();
PhptResultReader phpt_reader = new PhptResultReader();
try {
- phpt_reader.open(cm, test_pack_dir, scenario_set_name, reader.build_info,
reader.test_pack_branch, reader.test_pack_version);
+ phpt_reader.open(cm, scenario_dir, scenario_set_name, reader..build_info,
reader.test_pack_branch, reader.test_pack_version);
} catch ( Exception ex ) {
ex.printStackTrace();
continue;
}
- map_b.put(test_pack_dir.getName(), phpt_reader);
+ map_b.put(scenario_dir.getName(), phpt_reader);
}
}
}