115 for (var iteration = 0; iteration < iters; iteration++) {
116
117 //get a new global to avoid symbol pollution and reloads of base
118 //in the same namespace
119 var newGlobal = loadWithNewGlobal({script:'this', name:'test'});
120
121 //load base into the new global so we get BenchmarkSuite etc
122 newGlobal.load(base);
123
124 //load all files in the single benchmark
125 for (var k in files) {
126 var file = files[k];
127 if (iteration >= 0) { //only display message on first iteration
128 var str2 = "\t";
129 if (iters > 1) {
130 str2 += " [iteration " + (iteration + 1) + "]";
131 }
132 str2 += " processing file: " + file + "...";
133 print_if_verbose(str2);
134 }
135 newGlobal.load("file://" + path + file);
136 }
137 }
138 print("Done.");
139 }
140
141 if (testsCompiled.length == 0) {
142 print("Error: no tests given to compile");
143 }
|
115 for (var iteration = 0; iteration < iters; iteration++) {
116
117 //get a new global to avoid symbol pollution and reloads of base
118 //in the same namespace
119 var newGlobal = loadWithNewGlobal({script:'this', name:'test'});
120
121 //load base into the new global so we get BenchmarkSuite etc
122 newGlobal.load(base);
123
124 //load all files in the single benchmark
125 for (var k in files) {
126 var file = files[k];
127 if (iteration >= 0) { //only display message on first iteration
128 var str2 = "\t";
129 if (iters > 1) {
130 str2 += " [iteration " + (iteration + 1) + "]";
131 }
132 str2 += " processing file: " + file + "...";
133 print_if_verbose(str2);
134 }
135 newGlobal.load(new java.io.File(path + file).toURL());
136 }
137 }
138 print("Done.");
139 }
140
141 if (testsCompiled.length == 0) {
142 print("Error: no tests given to compile");
143 }
|